/* Zenvica X — ridge silhouette + terrace sections. Palette from logo. */
:root {
  --deep: #070f3e;
  --navy: #00167a;
  --royal: #00187c;
  --mid: #162881;
  --slope: #142368;
  --mist: #99a2cd;
  --ice: #d2dbff;
  --paper: #f4f6fb;
  --frost: #eef1fa;
  --white: #ffffff;
  --ink: #070f3e;
  --text: #121a4a;
  --muted: #4a5588;
  --on-dark: #f4f6fb;
  --on-dark-muted: #d2dbff;
  --line: rgba(210, 219, 255, 0.22);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --maxw: 1120px;
  --serif: "Vollkorn", Georgia, "Times New Roman", serif;
  --sans: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name, blockquote {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); color: var(--ink); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); color: inherit; }
h3 { font-size: 1.35rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
address { font-style: normal; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--royal); color: var(--on-dark); padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { left: 0; }

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin: 0 0 12px;
}
.kicker-ink { color: var(--royal); }

.lede { margin-top: 14px; max-width: 40rem; color: var(--muted); font-size: 1.05rem; }
.terrace-deep .lede { color: var(--on-dark-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-primary {
  background: var(--royal);
  color: var(--on-dark);
  box-shadow: 0 14px 30px -14px rgba(0, 22, 122, 0.55);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(7, 15, 62, 0.28);
}
.terrace-deep .btn-primary {
  background: var(--ice);
  color: var(--deep);
}

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(244, 246, 251, 0.9);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: rgba(22, 40, 129, 0.12);
  box-shadow: 0 8px 30px -22px rgba(7, 15, 62, 0.5);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img {
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 4px 14px -8px rgba(7, 15, 62, 0.45);
}
.brand-name { font-size: 1.2rem; color: var(--ink); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  transition: color .2s var(--ease), transform .25s var(--ease);
}
.nav .nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 24, 124, 0.28);
  color: var(--royal);
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--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 {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(ellipse 70% 50% at 80% 8%, rgba(210, 219, 255, 0.85), transparent 60%),
    linear-gradient(180deg, #f7f8fd 0%, #dce2f6 42%, #99a2cd 100%);
  overflow: hidden;
  padding: 120px 0 0;
}
.hero-copy {
  position: relative; z-index: 3;
  padding-bottom: 8vh;
  max-width: 820px;
  margin-left: auto; margin-right: auto;
}
.hero-copy h1 { max-width: 16ch; }
.hero-sub {
  margin-top: 18px;
  max-width: 38rem;
  font-size: 1.08rem;
  color: var(--text);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.mist {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 1;
  filter: blur(42px);
  background: rgba(210, 219, 255, 0.55);
  animation: mistDrift 22s ease-in-out infinite;
}
.mist-a { width: 340px; height: 160px; top: 12%; left: -40px; }
.mist-b { width: 420px; height: 180px; top: 22%; right: -80px; animation-duration: 28s; animation-delay: -6s; background: rgba(153, 162, 205, 0.4); }
.mist-c { width: 280px; height: 120px; top: 38%; left: 32%; animation-duration: 18s; animation-delay: -11s; }

@keyframes mistDrift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(36px, -16px, 0); }
}

.ridge-stage {
  position: relative; z-index: 2;
  width: 100%; height: 38vh; min-height: 220px;
  margin-top: auto;
}
.ridge-svg { display: block; width: 100%; height: 100%; }

.ridge-stroke {
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  animation: drawRidge 2.6s var(--ease) 0.25s forwards;
}
.ridge-far { animation: riseRidge 1.4s var(--ease) both; }
.ridge-mid { animation: riseRidge 1.5s var(--ease) 0.12s both; }
.ridge-near { animation: riseRidge 1.6s var(--ease) 0.22s both; }

@keyframes drawRidge {
  to { stroke-dashoffset: 0; }
}
@keyframes riseRidge {
  from { transform: translateY(28px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

/* Terraces stacked like ridgelines */
.terrace {
  position: relative;
  padding: 96px 0 88px;
  margin-top: -1px;
}
.terrace-cap {
  position: absolute;
  top: -52px; left: 0;
  width: 100%; height: 56px;
  display: block;
  pointer-events: none;
}
.terrace-inner { position: relative; z-index: 1; }

.terrace-ice { background: var(--frost); color: var(--text); }
.terrace-paper { background: var(--paper); color: var(--text); }
.terrace-deep {
  background: var(--deep);
  color: var(--on-dark);
}
.terrace-deep h2, .terrace-deep h3 { color: var(--on-dark); }
.quote-terrace { background: var(--royal); }

.section-head { max-width: 40rem; margin-bottom: 40px; }

/* About terrace */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}
.about-copy { display: grid; gap: 16px; color: var(--text); font-size: 1.02rem; }

/* Work ledges: stepped like terraces */
.ledges { display: grid; gap: 14px; }
.ledge {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
  padding: 26px 28px;
  border: 1px solid var(--line);
  background: rgba(0, 24, 124, 0.35);
  color: var(--on-dark);
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.ledge p { color: var(--on-dark); }
.ledge-1 { width: 100%; border-radius: 18px 18px 6px 6px; }
.ledge-2 { width: calc(100% - 48px); margin-left: 48px; border-radius: 6px; }
.ledge-3 { width: calc(100% - 96px); margin-left: 96px; border-radius: 6px 6px 18px 18px; }
.elev {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ice);
  min-width: 2ch;
}
.ledge h3 { margin-bottom: 8px; }

/* Plots: descending terrace steps */
.plots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.plot {
  background: var(--white);
  border: 1px solid rgba(22, 40, 129, 0.12);
  padding: 26px 24px 24px;
  border-radius: 16px;
  box-shadow: 0 18px 40px -30px rgba(7, 15, 62, 0.4);
  min-height: 196px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.plot-b { margin-top: 28px; }
.plot-d { margin-top: 28px; }
.plot-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ice); color: var(--royal);
  font-family: var(--serif); font-weight: 700; font-size: 0.95rem;
  margin-bottom: 14px;
}
.plot h3 { color: var(--ink); margin-bottom: 10px; }
.plot p { color: var(--muted); }

/* Quote */
.quote-inner { max-width: 46rem; }
.quote-inner blockquote {
  font-size: clamp(1.7rem, 3.8vw, 2.8rem);
  font-style: italic;
  font-weight: 500;
  color: var(--on-dark);
  line-height: 1.25;
  max-width: 22ch;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
}
.faq-lead p:last-child { margin-top: 12px; color: var(--muted); }
.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: var(--white);
  border: 1px solid rgba(22, 40, 129, 0.12);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer;
  text-align: left;
  padding: 18px 18px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}
.faq-ico {
  width: 10px; height: 10px;
  border-right: 2px solid var(--royal);
  border-bottom: 2px solid var(--royal);
  transform: rotate(45deg);
  transition: transform .25s var(--ease);
  flex-shrink: 0;
}
.faq-item.open .faq-ico { transform: rotate(225deg); }
.faq-a { display: none; padding: 0 18px 18px; color: var(--muted); }
.faq-item.open .faq-a { display: block; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.contact-copy p { color: var(--on-dark); max-width: 34rem; margin: 12px 0 22px; }
.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--on-dark);
  border-bottom: 1px solid rgba(210, 219, 255, 0.45);
  margin-bottom: 18px;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.contact-copy address { color: var(--on-dark-muted); line-height: 1.6; }
.social {
  display: inline-block;
  margin-top: 16px;
  color: var(--ice);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form {
  background: rgba(0, 24, 124, 0.35);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
  display: grid; gap: 14px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field { display: grid; gap: 6px; }
.field label { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  background: rgba(7, 15, 62, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--on-dark);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 12px 12px;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(210, 219, 255, 0.55); }
.field textarea { resize: vertical; min-height: 110px; }

/* Footer */
.site-footer {
  background: #050a2e;
  color: var(--on-dark);
  padding: 36px 0 28px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 22px;
}
.site-footer .brand-name { color: var(--on-dark); }
.footer-tag { margin-top: 8px; color: var(--on-dark-muted); font-size: 0.9rem; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--on-dark-muted); font-size: 14px; transition: color .2s; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--on-dark-muted); font-size: 13px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Reveal (JS-gated so content never hides without JS) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .mist, .ridge-stroke, .ridge-far, .ridge-mid, .ridge-near { animation: none; }
  .ridge-stroke { stroke-dashoffset: 0; }
}

/* Hover AFTER reveal.in so lift is not overwritten */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -14px rgba(0, 22, 122, 0.6); }
  .btn-ghost:hover { transform: translateY(-3px); border-color: var(--royal); }
  .nav a:hover { color: var(--ink); transform: translateY(-1px); }
  .nav .nav-cta:hover { border-color: var(--royal); }
  .ledge:hover {
    transform: translateY(-6px);
    border-color: rgba(210, 219, 255, 0.55);
    background: rgba(0, 24, 124, 0.55);
    box-shadow: 0 22px 40px -24px rgba(0, 0, 0, 0.55);
  }
  .plot:hover {
    transform: translateY(-8px);
    border-color: var(--royal);
    box-shadow: 0 24px 44px -24px rgba(0, 24, 124, 0.45);
  }
  .faq-item:hover { transform: translateY(-3px); border-color: var(--royal); }
  .faq-q:hover { color: var(--royal); }
  .contact-email:hover { transform: translateY(-1px); border-bottom-color: var(--on-dark); }
  .contact-form:hover {
    transform: translateY(-4px);
    border-color: rgba(210, 219, 255, 0.45);
    box-shadow: 0 28px 50px -28px rgba(0, 0, 0, 0.7);
  }
  .footer-nav a:hover { color: var(--on-dark); }
  .social:hover { color: var(--on-dark); }
}

