/* ==========================================================
   OptiDev brand tokens
   ========================================================== */
:root {
  --ink: #17142B;
  --paper: #F7F6FB;
  --violet: #5B3DF5;
  --lilac: #9C88FF;

  --ink-80: #3a3654;
  --ink-60: #5e5a78;
  --tint: #EDEAF6;
  --line: #E1DDF0;
  --white: #ffffff;

  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(23, 20, 43, .18);
  --shadow-lg: 0 24px 60px -20px rgba(23, 20, 43, .35);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

main { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: var(--violet); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

.dot { color: var(--violet); }

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }
.btn-primary { background: var(--violet); color: var(--white); box-shadow: 0 8px 20px -8px rgba(91, 61, 245, .6); }
.btn-primary:hover { background: #4a2ee0; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: .6em 1.1em; font-size: .92rem; }
.btn-block { width: 100%; }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would
   make it the containing block for the fixed mobile menu, collapsing it to 0px. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(247, 246, 251, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.menu-open .site-header::before { background: var(--paper); }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px -12px rgba(23, 20, 43, .2); }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 44px; height: auto; }
.brand-mark path { fill: none; stroke: currentColor; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: var(--violet); }
.brand-word { font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; }
.brand-light { color: var(--paper); }
.brand-light .brand-mark circle { fill: var(--lilac); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  color: var(--ink-80); text-decoration: none; font-weight: 500; position: relative;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--violet); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.site-nav a:not(.btn):hover::after,
.site-nav a.active::after { transform: scaleX(1); }
.site-nav a.active { color: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================
   Hero
   ========================================================== */
.hero { padding: 80px 0 100px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }

.eyebrow { font-family: var(--font-mono); color: var(--ink-60); font-size: .95rem; letter-spacing: .02em; }
.highlight {
  background: linear-gradient(transparent 62%, rgba(156, 136, 255, .45) 62%);
}
.lead { font-size: 1.18rem; color: var(--ink-80); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 32px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--ink-60); font-size: .95rem; }
.hero-points li::before { content: "✓"; color: var(--violet); font-weight: 700; margin-right: 8px; }

.hero-visual { position: relative; }
.code-card {
  position: relative; z-index: 2;
  background: var(--ink); color: #d9d4f5;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-2deg);
  transition: transform .4s ease;
}
.code-card:hover { transform: rotate(0deg) scale(1.02); }
.code-card-bar { display: flex; gap: 7px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.code-card-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3b3660; }
.code-card-bar span:first-child { background: var(--violet); }
.code-card-bar span:nth-child(2) { background: var(--lilac); }
.code-card pre { margin: 0; padding: 22px 24px 26px; font: .92rem/1.75 var(--font-mono); overflow-x: auto; }
.code-card .c { color: #7a74a3; }
.code-card .k { color: var(--lilac); }
.code-card .s { color: #c9bfff; }
.code-card .f { color: #fff; font-weight: 700; }

.hero-mark {
  position: absolute; z-index: 1; width: 260px; right: -60px; bottom: -80px; opacity: .14;
}
.hero-mark path { fill: none; stroke: var(--violet); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.hero-mark circle { fill: var(--violet); }

/* ==========================================================
   Sections
   ========================================================== */
.section { padding: 100px 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--ink); color: var(--paper); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head p:last-child { color: var(--ink-60); }

.kicker { font-family: var(--font-mono); font-size: .9rem; color: var(--violet); margin-bottom: .75em; }
.kicker-light { color: var(--lilac); }

/* ==========================================================
   Services
   ========================================================== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.service-card {
  text-align: left; font: inherit; color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover, .service-card:focus-visible {
  transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--lilac); outline: none;
}
.service-card p { color: var(--ink-60); font-size: .98rem; flex: 1; }
.service-card .more { font-weight: 600; color: var(--violet); font-size: .95rem; }
.service-card .more span { display: inline-block; transition: transform .2s ease; }
.service-card:hover .more span { transform: translateX(4px); }

.service-icon {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 20px;
  border-radius: 14px;
  background: var(--ink);
  transition: background .2s ease;
}
.service-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service-card:hover .service-icon { background: var(--violet); }

/* ==========================================================
   Finder
   ========================================================== */
.finder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.finder-form { display: grid; gap: 10px; margin-top: 24px; }

.check {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.check:hover { border-color: var(--lilac); }
.check input {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 22px; height: 22px; margin: 0;
  border: 2px solid var(--ink-60); border-radius: 6px;
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.check input::after {
  content: ""; width: 6px; height: 11px; border: solid var(--white); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px) scale(0); transition: transform .15s ease;
}
.check input:checked { background: var(--violet); border-color: var(--violet); }
.check input:checked::after { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.check input:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; }
.check:has(input:checked) { border-color: var(--violet); background: #f3f0ff; }

.finder-result {
  position: sticky; top: 100px;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  min-height: 340px;
  box-shadow: var(--shadow-lg);
}
.finder-empty { height: 100%; min-height: 276px; display: grid; place-content: center; text-align: center; color: #a9a3c9; }
.finder-mark { width: 90px; margin: 0 auto 16px; opacity: .6; }
.finder-mark path { fill: none; stroke: var(--paper); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.finder-mark circle { fill: var(--lilac); }

.finder-result h3 { font-size: 1rem; font-family: var(--font-mono); font-weight: 400; color: var(--lilac); margin-bottom: 18px; }
.rec-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.rec-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  animation: pop .3s ease both;
}
.rec-list .rec-num { font-family: var(--font-mono); color: var(--lilac); font-size: .85rem; padding-top: 2px; }
.rec-list strong { display: block; }
.rec-list span.why { color: #b7b1d6; font-size: .92rem; }
.finder-result .btn-primary { box-shadow: none; }

@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ==========================================================
   Process
   ========================================================== */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.process li {
  position: relative;
  padding: 28px 24px;
  border-top: 3px solid var(--ink);
}
.process li:hover { border-color: var(--violet); }
.step-num { font-family: var(--font-mono); font-size: .9rem; color: var(--violet); display: block; margin-bottom: 14px; }
.process p { color: var(--ink-60); font-size: .98rem; }

/* ==========================================================
   About
   ========================================================== */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 880px; margin: 0 auto; }
.team-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--lilac); }
.team-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-size: 1.5rem; font-weight: 700; margin-bottom: 18px;
  transition: background .2s ease;
}
.team-card:hover .team-avatar { background: var(--violet); }
.team-tag { font-family: var(--font-mono); font-size: .85rem; color: var(--violet); margin-bottom: .4em; }
.team-card h3 { margin-bottom: .2em; }
.team-role { font-weight: 600; color: var(--ink-80); font-size: .95rem; }
.team-card p:not(.team-tag):not(.team-role) { color: var(--ink-60); font-size: .98rem; flex: 1; }
.team-contact {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
  font-weight: 600; font-size: .95rem; color: var(--ink-80); text-decoration: none;
  transition: color .2s ease;
}
.team-contact span { word-break: break-all; }
.team-contact svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.team-contact:hover { color: var(--violet); }
.team-contact:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; border-radius: 4px; }

/* ==========================================================
   Why
   ========================================================== */
.why-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.why-list li {
  padding: 20px 22px 20px 56px; position: relative;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #c9c4e3;
}
.why-list li::before {
  content: ""; position: absolute; left: 22px; top: 27px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--lilac);
}
.why-list strong { color: var(--paper); }

/* ==========================================================
   FAQ
   ========================================================== */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 24px; transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--lilac); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.4rem; color: var(--violet);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-60); padding-bottom: 20px; margin: 0; }

