/* Zyenta website layout. Components and type come from zyenta.css; values from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--ultramarine); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { display: block; }
/* Page width: gutters are space-6 on phones and tablets, space-7 on desktop. */
.wrap { --gutter: var(--space-6); width: min(100% - 2 * var(--gutter), 84rem); margin-inline: auto; }
@media (min-width: 60.0625rem) { .wrap { --gutter: var(--space-7); } }
/* The two-column page grid (1fr | 1.25fr, gap space-7). Its first track, for grids that need more than two tracks to line up with it. */
:root { --col-a: calc((100% - var(--space-7)) / 2.25); }
/* Skip link: hidden until focused by keyboard, then a capsule above the nav. */
.skip { position: fixed; z-index: calc(var(--layer-nav) + 1); top: var(--space-4); left: var(--space-4); padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill); background: var(--ink); color: var(--ground); font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: var(--duration-glide); animation-timing-function: var(--spring-gentle); }

/* Nav capsule, floating */
/* Centred with layout, not a -50% translate: a translate lands on half pixels and blurs the text. */
.topbar { position: fixed; z-index: var(--layer-nav); top: var(--space-4); left: 0; right: 0; width: fit-content; max-width: calc(100% - 2 * var(--space-4)); margin-inline: auto; }
/* view-transition-name lives on the capsule itself. On .topbar it made the wrapper a backdrop root,
   so the capsule's backdrop-filter had nothing to blur and page text showed through it unblurred. */
.z-nav { view-transition-name: site-nav; }
/* Brand and links share one text baseline (the 17px wordmark and the 15px links otherwise sit 1-2px apart). */
.z-nav { align-items: baseline; }
.z-nav__links { align-items: baseline; }

/* Wordmark: the mark is the Z of "Zyenta", followed by "yenta".
   The SVG viewBox is cropped to the stroke's ink, so the box is the letter.
   Sized from Archivo 680 at wdth 125: cap height 0.69em, Z ink width 0.76em,
   left side bearing 0.03em, right side bearing 0.05em, stem 0.134em.
   Stroke 3.1 (not the standalone 2.6) so the Z has the same stem weight as the letters beside it.
   Its bottom edge sits on the text baseline. */
.z-nav__brand, .footer-brand { align-items: baseline; gap: 0.05em; }
.z-nav__brand svg, .footer-brand svg { flex: none; width: 0.733em; height: 0.69em; margin-left: 0.03em; }

/* Hero */
.hero {
  --dot-pitch: 24px;
  position: relative; isolation: isolate;
  min-height: max(40rem, 100svh);
  display: flex; flex-direction: column;
  padding-top: 7rem;
  background-color: var(--ground);
  background-image: radial-gradient(circle, color-mix(in oklch, var(--line-strong) 55%, transparent) 0.9px, transparent 1.3px);
  background-size: var(--dot-pitch) var(--dot-pitch);
  overflow: hidden;
}
.hero__inner { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-8); padding-block: clamp(2rem, 6vh, 5rem) clamp(2rem, 6vh, 4rem); }
.hero__title { position: relative; z-index: var(--layer-content); max-width: 15ch; margin-top: auto; margin-bottom: auto; }
.hero__foot { position: relative; z-index: var(--layer-raised); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-5) var(--space-7); }
.hero__sub { margin: 0; max-width: 34rem; color: var(--ink-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Sections */
.section { padding-block: clamp(4.5rem, 2rem + 8vw, 7rem); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--space-4) var(--space-7); align-items: end; margin-bottom: var(--space-7); }
.section-head p { margin: 0; max-width: 36rem; }

/* Product index: the description and the open body start on the page grid's second column. */
.z-row > summary { grid-template-columns: calc(var(--col-a) + var(--space-7) - var(--space-5)) minmax(0, 1fr) auto 44px; }
.z-row__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }

/* Long values (email addresses) wrap instead of pushing the page sideways. */
.z-spec dd, .site-footer a { overflow-wrap: anywhere; }

/* Principles: statements that widen as they enter the view */
.principles { list-style: none; margin: 0; padding: 0; }
.principle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--space-3) var(--space-7); align-items: baseline; padding-block: var(--space-6); border-top: 1px solid var(--line); }
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle h3 { --wdth: 118; margin: 0; font: 620 clamp(1.75rem, 1.1rem + 2.4vw, 3rem)/1.02 var(--font-sans); letter-spacing: -0.025em; }
.principle p { margin: 0; color: var(--ink-muted); max-width: 32rem; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .principle h3 { animation: widen linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    @keyframes widen { from { --wdth: 92; opacity: 0.25; } to { --wdth: 118; opacity: 1; } }
  }
}

/* Work with us: the one call to action. A plain ground-raised panel (content, so no optic material)
   at radius-xl. Its form column starts exactly on the page grid's second column:
   inside the panel, 100% = page width - 2 × pad, so the first track is the page's first column minus the pad. */
