/* Product pages (Aram, Bunnie, Vandelay, the products hub). Builds on
   /styles.css (fonts, tokens, HUD, cards). Each product sets its accent on
   its body class in its own stylesheet:
     --accent       buttons, rail, focus, core highlights
     --accent-rgb   the same colour as "r g b", for translucent borders
     --accent-2/-3  the heading gradient's middle and end
     --accent-ink   text on an accent background
     --accent-hover primary button hover
   Unlike the home page, sections flow normally: the scene stays fixed
   behind them and changes formation per section. */

.product {
  --sage: #2fbf71;
  --dev: #f59e0b;
  --alert: #ef4444;
  --panel: rgba(11, 12, 20, 0.62);
}

.product :focus-visible { outline-color: var(--accent); }

.product .brand i { font-style: normal; color: var(--muted); margin: 0 2px; }
.product .status { white-space: nowrap; }
.product .dot { background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* Rail: links instead of buttons, same look. */
.product .rail a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 6px 0 6px 18px;
  position: relative;
  text-align: right;
  text-decoration: none;
}
.product .rail a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s, background 0.3s;
}
.product .rail a[aria-current="true"] { color: var(--text); }
.product .rail a[aria-current="true"]::before { width: 14px; left: -4px; background: var(--accent); }

/* Flowing sections */
.product main { position: relative; z-index: 2; }