/* Mobile ~390px stacked terraces */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid rgba(22, 40, 129, 0.12);
    padding: 8px 24px 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; color: var(--ink); }
  .nav .nav-cta { display: inline-flex; width: fit-content; margin-top: 8px; }

  .hero { min-height: auto; padding-top: 108px; }
  .hero-copy { padding-bottom: 28px; }
  .ridge-stage { height: 28vh; min-height: 180px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .terrace { padding: 72px 0 64px; }
  .terrace-cap { top: -40px; height: 44px; }

  .about-grid,
  .faq-grid,
  .contact-grid,
  .plots { grid-template-columns: 1fr; gap: 22px; }

  .ledge-1, .ledge-2, .ledge-3 {
    width: 100%;
    margin-left: 0;
    border-radius: 14px;
  }
  .plot-b, .plot-d { margin-top: 0; }
  .plot { min-height: 0; }
  .quote-inner blockquote { max-width: none; }
  .contact-form .btn, .hero-actions .btn { width: 100%; }
  .footer-nav { gap: 14px; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .header-inner { height: 70px; }
  .nav { top: 70px; padding-left: 18px; padding-right: 18px; }
  h1 { font-size: 2.15rem; }
  .hero-sub { font-size: 1rem; }
  .ledge { grid-template-columns: 1fr; gap: 8px; padding: 20px 18px; }
  .terrace { padding: 64px 0 56px; }
  .contact-email { font-size: 1.35rem; word-break: break-word; }
}
