/* AZYL.ai design system for the product pages, the products list and the 404 page.
   Loaded with fonts.css, bar.css (top bar) and panels.css (side panels); product pages add product.css.
   The home page keeps its own original look in home.css. */

/* ── TOKENS ── */
:root {
  color-scheme: dark;

  /* the azyl.ai palette; the greys are lifted so small text stays readable */
  --bg: #1A1917;
  --sunk: #151412;
  --panel: #201F1C;
  --raise: #272622;
  --lime: #DCFF2E;
  --lime-2: #E8FF6E;
  --lime-rgb: 220, 255, 46;
  --ghost: #F3F1EC;
  --silver: #D6D2CA;
  --muted: #A6A197;     /* secondary text, nav links */
  --subtle: #949087;    /* labels and captions */
  --rule: #2F2D29;      /* decorative hairlines */
  --rule-2: #3D3A35;
  --edge: #75716A;      /* borders of controls (3:1 on the background) */
  --amber: #FFB86B;
  --danger: #FF8A6E;
  --ok: #9BD37A;
  --sky: #7FD1FF;
  --violet: #C9A0FF;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* type scale: seven sizes, nothing under 12px */
  --t-xs: 12px;
  --t-sm: 14px;
  --t-md: 16px;
  --t-lg: 19px;
  --t-xl: 26px;
  --t-2xl: clamp(34px, 4.4vw, 54px);
  --t-3xl: clamp(42px, 6.2vw, 76px);

  /* corners: three and a pill */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --wrap: 1140px;
  --gutter: clamp(20px, 4.5vw, 52px);
  --section: clamp(88px, 11vw, 152px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 600px) {
  :root { --t-lg: 17px; --t-xl: 23px; }
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; interpolate-size: allow-keywords; scrollbar-color: #45423C var(--bg); }
body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--silver);
  font-family: var(--sans);
  font-size: var(--t-md);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
b, strong { font-weight: 500; color: var(--ghost); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ghost); font-weight: 400; line-height: 1.25; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--ghost); }
::selection { background: var(--lime); color: var(--bg); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
[hidden] { display: none !important; }
.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; }
/* ── TYPE ── */
.display, .h2 {
  font-family: var(--serif);
  font-weight: 300;
  color: var(--ghost);
  letter-spacing: -0.012em;
}
.display { font-size: var(--t-3xl); line-height: 1.04; }
.h2 { font-size: var(--t-2xl); line-height: 1.1; }
.display em, .h2 em, .serif em { font-style: italic; color: var(--lime); }
.lead { font-size: var(--t-lg); line-height: 1.7; color: var(--silver); max-width: 60ch; }
.label {
  display: block;
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
}
/* section eyebrows carry the dot from the logo */
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px rgba(var(--lime-rgb), 0.7); }
.fine { font-size: var(--t-sm); line-height: 1.65; color: var(--subtle); max-width: 76ch; }
.fine a { color: var(--silver); text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; }
.fine a:hover { text-decoration-color: var(--silver); }

/* ── LAYOUT ── */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-top: var(--section); }
.section[id] { scroll-margin-top: 8px; }
.head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 40px; }
.head > .eyebrow { align-self: start; padding-top: 18px; }
.head .h2 { max-width: 17em; }
.head .lead { margin-top: 24px; }
.head p + p { margin-top: 16px; }
@media (max-width: 900px) {
  .head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .head > .eyebrow { padding-top: 0; }
}
.center { text-align: center; }