.block {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16vh calc(var(--gutter) + 48px) 16vh var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.block-head { max-width: 40rem; }
.block-head > p:not(.eyebrow), .block > p:not(.eyebrow) {
  margin: 22px 0 0;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  color: #c9cde0;
}

.product h1 em, .product .finale h2 {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 70%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.product h1 { font-size: clamp(44px, 8vw, 124px); }
.product h2 { font-size: clamp(34px, 5vw, 72px); }
h3 { margin: 0; font-size: clamp(18px, 1.5vw, 21px); font-weight: 600; letter-spacing: -0.01em; }

.hero .lede { max-width: 36rem; }
.js .hero > * { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.js .hero > :nth-child(2) { animation-delay: 0.12s; }
.js .hero > :nth-child(3) { animation-delay: 0.24s; }
.js .hero > :nth-child(4) { animation-delay: 0.36s; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  background: rgba(11, 15, 23, 0.45);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }

/* Layered stack (architecture, pipeline) */
.stack { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 10px; }
.stack li {
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}
.stack li.core { border-color: rgb(var(--accent-rgb) / 0.55); box-shadow: 0 0 40px rgb(var(--accent-rgb) / 0.08) inset; }
.stack .layer { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.stack .core .layer { color: var(--accent); }
.stack .items { font-size: 16px; line-height: 1.5; }
.stack .note { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; }
.aside { font-size: 15px !important; color: var(--muted) !important; }

/* Tabs + panel */
.tabs { display: inline-flex; gap: 4px; margin-top: 36px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(11, 15, 23, 0.5); backdrop-filter: blur(8px); align-self: flex-start; }
.tabs button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.panel {
  margin-top: 16px;
  max-width: 40rem;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}
.panel > p { margin: 12px 0 0; line-height: 1.6; color: #c9cde0; }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; font-size: 15px; line-height: 1.5; color: #c9cde0; }
.facts li { display: flex; gap: 12px; align-items: baseline; }
.chip {
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.chip.ok { color: var(--sage); }
.chip.dev { color: var(--dev); }
.chip.road { color: #8fa6ff; }

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.grid article { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); backdrop-filter: blur(14px); }
.grid p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: #c9cde0; }
.grid strong { color: var(--text); font-weight: 600; }
code { font-family: var(--mono); font-size: 0.86em; color: var(--accent); }

/* Specifications */
.table-wrap { margin-top: 36px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); backdrop-filter: blur(14px); overflow: hidden; }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { padding: 15px 22px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.spec tr:first-child th, .spec tr:first-child td { border-top: 0; }
.spec th { width: 13rem; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 400; color: var(--muted); padding-top: 18px; }
.spec td { font-size: 15px; line-height: 1.55; }

/* Plans: a row of plan cards with a feature list each */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.plans article { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); backdrop-filter: blur(14px); }
.plans article.core { border-color: rgb(var(--accent-rgb) / 0.55); box-shadow: 0 0 40px rgb(var(--accent-rgb) / 0.08) inset; }
.plans .tier { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.plans .core .tier { color: var(--accent); }
.plans .price { margin: 12px 0 0; font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -0.02em; }
.plans .price small { font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.plans ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; color: #c9cde0; }
.plans li::before { content: "+ "; color: var(--accent); font-family: var(--mono); }

/* Finale */
.product .finale { align-items: center; text-align: center; }
.product .finale > * { max-width: 52rem; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.three .value { font-size: clamp(15px, 1.25vw, 18px); overflow-wrap: normal; }

/* The readout sits on a fade so copy scrolling under it stays legible. */
.product .hud-bottom { background: linear-gradient(transparent, rgba(11, 15, 23, 0.92) 55%); padding-top: 40px; }
.product .hud-top { background: linear-gradient(rgba(11, 15, 23, 0.96) calc(100% - 40px), transparent); padding-bottom: 40px; }
.product .card:hover { border-color: rgb(var(--accent-rgb) / 0.6); }
.product .finale .legal { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted); margin-top: 40px; }

/* Footer line linking the rest of the suite */
.suite { font-size: 15px !important; color: var(--muted) !important; }
.suite a { color: var(--text); text-decoration-color: rgba(248, 250, 252, 0.35); text-underline-offset: 4px; }
.suite a:hover { text-decoration-color: var(--accent); }

/* Screenshots: real product screens as glass panels in the scene. shots.js
   sets --p (scroll progress, -1..1) on each .screens figure; a shot's depth
   class sets --d, and deeper panels drift and tilt more, so the stack
   parallaxes over the point field. Layouts: .single, .pair (a main screen
   with a second one overlapping in front), .phones. */
.screens {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin: 56px 0 0;
  perspective: 1800px;
}
.screens .shot {
  --d: 0.5;
  --ry: -8deg;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  border-radius: 14px;
  background: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgb(var(--accent-rgb) / 0.1);
  transform:
    translate3d(0, calc(var(--p) * var(--d) * -70px), 0)
    rotateX(calc(3deg - var(--p) * 5deg))
    rotateY(calc(var(--ry) + var(--p) * var(--d) * 4deg));
  transform-origin: 50% 50%;
  will-change: transform;
}
.screens .shot.back { --d: 0.35; }
.screens .shot.front { --d: 1.2; --ry: -4deg; z-index: 1; }
.screens figcaption {
  grid-column: 1 / -1;
  margin-top: 28px;
  max-width: 44rem;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.screens.single .shot { grid-column: 1 / 11; }
.screens.pair .shot { grid-row: 1; }
.screens.pair .shot:first-of-type { grid-column: 1 / 10; }
.screens.pair .shot:nth-of-type(2) { grid-column: 8 / 13; align-self: end; margin-bottom: -8%; }
.screens.pair figcaption { margin-top: calc(28px + 7%); }

.screens.phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; max-width: 620px; }
.screens.phones .shot { --ry: 10deg; border-radius: 30px; }
.screens.phones .shot.front { --ry: -6deg; margin-top: 72px; }

@media (max-width: 720px), (prefers-reduced-motion: reduce) {
  .screens .shot { transform: none; will-change: auto; }
}

@media (max-width: 720px) {
  .screens { margin-top: 40px; gap: 14px; }
  .screens.single .shot, .screens.pair .shot:first-of-type, .screens.pair .shot:nth-of-type(2) { grid-column: 1 / -1; grid-row: auto; margin: 0; }
  .screens.pair figcaption { margin-top: 14px; }
  .screens.phones { gap: 14px; }
  .screens.phones .shot.front { margin-top: 40px; }
}

@media (max-width: 900px) {
  .grid, .plans { grid-template-columns: 1fr 1fr; }
  .stack li { grid-template-columns: 1fr; gap: 6px; }
  .stack .note { text-align: left; }
}

@media (max-width: 420px) {
  .product .brand .parent { display: none; }
}

@media (max-width: 720px) {
  .block { padding: 14vh var(--gutter) 16vh; min-height: auto; scroll-margin-top: 48px; }
  .hero { min-height: 100vh; justify-content: flex-end; padding-bottom: 18vh; }
  .grid, .plans, .cards.three { grid-template-columns: 1fr; }
  .tabs { align-self: stretch; justify-content: space-between; }
  .tabs button { padding: 10px 14px; flex: 1; }
  .spec th, .spec td { display: block; width: auto; padding: 4px 18px; border: 0; }
  .spec th { padding-top: 16px; }
  .spec tr { display: block; border-top: 1px solid var(--line); padding-bottom: 12px; }
  .spec tr:first-child { border-top: 0; }
}