/* ==========================================================
   Contact
   ========================================================== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-details { list-style: none; padding: 0; margin: 28px 0 0; }
.contact-details li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.contact-details li + li { margin-top: 12px; }
.contact-details svg { width: 22px; height: 22px; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-details a { color: var(--ink); }

.contact-form {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; gap: 18px;
}
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: 6px; }
.field input, .field textarea {
  font: inherit; color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(91, 61, 245, .15); }
.field input.invalid { border-color: #d6455d; }
.field textarea { resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper);
  font-size: .9rem; font-weight: 500; cursor: pointer; user-select: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip span:hover { border-color: var(--lilac); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--lilac); outline-offset: 2px; }

.form-note { margin: 0; font-size: .92rem; min-height: 1.4em; }
.form-note.error { color: #c23a52; }
.form-note.ok { color: var(--violet); }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer { background: var(--ink); color: #a9a3c9; padding: 48px 0; }
.footer-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-tag { font-family: var(--font-mono); margin: 0; }
.footer-tag .dot { color: var(--lilac); }
.footer-copy { margin: 0; font-size: .9rem; }

/* ==========================================================
   Service dialog
   ========================================================== */
.service-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  border: 0; border-radius: 22px; padding: 0;
  background: var(--white); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.service-dialog::backdrop { background: rgba(23, 20, 43, .6); backdrop-filter: blur(4px); }
.service-dialog[open] { animation: dialog-in .25s ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.dialog-body { padding: 40px; }
.dialog-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--tint); color: var(--ink);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.dialog-close:hover { background: var(--ink); color: var(--paper); }
.dialog-summary { color: var(--ink-60); font-size: 1.05rem; }
.dialog-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; margin: 28px 0 32px; }
.dialog-cols h4 { font-family: var(--font-mono); font-weight: 400; font-size: .9rem; color: var(--violet); }
/* Stays in view while the details scroll on short screens, settling back at the end. */
#dialog-cta { position: sticky; bottom: 20px; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: .97rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .35em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-4.8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.ticks-soft li::before { background-color: var(--lilac); }

