:root {
  --tg-ink: #0b1f33;
  --tg-muted: #567084;
  --tg-blue: #087fc0;
  --tg-blue-dark: #075187;
  --tg-cyan: #37c6d6;
  --tg-green: #08a56a;
  --tg-surface: #ffffff;
  --tg-soft: #eef7fb;
  --tg-border: rgba(11, 68, 105, 0.13);
  --tg-shadow: 0 18px 50px rgba(12, 55, 84, 0.11);
  --tg-shadow-small: 0 8px 24px rgba(12, 55, 84, 0.09);
  --tg-radius: 20px;
}

html {
  scroll-behavior: smooth;
  background: #f6fafc;
}

body {
  color: var(--tg-ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(55, 198, 214, 0.09), transparent 28rem),
    radial-gradient(circle at 95% 18%, rgba(8, 127, 192, 0.08), transparent 30rem),
    #f6fafc;
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, -apple-system, sans-serif !important;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body,
#page-container {
  overflow-x: clip;
}

::selection {
  color: #fff;
  background: var(--tg-blue);
}

.turn-skip-link {
  position: fixed;
  z-index: 100000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff !important;
  background: var(--tg-blue-dark);
  border-radius: 8px;
  box-shadow: var(--tg-shadow-small);
  transform: translateY(-150%);
}

.turn-skip-link:focus {
  transform: translateY(0);
}

.turn-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

a {
  color: var(--tg-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

a:hover {
  color: var(--tg-green);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--tg-ink);
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif !important;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

h1 { font-size: clamp(2.25rem, 5vw, 4.8rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p,
li {
  text-wrap: pretty;
}

/* Header */
#main-header {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(8, 127, 192, 0.1);
  box-shadow: 0 8px 30px rgba(6, 48, 78, 0.08) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

#main-header .container {
  width: min(92%, 1200px);
}

#logo {
  max-height: 48px !important;
  filter: drop-shadow(0 3px 8px rgba(6, 48, 78, 0.08));
}

#top-menu > li {
  padding-right: 12px;
}

#top-menu > li:first-child {
  display: inline-block !important;
}

#top-menu > li > a {
  color: var(--tg-ink) !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-right: 10px;
  padding-left: 10px;
}

#top-menu > li > a:hover,
#top-menu > li.current-menu-item > a {
  color: var(--tg-blue) !important;
  opacity: 1;
}

#top-menu > li:last-child > a {
  color: #fff !important;
  background: linear-gradient(135deg, var(--tg-blue), var(--tg-cyan));
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(8, 127, 192, 0.22);
  padding: 10px 17px !important;
}

#et_search_icon::before,
.mobile_menu_bar::before {
  color: var(--tg-blue) !important;
}

.et_mobile_menu {
  background: rgba(255, 255, 255, 0.98) !important;
  border-top: 3px solid var(--tg-cyan) !important;
  border-radius: 0 0 18px 18px;
  box-shadow: var(--tg-shadow);
  padding: 14px !important;
}

.et_mobile_menu li a {
  border-bottom-color: var(--tg-border) !important;
  border-radius: 10px;
  color: var(--tg-ink) !important;
  font-weight: 700;
}

/* Page rhythm */
#main-content {
  background: transparent;
}

.et_pb_section {
  position: relative;
}

.et_pb_row,
.container {
  width: min(90%, 1200px);
}

.et_pb_section:not(.et_pb_fullwidth_section) > .et_pb_row {
  padding-top: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(24px, 4vw, 56px);
}

.et_pb_text_inner > h1:first-child,
.et_pb_text_inner > h2:first-child,
.entry-title {
  position: relative;
  margin-bottom: 0.65em;
}

.et_pb_text_inner > h1:first-child::after,
.et_pb_text_inner > h2:first-child::after,
.entry-title::after {
  display: block;
  width: 64px;
  height: 5px;
  margin-top: 0.35em;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tg-blue), var(--tg-cyan), var(--tg-green));
  content: "";
}

.et_pb_text_align_center .et_pb_text_inner > h1:first-child::after,
.et_pb_text_align_center .et_pb_text_inner > h2:first-child::after,
.et_pb_text_inner > h1[style*="text-align: center"]::after,
.et_pb_text_inner > h2[style*="text-align: center"]::after,
.et_pb_module_header::after {
  margin-right: auto;
  margin-left: auto;
}

.et_pb_text,
.entry-content {
  color: #263f52;
}

.et_pb_text p + p,
.entry-content p + p {
  margin-top: 0.9em;
}

.et_pb_image img,
.entry-content img,
.et_pb_post img,
.woocommerce-product-gallery img {
  height: auto;
}