.cta {
  --pad: clamp(var(--space-5), 0.5rem + 4vw, var(--space-8));
  display: grid; grid-template-columns: calc((100% + 2 * var(--pad) - var(--space-7)) / 2.25 - var(--pad)) minmax(0, 1fr);
  gap: var(--space-7); align-items: start;
  padding: var(--pad); border-radius: var(--radius-xl);
  background: var(--ground-raised); box-shadow: 0 0 0 1px var(--line);
}
.cta__pitch { display: grid; gap: var(--space-5); justify-items: start; }
.cta__title { max-width: 11ch; }
.cta__lead { margin: 0; max-width: 32rem; }
.steps { list-style: none; margin: var(--space-3) 0 0; padding: 0; counter-reset: step; justify-self: stretch; }
.step { counter-increment: step; display: grid; grid-template-columns: var(--space-7) minmax(0, 1fr); gap: var(--space-1) 0; padding-block: var(--space-4); border-top: 1px solid var(--line); }
.step::before { --wdth: 112; content: counter(step); grid-row: 1 / span 2; color: var(--ultramarine); font: 600 1.125rem/1.35 var(--font-sans); font-variant-numeric: tabular-nums; }
.step__title { --wdth: 112; margin: 0; font: 600 1.125rem/1.35 var(--font-sans); letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--ink-muted); font-size: 0.9375rem; line-height: 1.5; }

.cta__form { display: grid; gap: var(--space-5); }
.z-field__input--area { min-height: 8.5rem; resize: vertical; }
.choices { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--space-2); }
.choices legend { padding: 0; margin-bottom: var(--space-2); }
.choices__list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* A choice is a capsule (it is pressed). Selected = ink fill like the current nav link.
   It does not widen: the pills sit in a row, and widening one would shove its neighbours. */
.choice { position: relative; }
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4);
  border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink); font: 500 0.9375rem/1 var(--font-sans); white-space: nowrap;
  transition: background-color var(--duration-instant) var(--ease-standard);
}
.choice:hover span { background: var(--ultramarine-soft); }
.choice input:checked + span { background: var(--ink); color: var(--ground); box-shadow: none; }
.choice input:focus-visible + span { outline: 2px solid var(--ultramarine); outline-offset: 3px; }
.cta__send { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-top: var(--space-2); }
.cta__note { margin: 0; flex: 1 1 14rem; }
.cta__note.is-error { color: var(--flare); }

/* Company */
.company { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--space-6) var(--space-7); align-items: start; }
.company h2 { margin-bottom: var(--space-4); }
.company p { margin: 0; max-width: 30rem; }

/* Long-form pages */
.page { padding-block: 9rem clamp(4rem, 8vw, 6rem); }
.page h1 { max-width: 14ch; }
.page .effective { margin: var(--space-4) 0 var(--space-7); color: var(--ink-muted); }
.prose { max-width: 68ch; }
.prose h2 { --wdth: 112; margin: var(--space-7) 0 var(--space-3); font: 600 1.375rem/1.25 var(--font-sans); letter-spacing: -0.01em; }
.prose p, .prose ul { margin: 0 0 var(--space-4); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: var(--space-2); }
.prose li::marker { color: var(--ultramarine); }

/* Footer */
.site-footer { background: var(--ground-sunk); padding-block: var(--space-8) var(--space-6); font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: var(--col-a) repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-7); }
.site-footer p { margin: 0; color: var(--ink-muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { --wdth: 125; display: inline-flex; margin-bottom: var(--space-3); color: var(--ink); font: 680 1.25rem/1 var(--font-sans); }
.footer-brand svg { color: var(--ultramarine); }
.footer-title { margin-bottom: var(--space-3) !important; }
.legal-line { margin-top: var(--space-8) !important; padding-top: var(--space-5); border-top: 1px solid var(--line); }

@media (max-width: 60rem) {
  .section-head, .company, .principle, .z-row__body, .cta { grid-template-columns: minmax(0, 1fr); }
  .z-row > summary { grid-template-columns: minmax(0, 1fr) 44px; }
  .z-row > summary .z-row__line { grid-column: 1; grid-row: 2; }
  .z-row > summary .z-status { grid-column: 1; grid-row: 3; }
  .z-row > summary .z-row__toggle { grid-column: 2; grid-row: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  /* Phones and tablets: the capsule spans the screen with the same space-4 inset on the top and both sides,
     and its space-4 left padding puts the wordmark exactly on the 32px content edge.
     Links sit at the right end, so the layout is the same on every device instead of a content-sized pill. */
  .topbar { left: var(--space-4); right: var(--space-4); width: auto; max-width: none; }
  .z-nav { justify-content: space-between; padding-left: var(--space-4); }
}
@media (max-width: 36rem) {
  .hide-s { display: none; }
  .z-nav { gap: var(--space-2); }
  .z-nav__link { padding: 0 var(--space-3); font-size: 0.875rem; }
  .hero { padding-top: 6rem; }
  /* Both actions full width, stacked: same layout on every phone, no uneven split. */
  .hero__actions { width: 100%; flex-direction: column; }
  .cta__send .z-btn { width: 100%; }
  /* Footer: the Legal column takes the email address's width, so it never breaks mid-word. */
  .footer-grid { grid-template-columns: minmax(0, 1fr) auto; }
}
/* Very narrow phones: the capsule keeps the two most important links (Privacy stays in the footer). */
@media (max-width: 23.75rem) {
  .hide-xs { display: none; }
  .z-nav { gap: var(--space-1); }
  .z-spec > div, .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .choice span { transition: none; }
  @view-transition { navigation: none; }
}
