/* engyne.com: shared chrome for every page.
   Tokens, the bar and its menu, buttons, the footer and the booking dialog.
   Page-specific choreography stays in each page's own <style>. */

/* Geist and Geist Mono, self-hosted (variable files; the declared ranges match what the site loaded from Google Fonts, 400-700 and 400-500, so lighter or heavier requests clamp exactly as before). SIL Open Font License. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/geist-latin.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2"); }

:root {
  --sc-canvas:     #EEF0F4;
  --sc-surface:    #FFFFFF;
  --sc-ink:        #070C2A;
  --sc-ink-soft:   #4A5170;
  --sc-accent:     #0A66E0;
  --sc-accent-ink: #FFFFFF;
  --sc-font-display: "Geist", system-ui, sans-serif;
  --sc-font-text:    "Geist", system-ui, sans-serif;
  --sc-font-mono:    "Geist Mono", ui-monospace, monospace;

  /* light canvas: shadows halved and tinted toward the cool ground */
  --sc-shadow-color: 228 40% 30%;
  --sc-e1: 0 1px 2px hsl(var(--sc-shadow-color) / 0.08), 0 1px 1px hsl(var(--sc-shadow-color) / 0.05);
  --sc-e2: 0 2px 6px hsl(var(--sc-shadow-color) / 0.08), 0 8px 24px hsl(var(--sc-shadow-color) / 0.08);
  --sc-e3: 0 4px 10px hsl(var(--sc-shadow-color) / 0.08), 0 24px 60px hsl(var(--sc-shadow-color) / 0.14);
  --sc-edge: inset 0 1px 0 rgb(255 255 255 / 0.9);
  --sc-hairline: color-mix(in oklab, var(--sc-ink) 10%, transparent);

  --mark-a: #02E0F2;   /* the mark's two stops, used only for the mark and the trace */
  --mark-b: #0B7AFB;
  --hot:    #0A66E0;
  --bar-h:  64px;
}

body { font-feature-settings: "ss01", "cv11"; }
.sc-display { font-weight: 600; }
h1, h2, h3 { color: var(--sc-ink); }

/* ------------------------------------------------------------------ bar -- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-5);
  height: var(--bar-h); padding: 0 var(--sc-gutter);
  transition: background-color 240ms var(--sc-ease-out), box-shadow 240ms var(--sc-ease-out), translate 280ms var(--sc-ease-out);
}
.bar.is-solid { background: color-mix(in oklab, var(--sc-canvas) 94%, white); box-shadow: 0 1px 0 var(--sc-hairline); }
.bar.is-tucked { translate: 0 -100%; }
.bar__mark img { height: 26px; width: auto; display: block; }
.bar__right { display: flex; align-items: center; gap: var(--sc-5); }
.bar__login { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); text-decoration: none; font-weight: 500; }
.bar__login:hover { color: var(--sc-ink); }

.nav { display: flex; align-items: center; gap: clamp(0.25rem, 1.2vw, 1.25rem); margin-inline: auto 0; }
.nav__link, .nav__toggle {
  font: 500 var(--sc-t-sm)/1 var(--sc-font-text); color: var(--sc-ink-soft); text-decoration: none;
  padding: 10px 8px; border-radius: 8px; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 140ms var(--sc-ease-out);
}
.nav__link:hover, .nav__toggle:hover, .nav__link[aria-current="page"] { color: var(--sc-ink); }
.nav__link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.45em; }
.nav__toggle::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: 45deg; translate: 0 -2px; transition: rotate 180ms var(--sc-ease-out); }
.nav__toggle[aria-expanded="true"]::after { rotate: 225deg; translate: 0 2px; }
.nav__group { position: relative; }
.nav__menu {
  position: absolute; top: calc(100% + 8px); left: -12px; min-width: 15rem; padding: 8px;
  background: var(--sc-surface); border-radius: 14px; box-shadow: var(--sc-e3), var(--sc-edge);
  display: grid; gap: 2px;
  opacity: 0; translate: 0 -4px; pointer-events: none; visibility: hidden;
  transition: opacity 160ms var(--sc-ease-out), translate 160ms var(--sc-ease-out), visibility 0s 160ms;
}
.nav__group.is-open .nav__menu { opacity: 1; translate: 0 0; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.nav__menu a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--sc-ink); font-weight: 600; font-size: var(--sc-t-sm); letter-spacing: -0.01em; }
.nav__menu a small { display: block; font-weight: 400; color: var(--sc-ink-soft); font-size: 13px; margin-top: 2px; letter-spacing: 0; }
.nav__menu a:hover, .nav__menu a[aria-current="page"] { background: var(--sc-canvas); }
[data-soon] { display: none !important; }  /* pages not built yet: hidden until their wave ships */
[hidden] { display: none !important; }  /* author display rules must never beat the hidden attribute */
.sc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* skip link: off-screen until it takes focus */
.skip { position: fixed; top: var(--sc-2); left: var(--sc-2); z-index: calc(var(--sc-z-chrome) + 2); padding: 0.7em 1.1em; border-radius: var(--sc-r-pill); background: var(--sc-ink); color: var(--sc-canvas); font: 600 var(--sc-t-sm)/1 var(--sc-font-text); text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; outline: 2px solid var(--sc-accent); outline-offset: 2px; }