blockquote {
  margin: 1.5em 0;
  padding: 1.2em 1.4em;
  color: var(--tg-ink);
  background: linear-gradient(135deg, rgba(8, 127, 192, 0.08), rgba(55, 198, 214, 0.08));
  border: 0;
  border-left: 5px solid var(--tg-cyan);
  border-radius: 0 16px 16px 0;
}

/* Buttons */
.et_pb_button,
button,
input[type="submit"],
input[type="button"],
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  min-height: 48px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--tg-blue-dark), var(--tg-blue) 55%, var(--tg-cyan)) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(8, 127, 192, 0.23);
  font-family: inherit !important;
  font-weight: 750 !important;
  letter-spacing: 0.01em;
  line-height: 1.2 !important;
  padding: 14px 25px !important;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

.et_pb_button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(8, 127, 192, 0.3) !important;
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.et_pb_button::after {
  font-size: 1.25em !important;
  line-height: 1.15 !important;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea,
.et_pb_contact_form input,
.et_pb_contact_form textarea {
  width: 100%;
  color: var(--tg-ink) !important;
  background: #fff !important;
  border: 1px solid rgba(11, 68, 105, 0.2) !important;
  border-radius: 13px !important;
  box-shadow: inset 0 1px 2px rgba(11, 68, 105, 0.04);
  font-family: inherit !important;
  font-size: 16px !important;
  padding: 13px 15px !important;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--tg-blue) !important;
  box-shadow: 0 0 0 4px rgba(8, 127, 192, 0.12) !important;
  outline: none;
}

label {
  color: var(--tg-ink);
  font-weight: 650;
}

/* Static Formspree contact forms */
.et_pb_contact_form_container {
  width: min(100%, 880px);
  margin-right: auto;
  margin-left: auto;
}

.turn-formspree {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 10px;
}

.turn-form-lead {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  gap: 6px 24px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--tg-border);
}

.turn-form-lead > span {
  grid-column: 1 / -1;
  color: var(--tg-blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.turn-form-lead p {
  max-width: 680px;
  margin: 0 !important;
  color: var(--tg-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.turn-form-lead small {
  color: var(--tg-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.turn-formspree .et_pb_contact_field {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.turn-formspree .et_pb_contact_field[data-id="message"],
.turn-formspree .et_contact_bottom_container {
  grid-column: 1 / -1;
}

.turn-formspree .et_pb_contact_form_label {
  display: block !important;
  margin-bottom: 8px;
  color: var(--tg-ink) !important;
  font-size: 0.92rem;
  font-weight: 750;
}

.turn-formspree .et_pb_contact_form_label::after {
  margin-left: 4px;
  color: #d64b5d;
  content: "*";
}

.turn-formspree input,
.turn-formspree textarea {
  margin: 0 !important;
  background: #f7fbfd !important;
  border: 1px solid rgba(11,68,105,.18) !important;
  box-shadow: none !important;
  padding: 16px 18px !important;
}

.turn-formspree input:hover,
.turn-formspree textarea:hover {
  border-color: rgba(8,127,192,.42) !important;
}

.turn-formspree input:focus,
.turn-formspree textarea:focus {
  background: #fff !important;
  border-color: var(--tg-blue) !important;
  box-shadow: 0 0 0 4px rgba(8,127,192,.1) !important;
}

.turn-formspree textarea {
  min-height: 190px;
  resize: vertical;
}

.turn-formspree .et_contact_bottom_container {
  display: flex;
  float: none;
  justify-content: flex-end;
  margin: 0;
  text-align: right;
}

.turn-formspree .et_pb_contact_submit {
  min-width: 180px;
  margin: 0;
}

.turn-formspree .et_pb_contact_submit::after {
  position: static;
  display: inline-block;
  margin-left: 10px !important;
  content: "→" !important;
  font-family: inherit !important;
  font-size: 1.05em !important;
  opacity: 1 !important;
}

.turn-form-privacy {
  grid-column: 1 / -1;
  margin: -8px 0 0 !important;
  color: var(--tg-muted);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: right;
}

.turn-form-status {
  grid-column: 1 / -1;
  padding: 34px 24px;
  color: var(--tg-ink);
  text-align: center;
  background: linear-gradient(135deg, rgba(8,165,106,.1), rgba(55,198,214,.1));
  border-top: 1px solid rgba(8,165,106,.25);
  border-bottom: 1px solid rgba(8,165,106,.25);
}

.turn-form-status::before {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 0 auto 14px;
  color: #fff;
  background: var(--tg-green);
  border-radius: 50%;
  content: "✓";
  font-size: 1.5rem;
  font-weight: 800;
}

.turn-form-status strong,
.turn-form-status span {
  display: block;
}

.turn-form-status strong {
  margin-bottom: 5px;
  font-size: 1.3rem;
}

.turn-form-status span {
  color: var(--tg-muted);
}

.turn-formspree.has-error .turn-form-status {
  background: rgba(214,75,93,.07);
  border-color: rgba(214,75,93,.25);
}

.turn-formspree.has-error .turn-form-status::before {
  background: #d64b5d;
  content: "!";
}

.turn-formspree.is-complete > :not(input[type="hidden"]):not(.turn-honeypot):not(.turn-form-status) {
  display: none !important;
}

.turn-formspree.is-sending .et_pb_contact_submit {
  cursor: wait;
  filter: saturate(.55);
  opacity: .75;
}

.turn-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Tables and utility content */
table {
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--tg-border) !important;
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 0;
  box-shadow: none;
}

th {
  color: #fff;
  background: var(--tg-blue-dark);
  font-weight: 750;
}

th,
td {
  border-color: var(--tg-border) !important;
  padding: 13px 15px !important;
}

tbody tr:nth-child(even) {
  background: rgba(8, 127, 192, 0.035);
}

#company-info th,
#company-info th span {
  color: #fff !important;
}

.pagination,
.wp-pagenavi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 28px;
}

.pagination a,
.wp-pagenavi a,
.wp-pagenavi span {
  min-width: 40px;
  padding: 8px 12px !important;
  text-align: center;
  background: #fff;
  border: 1px solid var(--tg-border) !important;
  border-radius: 10px;
}

/* Home and editorial pages */
.home .et-l--post .et_pb_section_0 {
  background:
    radial-gradient(circle at 12% 18%, rgba(55, 198, 214, 0.18), transparent 24rem),
    radial-gradient(circle at 92% 25%, rgba(8, 165, 106, 0.11), transparent 25rem),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(238,247,251,0.82));
}

.home .et-l--post .et_pb_section_0::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(8,127,192,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(8,127,192,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
  content: "";
}

.archive #left-area,
.blog #left-area,
.author #left-area,
.single #left-area {
  display: grid;
  gap: 24px;
}

/* Divi normally reveals these with layout JavaScript; static pages must stay visible. */
.et_pb_blog_grid .et_pb_salvattore_content[data-columns] .et_pb_post {
  opacity: 1 !important;
}

.post-meta {
  color: var(--tg-muted) !important;
  font-size: 0.9rem;
}

/* Footer */
#main-footer,
.et-l--footer,
.disclaimer {
  color: rgba(255,255,255,.78);
  background: #071d2f !important;
}

.et-l--footer .et_pb_section,
.et-l--footer .et_pb_row,
#footer-bottom {
  background: transparent !important;
}

#footer-bottom {
  padding: 26px 0 18px !important;
}

#footer-info {
  float: none;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-align: center;
}

