/*
 * HeyHi product page: one template for every product in config/products.yml (products/show and products/sections).
 * Nothing here is for a particular product; every section is laid out for however much its entry holds.
 */

/* ---------- Hero ---------- */
.product-hero {
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(80px, 8vw, 136px);
  background:
    radial-gradient(56% 72% at 84% 34%, color-mix(in srgb, var(--night-600) 72%, transparent), transparent 70%),
    radial-gradient(40% 44% at -4% -6%, color-mix(in srgb, var(--signal) 7%, transparent), transparent 70%),
    var(--night-900);
}
.product-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(150, 192, 240, 0.07) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 70% at 80% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 80% 40%, #000 20%, transparent 75%);
}

.product-hero__grid { display: grid; gap: 56px; align-items: center; }
.product-hero__text { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.product-hero__title { margin-top: 4px; }
.product-hero__tagline {
  max-width: 22em; font-size: clamp(1.25rem, 1.02rem + 0.85vw, 1.7rem); font-weight: 520; font-stretch: 104%;
  letter-spacing: -0.015em; line-height: 1.3; color: var(--fg);
}
.product-hero__meta {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0;
  font-family: var(--font-mono); font-stretch: var(--mono-w); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.product-hero__meta li { display: flex; align-items: center; }
.product-hero__meta li + li::before { content: ""; width: 1px; height: 14px; margin: 0 14px; background: var(--line-strong); }
.product-hero__meta .chip { letter-spacing: 0.03em; text-transform: none; }
.product-hero__summary { max-width: 34em; font-size: 16.5px; line-height: 1.65; color: var(--muted); }
.product-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.product-hero__visual { position: relative; min-width: 0; }
/* The preview floats on a soft light, the AI's aqua with a little of the brand's amber */
.product-hero__visual::before {
  content: ""; position: absolute; inset: -18% -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--voice) 11%, transparent), color-mix(in srgb, var(--signal) 4%, transparent) 60%, transparent);
}
.product-hero .preview { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px var(--night-line-strong), 0 60px 120px -40px rgba(0, 3, 10, 0.9); }

@media (min-width: 960px) {
  .product-hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: clamp(48px, 5.5vw, 96px); }
}
@media (max-width: 480px) {
  .product-hero__actions { display: grid; width: 100%; }
}

/* The breadcrumb, set as the page's eyebrow */
.crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  font-family: var(--font-mono); font-stretch: var(--mono-w); font-size: var(--t-label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
}
.crumbs li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.crumbs li + li::before { content: "/"; color: var(--faint); }
.crumbs a { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-text); text-decoration: none; }
.crumbs a::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.75; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Heading beside its list: highlights and questions ---------- */
.product-split { display: grid; gap: 8px; }
@media (min-width: 1000px) {
  .product-split { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.5fr); gap: clamp(48px, 6vw, 104px); align-items: start; }
  .product-split__head { position: sticky; top: calc(var(--nav-h) + 40px); margin-bottom: 0; }
  .product-split__head .h2 { font-size: clamp(2.4rem, 1rem + 2.4vw, 3.4rem); }
}

/* A product without steps has its questions straight after its highlights, both on day: a hairline parts them */
.band--day + .product-faqs { padding-top: 0; }
.band--day + .product-faqs > .wrap::before { content: ""; grid-column: 1 / -1; height: 1px; margin-bottom: var(--section-y); background: var(--line); }

/* ---------- What it does ---------- */
.highlights { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); column-gap: clamp(28px, 3.5vw, 48px); }
.highlight { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; align-content: start; padding: 26px 0 32px; border-top: 1px solid var(--line); }
.highlight__index { grid-row: span 2; padding-top: 4px; font-size: 11px; letter-spacing: 0.06em; color: var(--accent-text); }
.highlight__title { font-size: 18px; font-weight: 660; font-stretch: 104%; letter-spacing: -0.012em; line-height: 1.3; }
.highlight__text { font-size: 15.5px; line-height: 1.6; color: var(--muted); }