.menu-btn { display: none; }
.sheet { display: none; }

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sc-2);
  font: 600 var(--sc-t-sm)/1 var(--sc-font-text);
  letter-spacing: -0.005em;
  padding: 0.85em 1.25em; border-radius: var(--sc-r-pill);
  background: var(--sc-accent); color: var(--sc-accent-ink); text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 2px hsl(220 90% 30% / 0.25), inset 0 1px 0 rgb(255 255 255 / 0.18);
  transition: background-color 160ms var(--sc-ease-out), transform 120ms var(--sc-ease-out);
  border: 0; cursor: pointer;
}
.btn:hover { background: #0857C2; }
.btn:active { transform: scale(0.97); }
.btn--lg { font-size: var(--sc-t-base); padding: 1em 1.5em; }
.btn svg { width: 1em; height: 1em; }
.link { font-weight: 600; color: var(--sc-accent); text-decoration: underline; text-underline-offset: 0.25em; }
.eyebrow { font-family: var(--sc-font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sc-accent); margin: 0 0 var(--sc-4); }

/* ---------------------------------------------------------------- footer -- */
.foot { width: 100%; max-width: var(--sc-maxw); margin-inline: auto; padding: var(--sc-5) var(--sc-gutter); display: flex; flex-wrap: wrap; gap: var(--sc-3) var(--sc-6); align-items: center; justify-content: space-between; border-top: 1px solid var(--sc-hairline); font-size: var(--sc-t-xs); color: var(--sc-ink-soft); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--sc-2) var(--sc-5); }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--sc-ink); text-decoration: underline; text-underline-offset: 0.25em; }
.foot img { height: 20px; width: auto; }

/* --------------------------------------------------------- booking dialog -- */
.book { border: 0; padding: 0; border-radius: 20px; width: min(760px, 94vw); max-height: 92svh; box-shadow: var(--sc-e3); background: var(--sc-surface); color: var(--sc-ink); }
.book::backdrop { background: hsl(230 60% 8% / 0.45); }
.book__bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--sc-hairline); }
.book__bar strong { font-size: var(--sc-t-base); letter-spacing: -0.01em; }
.book__close { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; color: var(--sc-ink-soft); }
.book__close:hover { background: var(--sc-canvas); color: var(--sc-ink); }
.book iframe { display: block; width: 100%; height: min(760px, calc(92svh - 64px)); border: 0; }

/* --------------------------------------------------------- consent bar -- */
/* built by site.js; above the page, below the bar, menu sheet and booking dialog (which sits in the top layer) */
.consent { position: fixed; z-index: calc(var(--sc-z-chrome) - 10); left: var(--sc-3); right: var(--sc-3); bottom: var(--sc-3); max-width: 44rem; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sc-2) var(--sc-4); padding: var(--sc-3) var(--sc-4);
  background: var(--sc-surface); color: var(--sc-ink); border-radius: 14px; box-shadow: var(--sc-e3), var(--sc-edge); font-size: var(--sc-t-xs); line-height: 1.4;
  animation: consent-in 240ms var(--sc-ease-out) both; }
.consent p { margin: 0; flex: 1 1 16rem; }
.consent a { color: var(--sc-accent); font-weight: 600; text-underline-offset: 0.25em; }
.consent__btns { display: flex; gap: var(--sc-2); }
.consent__btn { font: 600 var(--sc-t-xs)/1 var(--sc-font-text); padding: 0.8em 1.2em; border-radius: var(--sc-r-pill); border: 1px solid var(--sc-hairline); background: transparent; color: var(--sc-ink); cursor: pointer; }
.consent__btn:hover { background: var(--sc-canvas); }
.consent__btn--yes { background: var(--sc-accent); border-color: var(--sc-accent); color: var(--sc-accent-ink); }
.consent__btn--yes:hover { background: #0857C2; }
.consent a:focus-visible, .consent__btn:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
@keyframes consent-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }

/* ----------------------------------------------------------------- phone -- */
@media (max-width: 1080px) {
  .nav, .bar__login { display: none; }
  .menu-btn {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    border: 0; background: color-mix(in oklab, var(--sc-surface) 80%, transparent); box-shadow: var(--sc-e1); cursor: pointer; color: var(--sc-ink);
  }
  .menu-btn span, .menu-btn span::before { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: rotate 200ms var(--sc-ease-out), translate 200ms var(--sc-ease-out); }
  .menu-btn span { position: relative; translate: 0 -3px; }
  .menu-btn span::before { content: ""; position: absolute; top: 6px; }
  .menu-btn[aria-expanded="true"] span { rotate: 45deg; translate: 0 0; }
  .menu-btn[aria-expanded="true"] span::before { rotate: -90deg; top: 0; }
  .sheet {
    display: block; position: fixed; inset: var(--bar-h) 0 auto 0; z-index: calc(var(--sc-z-chrome) - 1);
    max-height: calc(100svh - var(--bar-h)); overflow: auto;
    background: color-mix(in oklab, var(--sc-canvas) 96%, white); box-shadow: 0 1px 0 var(--sc-hairline), var(--sc-e3);
    padding: var(--sc-3) var(--sc-gutter) var(--sc-6);
    opacity: 0; translate: 0 -8px; visibility: hidden; pointer-events: none;
    transition: opacity 180ms var(--sc-ease-out), translate 180ms var(--sc-ease-out), visibility 0s 180ms;
  }
  .sheet.is-open { opacity: 1; translate: 0 0; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .sheet__label { font: 500 12px/1 var(--sc-font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--sc-ink-soft); margin: var(--sc-5) 0 var(--sc-2); }
  .sheet a:not(.btn) { display: block; padding: 12px 0; border-top: 1px solid var(--sc-hairline); color: var(--sc-ink); text-decoration: none; font-weight: 600; font-size: var(--sc-t-lg); letter-spacing: -0.02em; }
  .sheet .btn { margin-top: var(--sc-5); }
  .bar .bar__right > .btn { padding: 0.75em 1em; }
  .bar.is-menu { background: color-mix(in oklab, var(--sc-canvas) 96%, white); }
}
@media (max-width: 420px) {
  .bar__right { gap: var(--sc-3); }
  .bar__mark img { height: 22px; }
}
