/* ===== 1. DESIGN SETTINGS ===== */
:root {
  --navy: #0A2540;
  --deep: #071B30;
  --panel: #0F3154;
  --text: #F4F9FD;
  --muted: #B7C9DB;
  --accent: #38BDF8;      /* buttons, second headline color, icons, highlights */
  --accent-light: #7DD3FC;
  --line: #2A5078;
  --field: #7C9DBD;
  --error: #FFB4B4;
  --font: "Archivo", "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

/* ===== 2. BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { background: var(--navy); color: var(--text); font: 400 1.0625rem/1.6 var(--font); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 3px; }

h1, h2, h3 { font-stretch: 125%; font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.5rem); }
h3 { font-size: 1.35rem; }
.tone { color: var(--accent); }
.section { padding: clamp(5rem, 10vw, 9.5rem) var(--gutter); }
.section__intro { margin-top: 1rem; max-width: 40rem; color: var(--muted); font-size: 1.15rem; }
.section--deep { background: var(--deep); }

.skip-link { position: fixed; top: 0; left: 0; z-index: 100; padding: 0.75rem 1rem; background: var(--accent); color: var(--navy); transform: translateY(-110%); }
.skip-link:focus { transform: none; }

/* ===== 3. BUTTONS ===== */
.btn {
  display: inline-block; padding: 0.85rem 1.5rem;
  border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-weight: 700; text-align: center; text-decoration: none;
  cursor: pointer; transition: background-color 0.2s;
}
.btn--main { background: var(--accent); color: var(--navy); }
.btn--main:hover { background: var(--accent-light); }
.btn--main[aria-disabled="true"] { background: var(--field); cursor: default; }
.btn--outline { border-color: currentColor; background: none; color: inherit; }
.btn--outline:hover { background: rgb(255 255 255 / 0.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ===== 4. NAVIGATION ===== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  min-height: 4rem; padding: 0.65rem var(--gutter); transition: background-color 0.3s;
}
.nav--solid { background: var(--deep); }
.nav--page { position: sticky; }
.logo { flex: none; text-decoration: none; }
.logo img { width: auto; height: 1.75rem; }
.nav__links { display: none; gap: 1.6rem; }
.nav__links a { padding: 0.4rem 0; text-decoration: none; white-space: nowrap; }
.nav__links a:hover { text-decoration: underline; }
.nav__cta { display: none; padding: 0.6rem 1rem; white-space: nowrap; }

/* ===== 5. OPENING ===== */
.hero {
  position: relative; display: flex; flex-direction: column; gap: 1.5rem;
  min-height: 100vh; min-height: 100svh;
  padding: 6.5rem var(--gutter) 6rem; overflow: hidden;
}
.hero__symbol { align-self: flex-end; width: min(70vw, 40rem); height: auto; max-height: 24vh; margin-bottom: auto; object-fit: contain; object-position: right; }
.hero__copy { position: relative; z-index: 1; max-width: 50rem; }
.hero__copy > p { margin: 1.1rem 0 1.9rem; color: var(--muted); font-size: 1.2rem; }
.hero__copy > .hero__tagline { margin: 0 0 0.9rem; color: var(--accent); font-size: 1.1rem; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 1rem; margin-top: 2.25rem; padding: 0; list-style: none; }
.stats li { padding-left: 0.9rem; border-left: 3px solid var(--accent); }
.stats strong { display: block; font-size: 1.5rem; font-stretch: 125%; line-height: 1.2; }
.stats span { color: var(--muted); font-size: 0.95rem; }
.stats .stat--empty { padding: 0.5rem 0.9rem; border: 1px dashed var(--field); border-radius: 8px; }
.motion-toggle {
  position: absolute; left: var(--gutter); bottom: 1.25rem; z-index: 1;
  padding: 0.5rem 0.9rem; border: 1px solid var(--field); border-radius: 8px;
  background: none; color: inherit; font: inherit; font-size: 0.95rem; cursor: pointer;
}
.motion-toggle:hover { background: rgb(255 255 255 / 0.1); }

/* ===== 6. ABOUT ===== */
.about { display: grid; gap: 2rem; }
.about__text { max-width: 34rem; }
.about__text p + p { margin-top: 1.25rem; color: var(--muted); }
.lead { font-size: 1.3rem; line-height: 1.5; }

/* ===== 7. FLOW ===== */
.flow { overflow: hidden; padding-top: clamp(4rem, 8vw, 7rem); background: var(--navy); }
.flow h2 { padding: 0 var(--gutter); }
.flow__art { width: 100%; height: auto; padding: 2rem 0 3rem; }
.flow__lines { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 190 46; animation: flow 5s linear infinite; }
.flow__lines path:nth-child(even) { animation: flow 3.5s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -236; } }

/* ===== 8. SERVICES ===== */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0; }
.tab { padding: 0.65rem 1.4rem; border: 1px solid var(--field); border-radius: 8px; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.tab:hover { border-color: var(--text); }
.tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: var(--navy); }
.service { display: grid; gap: 0.4rem; padding: 1.75rem 0; border-top: 1px solid var(--line); animation: rise 0.45s var(--ease) both; }
.service:last-child { border-bottom: 1px solid var(--line); }
.service p { max-width: 38rem; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ===== 9. PROCESS ===== */
.steps { display: grid; gap: 1.5rem; margin-top: 3rem; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; padding: 2rem 1.75rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.step__icon { width: 3rem; height: 3rem; margin-bottom: 1.25rem; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.step__num { display: block; margin-bottom: 0.4rem; color: var(--accent); font-size: 0.95rem; font-stretch: 100%; letter-spacing: 0; }
.step__sub { margin-top: 0.5rem; color: var(--muted); }
.step ul { display: grid; gap: 0.6rem; margin: 1.25rem 0 0; padding-left: 1.2rem; list-style: disc; }
.step ul li::marker { color: var(--accent); }
.step__help { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.step__help strong { display: block; color: var(--accent); }
.steps__cta { margin-top: 2.5rem; }

/* ===== 10. FAQ ===== */
.faq__list { max-width: 54rem; margin-top: 3rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 1.35rem 3rem 1.35rem 0; font-size: 1.15rem; font-weight: 600; line-height: 1.35; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; top: 2.05rem; right: 0.5rem; width: 1.1rem; height: 3px; background: var(--accent); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { display: none; }
.faq summary:hover { color: var(--accent); }
.faq details p { max-width: 46rem; padding-bottom: 1.5rem; color: var(--muted); }

/* ===== 11. FORM ===== */
.contact { display: grid; gap: 3rem; }
.contact__text > p { margin-top: 1.25rem; color: var(--muted); }
.contact__next { display: grid; gap: 0.9rem; margin: 2rem 0 0; padding-left: 1.3rem; }
.contact__next li::marker { color: var(--accent); font-weight: 700; }
.contact__text > .contact__lines { margin-top: 2rem; color: var(--text); line-height: 2; overflow-wrap: anywhere; }
.card { min-width: 0; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.form { display: grid; gap: 1.25rem; }
.form label { display: block; font-weight: 600; }
.form .optional { color: var(--muted); font-weight: 400; }
.form input:not([type="checkbox"]), .form select {
  display: block; width: 100%; min-height: 3.1rem; margin-top: 0.4rem; padding: 0.7rem 0.9rem;
  border: 1px solid var(--field); border-radius: 8px;
  background: var(--deep); color: var(--text); font: inherit;
}
.form [aria-invalid="true"] { border-color: var(--error) !important; outline: 1px solid var(--error); }
.form [aria-invalid="true"]:focus-visible { outline: 3px solid var(--accent-light); }
.form .check { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; font-weight: 400; }
.form .check input { width: 1.35rem; height: 1.35rem; margin-top: 0.15rem; accent-color: var(--accent); }
.form .btn { width: 100%; font-size: 1.1rem; }
.form__error { margin-top: 0.4rem; color: var(--error); }
.form__alert { padding: 0.8rem 1rem; border: 1px solid var(--error); border-radius: 8px; color: var(--error); }
.form__note { color: var(--muted); font-size: 0.95rem; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { display: grid; justify-items: start; gap: 1rem; }
.done:focus { outline: none; }
.done svg { width: 4rem; height: 4rem; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done p { color: var(--muted); }

/* ===== 12. FOOTER AND PHONE BAR ===== */
.footer { display: grid; gap: 1.5rem; padding: 3rem var(--gutter) 7rem; border-top: 1px solid var(--line); background: var(--deep); }
.footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.footer__details { color: var(--muted); overflow-wrap: anywhere; }
.callbar {
  position: fixed; inset: auto 0 0; z-index: 9;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--deep); transform: translateY(100%); visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0.35s;
}
.callbar--show { transform: none; visibility: visible; }
.callbar .btn { display: block; }

/* ===== 13. LEGAL PAGES AND ACCESSIBILITY ===== */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.motion-off *, .motion-off *::before, .motion-off *::after { animation: none !important; transition: none !important; }
.motion-off .reveal { opacity: 1 !important; transform: none !important; }
.legal { max-width: 48rem; margin: 0 auto; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.legal h2 { margin: 2.5rem 0 0.75rem; font-size: 1.5rem; }
.legal p, .legal li { margin-top: 0.75rem; }
.legal table { width: 100%; margin-top: 1rem; border-collapse: collapse; }
.legal th, .legal td { padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-scroll { overflow-x: auto; }

/* ===== 14. SCROLL REVEAL ===== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ===== 15. LARGER SCREENS ===== */
@media (min-width: 560px) { .nav__cta { display: inline-block; } }
@media (min-width: 760px) {
  .callbar { display: none; }
  .logo img { height: 2.2rem; }
  .about { grid-template-columns: 1.2fr 1fr; gap: clamp(3rem, 7vw, 7rem); }
  .service { grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: baseline; }
  .footer { grid-template-columns: 1fr auto; align-items: center; padding-bottom: 3rem; }
  .footer__details, .footer nav { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step ul { flex: 1 0 auto; align-content: start; }
  .hero { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 3rem; }
  .hero__symbol { flex: 0 1 36vw; min-width: 0; width: 36vw; max-height: none; margin: 0; align-self: center; }
  .hero__copy { flex: 1 1 auto; min-width: 0; }
  .hero h1 { font-size: clamp(2.6rem, 4.3vw, 5rem); }
  .contact { grid-template-columns: 1fr 1.1fr; gap: clamp(3rem, 6vw, 7rem); align-items: start; }
}
@media (min-width: 1150px) { .nav__links { display: flex; } }

/* ===== 16. REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