/* ---------- How it works ---------- */
.product-steps { background: linear-gradient(180deg, var(--night-900), var(--night-850)); }
/* A numbered track: down the left on narrower screens, and across in one row from 900px, however many steps there are */
.steps { list-style: none; display: grid; }
.step { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 20px; }
.step__marker { display: flex; flex-direction: column; align-items: center; }
/* Each number sits on a line that runs on to the next step */
.step__marker::after { content: ""; flex: 1; width: 1px; min-height: 24px; margin-top: 10px; background: var(--line-strong); }
.step:last-child .step__marker::after { display: none; }
.step__number {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%;
  font-family: var(--font-mono); font-stretch: var(--mono-w); font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: var(--fg);
  background: var(--night-850); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 1px var(--line-strong);
}
.step:first-child .step__number { color: var(--night-900); background: var(--signal); box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--signal) 70%, transparent); }
.step__body { display: grid; gap: 10px; align-content: start; padding: 12px 0 40px; }
.step__text { font-size: 15.5px; line-height: 1.6; color: var(--muted); max-width: 26em; }

@media (min-width: 900px) {
  .steps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .step { grid-template-columns: none; align-content: start; gap: 22px; }
  .step__marker { flex-direction: row; }
  .step__marker::after { width: auto; height: 1px; min-height: 0; margin: 0 0 0 14px; }
  /* After the last step the line fades out */
  .step:last-child .step__marker::after { display: block; background: linear-gradient(90deg, var(--line-strong), transparent 80%); }
  .step__body { padding: 0 clamp(16px, 3vw, 40px) 0 0; }
}

/* ---------- Questions ---------- */
.faqs { border-top: 1px solid var(--line); }
.faq { border-bottom: 1px solid var(--line); }
.faq__question {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; cursor: pointer; list-style: none;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem); font-weight: 620; font-stretch: 104%; letter-spacing: -0.01em; line-height: 1.35;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question:hover .faq__icon { border-color: var(--fg); }
.faq__question:focus-visible { outline-offset: 4px; border-radius: var(--r-xs); }
/* A plus that turns into a minus */
.faq__icon { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); transition: border-color 0.2s, background-color 0.2s; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; border-radius: 1px;
  background: currentColor; transition: transform 0.3s var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq[open] .faq__icon { background: var(--night-900); border-color: var(--night-900); color: var(--night-text); }
.faq[open] .faq__icon::after { transform: rotate(0deg); }
.faq__answer { max-width: 42em; padding: 0 clamp(0px, 5vw, 58px) 28px 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
/* Opening and closing slide where the browser can animate a details element's content */
.faq::details-content { block-size: 0; overflow-y: clip; transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete; }
.faq[open]::details-content { block-size: auto; }

/* ---------- More from HeyHi ---------- */
.product-more__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(36px, 4vw, 56px); }
.product-more__heading { margin-bottom: 0; }
.product-more__all {
  display: inline-flex; align-items: center; gap: 10px; padding-bottom: 4px; border-bottom: 1px solid var(--line-strong);
  font-size: 15px; font-weight: 620; color: var(--fg); text-decoration: none; transition: border-color 0.2s;
}
.product-more__all:hover { border-color: var(--fg); }
.product-more__all .icon { transition: transform 0.25s var(--ease); }
.product-more__all:hover .icon { transform: translateX(3px); }
.product-more__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 18px; }
/* Works around the shared card: without an explicit column, a preview's unwrapped meta line widens the card's implicit
   column and the card clips it */
.product-more .product-card { grid-template-columns: minmax(0, 1fr); }
/* Side by side, the cards share their rows, so the names line up whatever each preview's height */
@media (min-width: 900px) {
  .product-more__grid > .product-card { grid-row: span 2; grid-template-rows: subgrid; }
}
/* Narrow screens: one row to swipe through, running to the screen's edges */
@media (max-width: 899px) {
  .product-more__grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(330px, 82%);
    margin-inline: calc(-1 * var(--pad)); padding: 4px var(--pad) 12px; scroll-padding-inline: var(--pad);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin;
  }
  .product-more__grid > .product-card { scroll-snap-align: start; }
  .product-more .product-card:hover { transform: none; }
}

/* ---------- Closing invitation ---------- */
.product-closing {
  isolation: isolate; overflow: hidden;
  padding-block: clamp(104px, 11vw, 184px);
  background:
    radial-gradient(50% 80% at 100% 100%, color-mix(in srgb, var(--night-700) 90%, transparent), transparent 72%),
    radial-gradient(36% 60% at 0% 100%, color-mix(in srgb, var(--signal) 7%, transparent), transparent 70%),
    var(--night-950);
}
.product-closing__inner { display: grid; gap: 28px; justify-items: start; }
.product-closing__title { max-width: 13em; font-size: clamp(2.5rem, 0.9rem + 5.6vw, 6rem); line-height: 0.96; }
.product-closing__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
@media (max-width: 480px) {
  .product-closing__actions { display: grid; width: 100%; }
}