.disclaimer {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 0 0 32px;
}

.disclaimer .container {
  width: min(90%, 1000px);
  padding-top: 25px;
}

.disclaimer p {
  margin: 0 !important;
  color: rgba(255,255,255,.74) !important;
  font-size: .84rem;
  line-height: 1.8;
}

.disclaimer p + p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px !important;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.disclaimer a {
  color: rgba(255,255,255,.88) !important;
  font-weight: 700;
}

.disclaimer a:hover {
  color: var(--tg-cyan) !important;
}

#footer-info,
#footer-info a,
.et-l--footer p,
.et-l--footer a {
  color: rgba(255,255,255,.78) !important;
}

.et-l--footer a:hover,
#footer-info a:hover {
  color: var(--tg-cyan) !important;
}

/* Accessibility and responsive behavior */
:focus-visible {
  outline: 3px solid rgba(55, 198, 214, 0.75) !important;
  outline-offset: 4px;
}

@media (max-width: 980px) {
  #main-header .container {
    width: 92%;
  }

  .et_pb_section:not(.et_pb_fullwidth_section) > .et_pb_row {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .et_pb_column {
    margin-bottom: 28px;
  }

  .et_pb_column:last-child {
    margin-bottom: 0;
  }

  #footer-bottom {
    padding-top: 22px !important;
  }

  .disclaimer {
    padding-bottom: 26px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .et_pb_row, .container { width: 90%; }
  .et_pb_button, button, input[type="submit"], .button { width: 100%; text-align: center; }
  .turn-formspree { grid-template-columns: 1fr; gap: 18px; }
  .turn-formspree .et_pb_contact_field,
  .turn-formspree .et_contact_bottom_container { grid-column: 1; }
  .turn-formspree .et_pb_contact_submit { width: 100%; }
  .turn-form-lead { grid-template-columns: 1fr; }
  .turn-form-lead small { white-space: normal; }
  .turn-form-privacy { text-align: left; }
  h1 { font-size: clamp(2rem, 11vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
