/* Doug & Danny VTS — custom styles that sit on top of Tailwind.
   Layout uses logical properties (inline-start/end) so RTL and LTR share one stylesheet. */

:root {
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --slate-500: #64748B;
  --line: #E2E8F0;
  --signal: #C9A45C;
  --gold: #C9A45C;
  --gold-dark: #B58F47;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
html body { line-height: 1.85; }
html[dir="ltr"] body { line-height: 1.65; }

/* ---------- Type scale ---------- */
.display-xl { font-size: clamp(2.300rem, 1.300rem + 4.200vw, 3.400rem); line-height: 1.55; }
.display-lg { font-size: clamp(1.800rem, 1.300rem + 2vw, 2.750rem); line-height: 1.55; }
[dir="ltr"] .display-xl { line-height: 1.06; letter-spacing: -0.030em; }
[dir="ltr"] .display-lg { line-height: 1.14; letter-spacing: -0.022em; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 3px; border-radius: 6px; }
#contact :focus-visible { outline-color: #fff; }
#contact .field :focus-visible { outline-color: var(--navy-900); }
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 60;
  background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding-inline: 20px; border-radius: 999px;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn-lg { height: 54px; padding-inline: 30px; font-size: 17px; }
.btn-primary { background: var(--gold); color: var(--navy-900); font-weight: 600; box-shadow: 0 10px 24px -14px rgba(120, 90, 30, .7); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { color: var(--navy-800); border: 1px solid var(--line); background: #fff; padding-inline: 14px; }
.btn-ghost:hover { border-color: #94A3B8; }

.text-link {
  font-weight: 500; color: var(--navy-800);
  text-decoration: underline; text-decoration-color: #CBD5E1;
  text-decoration-thickness: 1.500px; text-underline-offset: 7px;
  transition: text-decoration-color .2s;
}
.text-link:hover { text-decoration-color: var(--navy-800); }
.nav-link { position: relative; padding-block: 6px; transition: color .2s; }
.nav-link:hover, .nav-link[aria-current="true"] { color: var(--navy-900); }
.nav-link[aria-current="true"]::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--navy-900);
}
#site-header.is-scrolled { border-color: var(--line); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.500rem, 9vw, 7.500rem); }

/* ---------- Hero illustration ---------- */
.hero-art { position: relative; margin-inline: auto; max-width: 520px; }
.hero-art::before {
  /* faint drafting grid behind the building, fading out at the edges */
  content: ""; position: absolute; inset: -6% -14%;
  background-image:
    linear-gradient(to right, rgba(30, 41, 59, .075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 41, 59, .075) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
}
.hero-building { position: relative; display: block; width: 100%; height: auto; }

.car { animation-timing-function: cubic-bezier(.45, 0, .25, 1); animation-iteration-count: infinite; }
.car-a { animation-name: car-a; animation-duration: 15s; }
.car-b { animation-name: car-b; animation-duration: 19s; }
.car-c { animation-name: car-c; animation-duration: 12s; }
/* each floor is 40 units tall; cars rest at floors, then travel */
@keyframes car-a {
  0%, 10% { transform: translateY(0); }
  40%, 54% { transform: translateY(-360px); }
  74%, 86% { transform: translateY(-120px); }
  100% { transform: translateY(0); }
}
@keyframes car-b {
  0%, 14% { transform: translateY(-440px); }
  46%, 60% { transform: translateY(-80px); }
  90%, 100% { transform: translateY(-440px); }
}
@keyframes car-c {
  0%, 18% { transform: translateY(-200px); }
  44%, 60% { transform: translateY(0); }
  86%, 100% { transform: translateY(-200px); }
}

.chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 14px; background: #fff; color: var(--navy-800);
  border: 1px solid var(--line); font-size: 14px; line-height: 1.5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 16px 34px -16px rgba(15, 23, 42, .22);
}
.chip-wait { top: 15%; inset-inline-start: -2%; }
.chip-safe { bottom: 17%; inset-inline-end: -2%; }
@media (max-width: 480px) { .chip { font-size: 12.500px; padding: 8px 12px; } .chip-wait { inset-inline-start: 0; } .chip-safe { inset-inline-end: 0; } }

/* ---------- Why cards ---------- */
.why-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px 26px 30px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 34px -14px rgba(15, 23, 42, .14);
}
.why-icon {
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 14px; background: #F3F4F6; color: var(--navy-900);
}
.why-icon svg { width: 26px; height: 26px; }
.why-title { margin-top: 22px; font-size: 19px; font-weight: 600; line-height: 1.5; color: var(--navy-900); }
[dir="ltr"] .why-title { line-height: 1.3; letter-spacing: -0.010em; }
.why-text { margin-top: 10px; font-size: 16px; color: var(--slate-500); }

/* ---------- Sector tiles ---------- */
.sector-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.sector-grid > .sector { flex: 0 0 100%; }
@media (min-width: 640px) { .sector-grid > .sector { flex-basis: calc((100% - 20px) / 2); } }
@media (min-width: 1024px) { .sector-grid > .sector { flex-basis: calc((100% - 40px) / 3); } }
@media (min-width: 1280px) { .sector-grid > .sector { flex-basis: calc((100% - 60px) / 4); } }
.sector {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
}
.sector-art { display: flex; align-items: flex-end; justify-content: center; height: 220px; background: #F3F4F6; color: var(--navy-800); padding: 28px 28px 0; }
.sector-art svg { width: 100%; max-width: 300px; max-height: 100%; height: auto; }
.sector-body { flex: 1; padding: 24px 26px 28px; }
.sector-title { font-size: 20px; font-weight: 600; line-height: 1.5; color: var(--navy-900); }
[dir="ltr"] .sector-title { line-height: 1.3; letter-spacing: -0.010em; }
.sector-text { margin-top: 8px; font-size: 16px; color: var(--slate-500); }

/* ---------- Services ---------- */
.svc-list { display: grid; gap: 0 40px; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .svc-list { grid-template-columns: 1fr 1fr; } }
.svc { padding-block: 26px 28px; border-bottom: 1px solid var(--line); }
.svc-title { font-size: 20px; font-weight: 600; line-height: 1.5; color: var(--navy-900); }
[dir="ltr"] .svc-title { line-height: 1.3; letter-spacing: -0.010em; }
.svc-text { margin-top: 8px; font-size: 16px; color: var(--slate-500); }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-block: 22px; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 19px; font-weight: 600; line-height: 1.5; color: var(--navy-900); }
[dir="ltr"] .faq summary h3 { line-height: 1.35; letter-spacing: -0.010em; }
.faq summary::after {
  content: ""; flex-shrink: 0; width: 10px; height: 10px; margin-inline: 6px;
  border-right: 2px solid var(--navy-800); border-bottom: 2px solid var(--navy-800);
  transform: translateY(-3px) rotate(45deg); transition: transform .2s;
}
.faq[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq > p { max-width: 62ch; padding-bottom: 26px; font-size: 17px; color: var(--slate-500); }

/* ---------- Inner pages (generated from content/pages) ---------- */
.btn-light { background: var(--gold); color: var(--navy-900); font-weight: 600; }
.btn-light:hover { background: var(--gold-dark); }

.page-hero { padding-block: clamp(2.500rem, 6vw, 4.500rem) clamp(2.250rem, 5vw, 3.500rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 22ch; }
.page-intro { margin-top: 20px; max-width: 62ch; font-size: 19px; color: var(--slate-500); }
.page-date { margin-top: 14px; font-size: 14px; color: var(--slate-500); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 14px; color: var(--slate-500); }
.crumbs a:hover { color: var(--navy-900); text-decoration: underline; }

.page-body { padding-block: clamp(2.500rem, 6vw, 4.500rem) clamp(3.500rem, 8vw, 6rem); }
.page-body-article { max-width: 46rem; }
.pg-section + .pg-section { margin-top: clamp(3rem, 7vw, 5rem); padding-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.pg-head { max-width: 46rem; }
.pg-head h2, .prose h2 { font-size: clamp(1.600rem, 1.250rem + 1.400vw, 2.200rem); font-weight: 600; line-height: 1.4; color: var(--navy-900); }
[dir="ltr"] .pg-head h2, [dir="ltr"] .prose h2 { line-height: 1.18; letter-spacing: -0.020em; }

.pg-items { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 768px) { .pg-items { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .pg-items { grid-template-columns: repeat(3, 1fr); } }
.pg-items-single { grid-template-columns: 1fr; max-width: 46rem; }
.pg-item { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 26px 28px; }
.pg-item > h3:first-child { margin-top: 0; }
.pg-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }

.prose { font-size: 17px; color: #475569; }
.prose > * + * { margin-top: 14px; }
.prose h2 { margin-top: 2.200em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.800em; font-size: 20px; font-weight: 600; line-height: 1.5; color: var(--navy-900); }
.prose h4 { margin-top: 1.400em; font-size: 17px; font-weight: 600; color: var(--navy-800); }
[dir="ltr"] .prose h3 { line-height: 1.3; letter-spacing: -0.010em; }
.prose p, .prose li { max-width: 68ch; }
.prose strong { font-weight: 600; color: var(--navy-800); }
.prose a { color: var(--navy-900); font-weight: 500; text-decoration: underline; text-decoration-color: #94A3B8; text-underline-offset: 5px; }
.prose a:hover { text-decoration-color: var(--navy-900); }
.prose ul, .prose ol { padding-inline-start: 1.300em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: #94A3B8; }
.prose blockquote { border-inline-start: 3px solid var(--navy-900); padding-inline-start: 18px; color: var(--navy-800); font-size: 19px; }
.prose img { max-width: 100%; height: auto; }
.page-body .faq > .prose { padding-bottom: 26px; }

.pg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px 32px; margin-top: 28px; padding-block: 24px; border-block: 1px solid var(--line); }
.pg-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; }
.pg-stats dt { font-size: 15px; color: var(--slate-500); }
.pg-stats dd { font-size: 38px; font-weight: 700; line-height: 1; color: var(--navy-900); }

.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 44px; margin-top: 28px; }
.logo-row img { height: 44px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .8; }
.page-hero h1 { max-width: 26ch; }

.pg-table { overflow-x: auto; margin-top: 20px; }
.pg-table table { width: 100%; border-collapse: collapse; font-size: 16px; }
.pg-table th, .pg-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.pg-table th { font-weight: 600; color: var(--navy-900); background: #F3F4F6; }

/* ---------- Project results (home) ---------- */
.result { background: #F9FAFB; border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.result h4 { font-size: 19px; font-weight: 600; line-height: 1.5; color: var(--navy-900); }
[dir="ltr"] .result h4 { line-height: 1.3; letter-spacing: -0.010em; }
.result-place { margin-top: 4px; font-size: 15px; color: var(--slate-500); }
.result dl { margin-top: 18px; border-top: 1px solid var(--line); }
.result dl div { display: flex; align-items: baseline; gap: 14px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.result dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.result dd { flex: 0 0 5.200em; font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--navy-900); text-align: start; }
[dir="rtl"] .result dd[dir="ltr"] { text-align: right; }
.result dt { font-size: 15px; line-height: 1.6; color: var(--slate-500); }

/* ---------- Contact ---------- */
.contact-ico {
  display: flex; flex-shrink: 0; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; background: var(--navy-800); color: #fff;
}
.contact-ico svg { width: 20px; height: 20px; }
.contact-ico + dd { align-self: center; }

.field label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 500; color: var(--navy-800); }
.field input, .field select, .field textarea {
  display: block; width: 100%; border: 1px solid #CBD5E1; border-radius: 12px; background: #F9FAFB;
  padding: 12px 14px; font-size: 16px; line-height: 1.6; color: var(--navy-900);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-800); background: #fff; box-shadow: 0 0 0 4px rgba(30, 41, 59, .1);
}
.field ::placeholder { color: #94A3B8; }
.field [aria-invalid="true"] { border-color: #B42318; background: #FFFBFA; }
.field-error { margin-top: 6px; font-size: 14px; line-height: 1.5; color: #B42318; }
.field-error:empty { display: none; }

.social {
  display: flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 999px; border: 1px solid #334155; color: #CBD5E1; transition: background-color .2s, color .2s, border-color .2s;
}
.social:hover { background: #fff; border-color: #fff; color: var(--navy-900); }
.social svg { width: 18px; height: 18px; }

/* ---------- Elevator rail (section indicator) ---------- */
.rail { display: none; }
@media (min-width: 1440px) {
  .rail {
    --stops: 3; --h: 216px; --pos: 0;
    display: block; position: fixed; z-index: 30; top: 50%; inset-inline-end: 26px;
    width: 26px; height: var(--h); margin-top: calc(var(--h) / -2);
  }
  .rail-shaft { position: absolute; inset-block: -14px; inset-inline-start: 50%; width: 1px; background: #CBD5E1; }
  .rail-stop {
    position: absolute; inset-inline-start: 50%; top: calc(var(--i) / var(--stops) * 100%);
    width: 26px; height: 26px; margin-top: -13px; margin-inline-start: -13px;
  }
  .rail-stop::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; margin: -3.500px;
    border-radius: 50%; background: #fff; border: 1px solid #94A3B8;
  }
  .rail-stop span {
    position: absolute; top: 50%; inset-inline-end: 34px; transform: translateY(-50%);
    padding: 4px 10px; border-radius: 8px; background: var(--navy-900); color: #fff;
    font-size: 12.500px; line-height: 1.5; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s;
  }
  .rail-stop:hover span, .rail-stop:focus-visible span { opacity: 1; }
  .rail-car {
    position: absolute; z-index: 1; pointer-events: none; inset-inline-start: 50%; top: calc(var(--pos) / var(--stops) * 100%);
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 28px; margin-top: -14px; margin-inline-start: -11px;
    border-radius: 5px; background: var(--navy-900); color: var(--signal);
    box-shadow: 0 6px 14px -6px rgba(15, 23, 42, .5);
    transition: top .7s cubic-bezier(.45, 0, .2, 1);
  }
  .rail-car svg { width: 12px; height: 12px; transition: transform .3s; }
  .rail.is-down .rail-car svg { transform: rotate(180deg); }
  /* over the dark contact section, invert so it stays visible */
  .rail.on-dark .rail-shaft { background: #475569; }
  .rail.on-dark .rail-car { background: #fff; color: var(--navy-900); }
  .rail.on-dark .rail-stop span { background: #fff; color: var(--navy-900); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .car { animation: none; }
  .car-b { transform: translateY(-280px); }
  .car-c { transform: translateY(-120px); }
  .rail-car { transition: none; }
}

.ltr-inline { display: inline-block; }
.logo-row img { height: 52px; }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed; z-index: 35; bottom: 20px; inset-inline-end: 20px;
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding-inline: 16px 18px;
  border-radius: 999px; background: #1FA855; color: #fff; font-size: 15px; font-weight: 500;
  box-shadow: 0 10px 26px -10px rgba(15, 23, 42, .55); transition: background-color .2s, bottom .2s;
}
.wa-float:hover { background: #17924A; }
.wa-float svg { width: 22px; height: 22px; }
@media (max-width: 480px) { .wa-float { padding-inline: 13px; } .wa-float span { display: none; } }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed; z-index: 45; bottom: 16px; inset-inline: 16px; max-width: 760px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  padding: 16px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 28px 60px -24px rgba(15, 23, 42, .35);
  font-size: 15px; line-height: 1.7; color: var(--navy-800);
}
.consent p { flex: 1 1 320px; }
.consent p a { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.consent-actions { display: flex; gap: 8px; }
body.has-consent-bar .wa-float { bottom: 200px; }
@media (min-width: 640px) { body.has-consent-bar .wa-float { bottom: 100px; } }

/* Hidden spam trap in the form: invisible to people, tempting to bots. */
.trap { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* Never move hidden things far off to the left: on right-to-left pages that stretches the page
   sideways and phones zoom the whole site out to fit it. */

/* A group of exactly four cards sits in one row of four (or two rows of two), never three plus one. */
@media (min-width: 1180px) { .pg-items:has(> .pg-item:nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Service tiles and drawings ---------- */
.svc-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }
.sector-art img { width: 100%; max-width: 300px; max-height: 100%; height: auto; object-fit: contain; object-position: bottom; }
.pg-item img.pg-art { aspect-ratio: 16 / 9; object-fit: contain; object-position: bottom; background: #F3F4F6; padding: 18px 18px 0; }

/* ---------- Phones ---------- */
@media (max-width: 639px) {
  .section { padding-block: 3.250rem; }
  .hero-art { max-width: 300px; }
  /* sector tiles become compact rows: small drawing beside the text */
  .sector { flex-direction: row; }
  .sector-art { flex: 0 0 96px; height: auto; align-items: center; padding: 12px 10px; }
  .sector-art svg, .sector-art img { max-height: 92px; }
  .sector-body { padding: 16px 16px 18px; }
  .sector-title { font-size: 17px; }
  .sector-text { margin-top: 4px; font-size: 15px; line-height: 1.7; }
  .why-card { padding: 22px 20px 24px; }
  .result { padding: 20px; }
  .pg-item { padding: 20px 20px 22px; }
  .logo-row { gap: 20px 28px; }
  .logo-row img { height: 40px; max-width: 110px; }
  .consent { padding: 14px 16px; font-size: 14px; }
}