/* ==========================================================
   Reveal on scroll
   ========================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   Finder: floating "view suggestions" pill (mobile only)
   ========================================================== */
.finder-pill {
  position: fixed; z-index: 40;
  left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  display: none;
  padding: .85em 1.4em;
  border: 0; border-radius: 999px;
  background: var(--violet); color: var(--white);
  font: 600 .98rem/1 var(--font-sans);
  box-shadow: 0 12px 30px -8px rgba(91, 61, 245, .7);
  cursor: pointer;
  transition: transform .25s ease;
}
.finder-pill.show { transform: translate(-50%, 0); }

/* ==========================================================
   Responsive
   ========================================================== */

/* Tablet */
@media (max-width: 1000px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { gap: 40px; }
}

/* Mobile menu + single-column layouts */
@media (max-width: 860px) {
  html { scroll-padding-top: 72px; }
  .nav-wrap { height: 64px; }
  .brand-mark { width: 38px; }
  .brand-word { font-size: 1.4rem; }

  .nav-toggle { display: block; margin-right: -8px; }
  .site-nav {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px calc(32px + env(safe-area-inset-bottom));
    background: var(--paper);
    overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .site-nav.open {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav a:not(.btn) {
    padding: 18px 0; font-size: 1.25rem; color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav a.active { color: var(--violet); }
  .site-nav .btn { margin-top: 24px; padding: 1em; font-size: 1.05rem; }
  .site-nav { overscroll-behavior: contain; }

  /* Scroll lock while the menu is open. Mobile browsers ignore overflow:hidden for
     touch scrolling, so the body is pinned in place (see setMenu in main.js) and
     the header is fixed so the close button can't scroll away. */
  body.menu-open { position: fixed; left: 0; right: 0; overflow: hidden; }
  body.menu-open .site-header { position: fixed; left: 0; right: 0; top: 0; }

  .hero { padding: 40px 0 64px; }
  .hero-grid, .finder-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; }
  .code-card { transform: none; }
  .code-card:hover { transform: none; }
  .hero-mark { width: 180px; right: -30px; bottom: -50px; }

  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }

  .finder-result { position: static; min-height: 0; }
  .finder-empty { min-height: 160px; }
  .finder-pill { display: block; }

  .contact-form { box-shadow: none; }
}

/* Phones */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  h2 { font-size: clamp(1.7rem, 7vw, 2rem); }
  .lead { font-size: 1.05rem; }

  .hero { padding: 28px 0 56px; }
  .hero-actions { flex-direction: column; align-items: stretch; margin: 24px 0 24px; }
  .hero-actions .btn { padding: 1em 1.5em; }
  .hero-points { flex-direction: column; gap: 6px; }
  .code-card pre { font-size: .76rem; padding: 16px; }
  .hero-mark { display: none; }

  .section { padding: 56px 0; }
  .section-head { text-align: left; margin-bottom: 32px; }

  .services-grid { grid-template-columns: 1fr; gap: 14px; }
  .team-grid { grid-template-columns: 1fr; gap: 14px; }
  .service-card { padding: 22px 20px; }
  .service-card:hover { transform: none; }
  .service-icon { width: 46px; height: 46px; margin-bottom: 14px; }

  .check { padding: 14px; min-height: 56px; }

  .process { grid-template-columns: 1fr; gap: 0; }
  .process li { padding: 20px 0 20px 52px; border-top: 0; border-left: 2px solid var(--line); margin-left: 14px; }
  .process li:last-child { border-left-color: transparent; }
  .process .step-num {
    position: absolute; left: -15px; top: 18px;
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ink); color: var(--paper); font-size: .7rem;
  }
  .process li:hover .step-num { background: var(--violet); }

  .why-list li { padding: 18px 18px 18px 46px; }
  .why-list li::before { left: 18px; top: 25px; }

  .faq details { padding: 0 18px; }
  .faq summary { padding: 18px 0; font-size: 1rem; }

  .contact-form, .finder-result { padding: 24px 18px; }
  .chip span { padding: 10px 14px; }
  .field input, .field textarea { font-size: 16px; } /* stops iOS zooming on focus */

  .footer-wrap { flex-direction: column; text-align: center; }

  /* Service details become a bottom sheet */
  .service-dialog {
    width: 100%; max-width: 100%;
    max-height: 88vh; max-height: 88dvh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
  .service-dialog[open] { animation: sheet-in .3s ease; }
  .dialog-body { padding: 36px 20px calc(24px + env(safe-area-inset-bottom)); }
  .dialog-body::before {
    content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; border-radius: 4px; background: var(--line);
  }
  .dialog-close { top: 14px; right: 14px; }
  .dialog-cols { grid-template-columns: 1fr; gap: 22px; margin: 22px 0 26px; }
  #dialog-cta { width: 100%; }
}

@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
