/* ==========================================================================
   Design tokens — light by default, dark when the visitor's system is dark.
   Type: Bricolage Grotesque (headings) + Public Sans (text), system fallbacks.
   ========================================================================== */
:root {
  color-scheme: light dark;

  --bg: #F3F6F4;
  --surface: #FFFFFF;
  --tint: #E8EFEC;
  --ink: #10242B;
  --muted: #4B6068;
  --line: #D3DEDA;
  --field-line: #6F8A90;
  --primary: #0B5C6B;
  --primary-hover: #08454F;
  --primary-ink: #FFFFFF;
  --accent: #F2B134;
  --focus: #0B5C6B;
  --ok: #1E8A5E;
  --danger: #B3261E;

  --panel: #0E2A33;
  --panel-ink: #FFFFFF;
  --panel-muted: #BCD0D4;
  --panel-line: rgba(255, 255, 255, 0.3);

  --ok-bg: #E3F4EC;
  --ok-ink: #0F5A3C;
  --err-bg: #FBE9E7;
  --err-ink: #8C1D18;
  --warn-bg: #FFF1D0;
  --warn-ink: #5A3B00;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* spacing rhythm: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 72 / 112 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;

  --r-btn: 12px;
  --r-card: 18px;
  --r-dialog: 24px;
  --r-panel: 28px;

  --nav-h: 64px;
  --section-pad: clamp(64px, 9vw, 112px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C171A;
    --surface: #152428;
    --tint: #101F23;
    --ink: #E8F0EE;
    --muted: #A3B8B6;
    --line: #26393E;
    --field-line: #6E8C92;
    --primary: #62C0D1;
    --primary-hover: #86D3E0;
    --primary-ink: #06242A;
    --focus: #62C0D1;
    --ok: #5BD69C;
    --danger: #FF8A80;

    --panel: #12303A;
    --panel-ink: #E8F0EE;
    --panel-muted: #B2C8CB;
    --panel-line: rgba(232, 240, 238, 0.28);

    --ok-bg: #123B2C;
    --ok-ink: #9FE8C5;
    --err-bg: #3E1B19;
    --err-ink: #FFB4AB;
    --warn-bg: #3B2D0E;
    --warn-ink: #FFD58A;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.modal-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Content appears once the spreadsheets are read, so nothing jumps around. */
html:not(.is-ready) main,
html:not(.is-ready) .site-footer { visibility: hidden; }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.contact-copy :focus-visible { outline-color: #FFFFFF; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 720px) { .container { padding-inline: 32px; } }

.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.lead { color: var(--muted); font-size: 1.1875rem; max-width: 56ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  border: 2px solid transparent; border-radius: var(--r-btn);
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .9375rem; }
.btn[disabled] { opacity: .65; cursor: progress; }

.avatar { border-radius: 50%; object-fit: cover; background: var(--tint); flex: none; }
.avatar-sm { width: 36px; height: 36px; }
.avatar:not(.avatar-sm) { width: 48px; height: 48px; }

/* ---------- notices ---------- */
.csv-notice { background: var(--warn-bg); color: var(--warn-ink); padding: 14px 0; font-size: .9375rem; }
.csv-notice .container > * + * { margin-top: 6px; }
.notice-title { font-weight: 700; }
.notice { border: 1px dashed var(--field-line); border-radius: 12px; padding: 16px 20px; color: var(--muted); }
.noscript { padding: 24px 20px; text-align: center; }

/* ==========================================================================
   Header and navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; padding-block: 8px 0; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0;
  color: var(--ink); text-decoration: none; font: 700 1.125rem/1.2 var(--font-display); padding-block: 6px;
}
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { order: 3; flex: 0 0 100%; min-width: 0; }
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-inline: -8px; padding-inline: 8px; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: block; padding: 10px 12px; white-space: nowrap;
  color: var(--muted); font-weight: 500; font-size: .9375rem; text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current] { color: var(--ink); border-bottom-color: var(--primary); }
.nav-cta { display: none; }

@media (min-width: 860px) {
  .header-row { flex-wrap: nowrap; padding-block: 0; min-height: 68px; }
  .brand { flex: 0 0 auto; max-width: 280px; }
  .nav { order: 0; flex: 1 1 auto; display: flex; justify-content: flex-end; }
  .nav-links { margin-inline: 0; padding-inline: 0; gap: 8px; }
  .nav-links a { padding-block: 22px 19px; }
  .nav-cta { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

.hero { padding-block: clamp(36px, 7vw, 88px) clamp(48px, 8vw, 104px); }
.hero-grid { display: grid; gap: var(--s7); align-items: center; }
.hero-copy > * + * { margin-top: var(--s5); }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 4.8vw, 4.5rem); font-weight: 700; max-width: 13ch; letter-spacing: -0.025em; line-height: 1.04; }
.hero-actions { margin-top: var(--s6); }
.hero-art { margin: 0; }
.hero-art img { width: 100%; max-width: 560px; margin-inline: auto; border-radius: var(--r-panel); }

.availability {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: .9375rem; font-weight: 500;
}
.availability::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.availability[data-state="limited"]::before { background: var(--accent); }
.availability[data-state="booked"]::before { background: var(--muted); }

.byline { display: flex; align-items: center; gap: 14px; margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); max-width: 460px; }
.byline p { line-height: 1.35; }
.byline strong { display: block; font-weight: 600; }
.byline span { color: var(--muted); font-size: .9375rem; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.08fr .92fr; gap: var(--s8); }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section-pad); }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: var(--s7); }
.section-head h2 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.75rem); font-weight: 700; }
.section-head .lead { margin-top: var(--s3); }

/* ---------- sample websites ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s6); }
.chip {
  min-height: 44px; padding: 8px 18px; border: 1px solid var(--field-line); border-radius: 999px;
  background: transparent; color: var(--ink); font: 500 .9375rem/1 var(--font-body); cursor: pointer;
}
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

.sample-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--s5); }
.sample-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  transition: border-color .15s;
}
.sample-card:hover { border-color: var(--primary); }
.sample-media { position: relative; aspect-ratio: 16 / 10; background: var(--tint); }
.sample-media img { width: 100%; height: 100%; object-fit: cover; }
.sample-media .badge { position: absolute; top: 12px; left: 12px; }
.sample-body { display: flex; flex-direction: column; flex: 1; gap: var(--s3); padding: var(--s5) var(--s5) var(--s5); }
.sample-industry { color: var(--muted); font-size: .9375rem; font-weight: 500; }
.sample-title { font-size: 1.5rem; font-weight: 600; }
.card-open {
  all: unset; box-sizing: border-box; cursor: pointer; color: var(--ink);
}
.card-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.card-open:focus-visible { outline: none; }
.card-open:focus-visible::after { outline: 3px solid var(--focus); outline-offset: -3px; }
.sample-summary { color: var(--muted); }
.card-more { margin-top: auto; padding-top: var(--s2); color: var(--primary); font-weight: 600; }
.sample-card:hover .card-more { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  font-size: .8125rem; font-weight: 600; line-height: 1.4;
}
.badge.is-live { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

.check-list { display: grid; gap: var(--s2); }
.check-list li { position: relative; padding-left: 26px; font-size: .9375rem; line-height: 1.45; }
.check-list li::before {
  content: ""; position: absolute; left: 4px; top: .32em; width: 6px; height: 11px;
  border: solid var(--primary); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.check-list li.more { color: var(--muted); }
.check-list li.more::before { display: none; }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: var(--s7) var(--s6); }
.service { position: relative; padding-top: var(--s5); border-top: 1px solid var(--line); }
.service::before { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 3px; background: var(--primary); }
.service h3 { font-size: 1.3125rem; font-weight: 600; }
.service p { margin-top: var(--s3); color: var(--muted); }
.service .price-note { color: var(--primary); font-weight: 600; }

/* ---------- process ---------- */
.process-layout, .faq-layout { display: grid; gap: var(--s6); }
.steps { counter-reset: none; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: var(--s4); padding-block: var(--s5); border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num { font: 700 2.5rem/1 var(--font-display); color: var(--primary); }
.step h3 { font-size: 1.3125rem; font-weight: 600; }
.step p { margin-top: var(--s2); color: var(--muted); max-width: 52ch; }

@media (min-width: 900px) {
  .process-layout, .faq-layout { grid-template-columns: 5fr 7fr; gap: var(--s8); align-items: start; }
  .process-layout .section-head, .faq-layout .section-head { position: sticky; top: calc(var(--nav-h) + var(--s6)); margin-bottom: 0; }
  .step { grid-template-columns: 72px 1fr; }
}

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 56px; padding-block: var(--s4); cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.125rem; line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font: 400 1.75rem/1 var(--font-body); color: var(--primary); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding-bottom: var(--s5); color: var(--muted); max-width: 60ch; }

/* ---------- contact ---------- */
.section-contact { padding-top: var(--s7); }
.contact-panel {
  display: grid; gap: var(--s7);
  background: var(--panel); color: var(--panel-ink);
  border-radius: var(--r-panel); padding: clamp(28px, 5vw, 64px);
}
.contact-copy h2 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.75rem); font-weight: 700; }
.contact-copy .lead { color: var(--panel-muted); margin-top: var(--s3); }
.contact-about { display: flex; align-items: flex-start; gap: var(--s4); margin-top: var(--s6); }
.contact-name { font-weight: 600; }
.contact-bio { color: var(--panel-muted); font-size: .9375rem; max-width: 46ch; }
.contact-empty { margin-top: var(--s5); color: var(--panel-muted); }

.chat-buttons { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.chat-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px;
  border: 1px solid var(--panel-line); border-radius: var(--r-btn);
  background: rgba(255, 255, 255, 0.08); color: var(--panel-ink);
  font-weight: 600; text-decoration: none;
  transition: background-color .15s;
}
.chat-btn:hover { background: rgba(255, 255, 255, 0.18); }
.chat-icon { display: inline-flex; }

.form-mount { background: var(--surface); color: var(--ink); border-radius: var(--r-card); padding: clamp(20px, 3vw, 32px); }
.contact-form { display: grid; gap: var(--s5); }
.field { display: grid; gap: var(--s2); }
.field label { font-weight: 600; font-size: .9375rem; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  background: var(--bg); color: var(--ink);
  border: 1.5px solid var(--field-line); border-radius: 10px; font: inherit;
}
.field textarea { resize: vertical; min-height: 128px; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .875rem; font-weight: 500; }
.field-check label { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; line-height: 1.45; }
.field-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { padding: 14px 16px; border-radius: 10px; font-weight: 500; }
.form-status.is-success { background: var(--ok-bg); color: var(--ok-ink); }
.form-status.is-error { background: var(--err-bg); color: var(--err-ink); }

@media (min-width: 900px) {
  .contact-panel.has-form { grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: start; }
}

/* ---------- footer ---------- */
.site-footer { padding-block: var(--s6) var(--s7); color: var(--muted); font-size: .9375rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); }