/* ── BUTTONS & LINKS ── */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.center .actions, .actions.mid { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  background: none; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: var(--sans); font-size: var(--t-sm); font-weight: 500; line-height: 1; letter-spacing: 0.01em;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.btn svg { width: 14px; height: 14px; flex: none; transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn.out:hover svg { transform: translate(2px, -2px); }
.btn.primary { background: var(--lime); color: var(--bg); }
.btn.primary:hover { background: var(--lime-2); transform: translateY(-1px); box-shadow: 0 14px 36px -14px rgba(var(--lime-rgb), 0.7); }
.btn.secondary { border-color: var(--edge); color: var(--ghost); background: rgba(255, 255, 255, 0.015); }
.btn.secondary:hover { border-color: var(--silver); background: rgba(255, 255, 255, 0.05); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
/* ── SURFACES ── */
.surface {
  position: relative;
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.036), rgba(255, 255, 255, 0.008));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 44px 80px -60px rgba(0, 0, 0, 0.95);
}
/* a soft light that follows the pointer */
.glow { isolation: isolate; overflow: hidden; transition: border-color 0.4s, transform 0.5s var(--ease); }
.glow::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(440px circle at var(--mx, 50%) var(--my, -20%), rgba(var(--lime-rgb), 0.085), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
}
.glow:hover { border-color: var(--rule-2); transform: translateY(-3px); }
.glow:hover::before { opacity: 1; }

/* ── DISCLOSURE ── */
.more { margin-top: 36px; }
.more > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 48px; padding: 0 18px 0 22px;
  border: 1px solid var(--rule-2); border-radius: var(--r-pill);
  font-size: var(--t-sm); font-weight: 500; color: var(--ghost);
  transition: border-color 0.25s, background-color 0.25s;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary:hover { border-color: var(--edge); background: rgba(255, 255, 255, 0.03); }
.more > summary i { position: relative; width: 14px; height: 14px; flex: none; transition: transform 0.45s var(--ease); }
.more > summary i::before, .more > summary i::after { content: ""; position: absolute; left: 1px; right: 1px; top: 6.5px; height: 1px; background: var(--lime); }
.more > summary i::after { transform: rotate(90deg); }
.more[open] > summary i { transform: rotate(135deg); }
.more::details-content { height: 0; overflow: clip; transition: height 0.5s var(--ease), content-visibility 0.5s allow-discrete; }
.more[open]::details-content { height: auto; }
.more-body { padding-top: 32px; }
.more-body > :first-child { margin-top: 0; }

/* ── HERO & THE HARBOR MARK ── */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 112px var(--gutter) 104px; text-align: center;
}
.logo { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.mark { overflow: visible; view-transition-name: harbor; }
.mark .arc { fill: none; stroke: var(--silver); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1.1s var(--ease) 0.1s forwards; transition: stroke 0.4s; }
.mark .dot { fill: var(--lime); filter: drop-shadow(0 0 6px rgba(var(--lime-rgb), 0.55)); transform-box: view-box; transform-origin: 60px 70px; transform: scale(0); animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }

.wordmark { display: flex; align-items: baseline; justify-content: center; line-height: 1; font-weight: 400; }
.wordmark-azyl { font-size: 58px; font-weight: 100; letter-spacing: 16px; line-height: 1; color: var(--ghost); }
.wordmark-ai { margin-left: 2px; font-size: 26px; font-weight: 200; color: var(--lime); }
.tagline { min-height: 26px; font-family: var(--mono); font-size: var(--t-sm); font-weight: 300; line-height: 1.7; letter-spacing: 0.07em; color: var(--silver); }
.tagline-line { display: inline-block; transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s var(--ease); }
.tagline-line.out { opacity: 0; filter: blur(9px); transform: translateY(-7px); }
.tagline-line.pre { opacity: 0; filter: blur(9px); transform: translateY(7px); transition: none; }
@media (max-width: 600px) {
  .wordmark-azyl { font-size: 40px; letter-spacing: 10px; }
  .wordmark-ai { font-size: 20px; }
  .tagline { font-size: var(--t-xs); letter-spacing: 0.03em; }
}
.cue {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 16px;
  font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); text-decoration: none;
  transition: color 0.3s; animation: fade 0.45s ease 0.55s both;
}
.cue:hover { color: var(--ghost); }
.cue svg { width: 12px; height: 7px; animation: bob 2.4s ease-in-out 2s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ── MOTION ── */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.rise { animation: rise 0.65s var(--ease) both; }
.rise.d1 { animation-delay: 0.08s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.24s; }
.rise.d4 { animation-delay: 0.32s; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
/* arriving by page transition: the mark and headline are already there */
.vt-in .rise, .vt-in .mark .arc, .vt-in .mark .dot { animation-duration: 1ms; animation-delay: 0s; }
::view-transition-group(harbor) { animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }

/* ── CLOSING CALL ── */
.closing { position: relative; isolation: isolate; overflow: clip; padding-top: calc(var(--section) + 12px); padding-bottom: 28px; text-align: center; }
.closing .h2 { max-width: 17em; margin-inline: auto; }
.closing .lead { margin: 22px auto 0; }
.closing .actions { justify-content: center; margin-top: 38px; }
.closing .fine { margin: 20px auto 0; }
.closing .mark-echo { display: block; margin: 0 auto 36px; width: 72px; height: 34px; overflow: visible; }
.mark-echo path { fill: none; stroke: var(--silver); stroke-width: 3; stroke-linecap: round; }
.mark-echo circle { fill: var(--lime); filter: drop-shadow(0 0 6px rgba(var(--lime-rgb), 0.55)); }

/* ── FOOTER ── */
.footer { margin-top: clamp(64px, 8vw, 104px); border-top: 1px solid var(--rule); background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.26)); padding: 72px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px 32px; }
.footer-brand p { margin-top: 12px; font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.06em; color: var(--muted); }
.footer ul { list-style: none; margin-top: 14px; }
.footer li a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; font-size: var(--t-sm); color: var(--muted); text-decoration: none; transition: color 0.25s; }
.footer li a:hover { color: var(--ghost); }
.footer li svg { width: 9px; height: 9px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--subtle); }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── LIGHTBOX ── */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(13, 13, 12, 0.97); color: var(--silver); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade 0.3s ease; }
.lightbox::backdrop { background: rgba(10, 10, 9, 0.9); }
.lb-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; }
.lb-bar .btn { min-height: 44px; padding: 0 18px; }
.lightbox .close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--rule-2); border-radius: 50%; background: none; color: var(--muted); cursor: pointer; transition: color 0.25s, border-color 0.25s; }
.lightbox .close svg { width: 12px; height: 12px; }
.lightbox .close:hover { color: var(--ghost); border-color: var(--edge); }
.lb-stage { display: flex; overflow: auto; overscroll-behavior: contain; padding: 0 16px; scrollbar-color: #45423C transparent; }
.lb-stage img { margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; border: 1px solid var(--rule-2); border-radius: var(--r-sm); cursor: zoom-in; }
.lightbox.zoomed .lb-stage img { flex: none; max-width: none; max-height: none; cursor: zoom-out; }
.lb-caption { padding: 14px 18px 18px; text-align: center; font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.08em; color: var(--muted); }

/* ══ PAGES ══════════════════════════════════════════════════════════════ */

/* ── PRODUCTS PAGE ── */
.page-head { padding-top: 172px; text-align: center; }
.page-head .eyebrow { justify-content: center; }
.page-head .display { max-width: 14em; margin: 22px auto 0; }
.product-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-top: clamp(64px, 9vw, 120px); }
.product-row:nth-child(even) .row-shot { order: 2; }
.row-shot { display: block; overflow: hidden; }
.row-shot img { width: 100%; height: auto; }
.product-row h2 .product-name { font-size: var(--t-xl); }
.product-row .product-tag { margin-top: 10px; }
.product-row .product-tag + p { margin-top: 20px; }
.product-row .btn { margin-top: 30px; }
@media (max-width: 860px) { .product-row { grid-template-columns: minmax(0, 1fr); gap: 26px; } .product-row:nth-child(even) .row-shot { order: 0; } }

/* ── NOT FOUND ── */
.lost { gap: 24px; }
.lost .logo { gap: 28px; }
.lost .display { font-size: var(--t-2xl); }
.lost + * { margin-top: 0; }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .glow:hover { transform: none; }
}

/* ── PRINT ── */
@media print {
  .cue, .footer { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
