/* Product "coming soon" pages (templates/product_page.html).
   Colours and fonts are custom properties set per product in the template,
   from AltitudeInteractive/products.py. Mobile-first: base styles are for
   phones, the media queries add the wider layouts.

   The look follows the product itself (its app and demo video): sentence
   case, one type family, 1px borders, the app's soft shadow, real screens
   instead of illustrations, and the test-kit stripe used once, at the top. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--navy);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; }
a { color: var(--action-text); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.hero__main :focus-visible, .topbar :focus-visible, .closing :focus-visible,
.footer :focus-visible, .sticky :focus-visible { outline-color: var(--action-on-dark); }

.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 1.125rem; }
.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 {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 20;
  background: var(--action); color: var(--action-ink); padding: 0.6rem 1rem;
  font-weight: 600; border-radius: var(--radius); text-decoration: none;
}
.skip:focus { top: 0.75rem; }
.pixel { display: none; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.1rem); font-weight: 700; line-height: 1.15; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: 0.75rem 1.5rem;
  font: 600 1.0625rem/1.2 var(--font-body);
  color: var(--action-ink); background: var(--action);
  border: 0; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--action-hover); text-decoration: none; }
.btn[disabled] { cursor: progress; opacity: 0.75; }
.btn--block { width: 100%; }
.btn--secondary { background: var(--navy); color: #fff; }
.btn--secondary:hover { background: var(--ink); }

/* ---- Hero ------------------------------------------------------------- */
/* The test-kit stripe from the demo video: phenol red, OTO yellow, aqua. */
.hero {
  background: var(--navy); color: #fff; padding-bottom: 2.25rem;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--accent-red) 0 33.3%, var(--accent-yellow) 33.3% 66.6%, var(--action) 66.6%) 1;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.75rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.3rem; }
.brand img { border-radius: 7px; }
.topbar__end { display: flex; align-items: center; gap: 0.75rem; }
.btn--small { min-height: 2.5rem; padding: 0.45rem 0.9rem; font-size: 0.95rem; }
.pill {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-yellow); border: 1.5px solid var(--accent-yellow);
  border-radius: 999px; padding: 0.2rem 0.65rem;
}
.hero__grid { display: grid; gap: 1.75rem; }
.hero h1 { font-size: clamp(1.95rem, 7.6vw, 3.1rem); font-weight: 700; line-height: 1.12; max-width: 19ch; }
.hero__sentence { margin-top: 0.9rem; font-size: 1.0625rem; color: #D9E3F0; max-width: 34rem; }
.hero__offline {
  display: flex; gap: 0.6rem; align-items: flex-start;
  margin-top: 0.9rem; font-weight: 500; color: #fff; max-width: 34rem;
}
.hero__offline svg { flex: none; color: var(--action-on-dark); margin-top: 0.15rem; }
.hero__price { margin-top: 0.6rem; color: #B3C6DE; font-size: 0.98rem; }
.hero__cta { margin-top: 1.25rem; }
.hero__note { margin-top: 0.8rem; font-size: 0.92rem; color: #B3C6DE; }

/* ---- Demo video ------------------------------------------------------- */
.demo {
  position: relative; margin-top: 1.4rem; aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg); overflow: hidden; background: var(--ink);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45);
}
.demo video, .demo iframe { width: 100%; height: 100%; object-fit: cover; border: 0; background: var(--ink); }
.demo__play {
  position: absolute; inset: 0; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; cursor: pointer; color: #fff; font: inherit;
  background: linear-gradient(180deg, rgba(8, 27, 51, 0) 40%, rgba(8, 27, 51, 0.92) 100%);
}
/* Label along the bottom, clear of the screens in the poster. */
.demo__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.7rem 0.9rem;
}
.demo__icon {
  display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: 50%;
  background: var(--action); color: var(--action-ink);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.demo__icon svg { margin-left: 3px; }
.demo__play:hover .demo__icon { transform: scale(1.06); }
.demo__label { font-weight: 600; font-size: 1.05rem; text-align: left; }
.demo__time {
  flex: none; font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
}
.demo__play:focus-visible { outline: 3px solid var(--action-on-dark); outline-offset: -3px; }

/* ---- Sign-up card ----------------------------------------------------- */
.signup {
  color: var(--navy); background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 0.75rem;
}
.signup:focus { outline: none; }
.offer { background: #FFF7DB; border-bottom: 1px solid #F3E3A6; padding: 0.95rem 1.15rem; }
.offer__label { font-weight: 700; margin-bottom: 0.3rem; }
.offer ul { list-style: none; padding: 0; }
.offer li { position: relative; padding-left: 1.1rem; line-height: 1.4; color: #3A3220; }
.offer li + li { margin-top: 0.15rem; }
.offer li::before { content: "–"; position: absolute; left: 0; color: #8A6D12; }
.signup__body { padding: 1.15rem 1.15rem 1.35rem; }
.signup h2 { font-size: 1.5rem; }
.signup__intro { color: var(--muted); font-size: 0.98rem; margin: 0.3rem 0 1.1rem; }
.form__error {
  margin-bottom: 1rem; padding: 0.7rem 0.85rem; border-radius: var(--radius);
  background: #FEF3F2; color: var(--danger); font-weight: 500;
}
.field { margin-bottom: 1rem; min-width: 0; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 1rem; }
.field input {
  width: 100%; min-height: 3rem; padding: 0.65rem 0.8rem;
  font: 400 1.0625rem/1.3 var(--font-body); color: var(--navy);
  background: #fff; border: 1px solid #827D73; border-radius: var(--radius);
}
.field input::placeholder { color: #827D73; }
.field input:focus-visible { outline: 3px solid rgba(19, 165, 180, 0.45); outline-offset: 0; border-color: var(--action-text); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__optional { font-weight: 400; color: var(--muted); }
.field__hint { font-size: 0.88rem; color: var(--muted); margin-top: 0.3rem; }
.field__error { font-size: 0.95rem; font-weight: 600; color: var(--danger); margin-top: 0.3rem; }
.field__error:empty { display: none; }
.check { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0.25rem 0 1.25rem; }
.check input { flex: none; width: 1.3rem; height: 1.3rem; margin: 0.12rem 0 0; accent-color: var(--navy); }
.form__privacy { margin-top: 0.8rem; font-size: 0.88rem; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.success:focus { outline: none; }
.success:not(.success--empty) { margin-top: 0.75rem; padding: 0.85rem 1rem; border-radius: var(--radius); background: #ECFDF3; }
.success__message { font-weight: 600; font-size: 1.1rem; color: #0A4F24; }
.success__more { margin-top: 0.4rem; color: var(--ok); font-weight: 500; }

/* Optional second step: tap chips are quicker than a dropdown on a phone. */
.details { margin-top: 1.25rem; }
.details__heading { font-weight: 600; font-size: 1.1rem; }
.details__intro { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.9rem; }
.chips { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.chips legend { font-weight: 600; margin-bottom: 0.45rem; padding: 0; }
.chips__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 0.95rem;
  border: 1px solid #827D73; border-radius: 999px; background: #fff;
}
.chip input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid rgba(19, 165, 180, 0.45); outline-offset: 1px; }

/* ---- Features --------------------------------------------------------- */
.features { padding: 3rem 0 2.5rem; }
.features h2 { margin-bottom: 1.75rem; }
.feature { display: grid; gap: 1.1rem; padding: 1.75rem 0; border-top: 1px solid var(--sand-line); }
.feature__text p { margin-top: 0.4rem; color: #3B4656; max-width: 32rem; }
.feature__stage {
  display: flex; justify-content: center; align-items: flex-start;
  background: var(--navy); border-radius: var(--radius-lg); overflow: hidden;
  padding: 1.5rem 1.25rem 0;
}
/* Phones rise out of the bottom of the panel: the top of the screen shows,
   the bottom edge is cropped. */
.feature--phone .feature__stage img { width: min(15.5rem, 70%); height: auto; }
.feature--phone .feature__stage { max-height: 26rem; }
.feature--desktop .feature__stage { padding: 1.25rem; align-items: center; }
.feature--desktop .feature__stage img { width: 100%; height: auto; border-radius: var(--radius); }
.features__also { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--sand-line); color: var(--muted); max-width: 46rem; }

/* ---- Pricing ---------------------------------------------------------- */
.pricing { padding: 3rem 0; background: #fff; border-top: 1px solid var(--sand-line); border-bottom: 1px solid var(--sand-line); }
.pricing__grid { display: grid; gap: 2rem; }
.pricing h2 { margin-bottom: 1rem; }
.plans { width: 100%; border-collapse: collapse; }
.plans tr { border-top: 1px solid var(--sand-line); }
.plans tr:last-child { border-bottom: 1px solid var(--sand-line); }
.plans th, .plans td { padding: 0.95rem 0; text-align: left; vertical-align: baseline; }
.plans th { font-size: 1.15rem; font-weight: 600; width: 26%; }
.plans td { color: var(--muted); font-size: 0.95rem; padding-right: 0.5rem; }
.plans .plans__price { text-align: right; color: var(--navy); font-size: 1.35rem; font-weight: 700; white-space: nowrap; padding-right: 0; }
.plans__price span { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.pricing__note { margin-top: 0.9rem; color: var(--muted); }
.founding { border: 1px solid #F3E3A6; background: #FFF7DB; border-radius: var(--radius-lg); padding: 1.35rem 1.25rem 1.5rem; }
.founding h3 { margin-bottom: 0.75rem; }
.founding ul { padding-left: 1.15rem; margin-bottom: 1.25rem; color: #3A3220; }
.founding li + li { margin-top: 0.3rem; }

/* ---- FAQ -------------------------------------------------------------- */
.faq { padding: 3rem 0 3.25rem; }
.faq h2 { margin-bottom: 1rem; }
.faq details { border-top: 1px solid var(--sand-line); }
.faq details:last-of-type { border-bottom: 1px solid var(--sand-line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1rem 2.5rem 1rem 0; font-weight: 600; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 1.35rem;
  width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--action-text); border-bottom: 2px solid var(--action-text);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq details p { padding: 0 0 1.1rem; max-width: 44rem; color: #3B4656; }

/* ---- Closing band, footer, sticky bar ------------------------------- */
.closing { background: var(--navy); color: #fff; padding: 2.75rem 0 3rem; }
.closing p { color: #D9E3F0; margin: 0.5rem 0 1.3rem; max-width: 30rem; }
.closing__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn--call { gap: 0.5rem; background: #fff; color: var(--ink); }
.btn--call:hover { background: #E6ECF3; }
.closing .closing__call { margin-top: -0.6rem; font-weight: 500; color: #fff; }
@media (max-width: 40rem) { .closing__actions .btn { width: 100%; } }
.footer { background: var(--ink); color: #D9E3F0; padding: 1.5rem 0 1.75rem; font-size: 0.95rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.footer a { color: var(--action-on-dark); }
body.has-sticky { padding-bottom: 5rem; }
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 0.7rem 1.125rem calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(8, 27, 51, 0.96); border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.sticky:not([hidden]) { display: flex; gap: 0.6rem; }
.sticky .btn--call { flex: none; width: 3.1rem; padding: 0; }
.sticky .btn--call svg { width: 26px; height: 26px; }

/* ---- Phones and tablets: demo straight after the pitch ----------------- */
/* Below the two-column layout the demo moves up, above the offline and price
   lines, so the first screen shows the product and not only text. */
@media (max-width: 59.99rem) {
  .hero__main { display: flex; flex-direction: column; }
  .demo { order: 1; }
  .hero__offline, .hero__price, .hero__cta, .hero__note { order: 2; }
  .hero__cta { align-self: flex-start; }
  .hero__offline { margin-top: 1.4rem; }
}
@media (max-width: 47.99rem) {
  .topbar { padding-bottom: 1.25rem; }
  .topbar .pill { display: none; }
  .demo { margin-top: 1.15rem; }
  /* The sticky bar is the button on phones (see product-page.js). */
  .sticky-on .hero__cta { display: none; }
}

/* ---- Motion ----------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero__main, .signup { animation: rise 0.45s ease-out both; }
.signup { animation-delay: 0.08s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__main, .signup { animation: none; }
  .btn, .demo__icon, .faq summary::after { transition: none; }
}

/* ---- Wider screens ---------------------------------------------------- */
@media (min-width: 40rem) {
  .wrap { padding: 0 1.75rem; }
  .signup__body { padding: 1.4rem 1.5rem 1.6rem; }
  .offer { padding: 1rem 1.5rem; }
}
@media (min-width: 48rem) {
  .sticky, body.has-sticky .sticky { display: none !important; }
  body.has-sticky { padding-bottom: 0; }
}
@media (min-width: 60rem) {
  .topbar { padding: 1.4rem 0 2.5rem; }
  .hero { padding-bottom: 4rem; }
  .hero__grid { grid-template-columns: 1.2fr 0.8fr; gap: 3.5rem; align-items: start; }
  .hero__cta { display: none; } /* the form is right beside it */
  .features { padding: 5rem 0 4rem; }
  .features h2 { margin-bottom: 2.5rem; }
  .feature { grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; padding: 2.5rem 0; }
  .feature:nth-of-type(even) .feature__text { order: 2; }
  .feature--phone .feature__stage { max-height: 24rem; }
  .pricing { padding: 4.5rem 0; }
  .pricing__grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: start; }
  .faq { padding: 4.5rem 0; }
}