/* ==========================================================================
   Chat bar that stays one tap away on phones
   ========================================================================== */
.dock { display: none; }
@media (max-width: 719px) {
  body.has-dock { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(var(--dock-count, 1), 1fr); gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--line);
  }
}
.dock-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; padding: 6px 4px; border-radius: 12px;
  color: var(--ink); font-size: .75rem; font-weight: 600; text-decoration: none;
}
.dock-btn .chat-icon { color: var(--primary); }
.dock-btn:active { background: var(--tint); }

/* ==========================================================================
   Details dialog and carousel
   ========================================================================== */
.sample-dialog {
  width: min(1040px, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: var(--r-dialog); overflow: auto;
  background: var(--surface); color: var(--ink);
  overscroll-behavior: contain;
}
.sample-dialog::backdrop { background: rgba(6, 18, 22, 0.66); }
.sample-dialog[open] { animation: dlg-in .18s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dlg-close {
  position: sticky; top: 12px; z-index: 5; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 12px 12px -56px auto; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
}
.dlg-close:hover { border-color: var(--primary); }
.dlg-grid { display: grid; }
.carousel { position: relative; background: var(--tint); min-width: 0; }
.track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.slide img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
}
.car-btn:disabled { opacity: .35; cursor: default; }
.car-prev { left: 12px; }
.car-next { right: 12px; }
.car-foot { display: contents; }
.dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; padding: 2px 8px; border-radius: 999px; background: rgba(8, 24, 28, 0.62);
}
.dot { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.dot::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #FFFFFF; opacity: .5; }
.dot[aria-current="true"]::before { opacity: 1; }
.car-count {
  position: absolute; top: 12px; left: 12px; padding: 2px 10px; border-radius: 999px;
  background: rgba(8, 24, 28, 0.7); color: #FFFFFF; font-size: .8125rem; font-weight: 600;
}
.dlg-info { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); padding: var(--s6) var(--s5) var(--s6); }
.dlg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.dlg-info h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); font-weight: 700; }
.dlg-summary { color: var(--muted); }
.dlg-info .btn { margin-top: var(--s2); }

@media (min-width: 860px) {
  .dlg-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .dlg-info { padding: var(--s8) var(--s6) var(--s6); }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sample-dialog[open] { animation: none; }
  * { transition-duration: .01ms !important; }
}
