/**
 * Marketing landing page.
 *
 * The page sells a product that lives on a phone, so the hero is built around
 * a CSS-only device mock that mirrors the real public page (see public.css):
 * same radii, same copy-row anatomy, same card rhythm. Everything is driven by
 * the tokens in base.css so dark mode needs no overrides here.
 */

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
}

/* The hairline only appears once content scrolls under the bar. Browsers that
   lack backdrop-filter get an opaque bar instead of unreadable overlap. */
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .site-header {
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
  }
}

@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .site-header {
    background: var(--bg);
  }
}

/* animation-timeline degrades to "always visible"; harmless either way, and the
   border is a hairline so its absence costs nothing on older browsers. */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-hairline linear both;
    animation-timeline: scroll();
    animation-range: 0 80px;
  }
}

@keyframes header-hairline {
  to {
    border-bottom-color: var(--border);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
  padding-block: var(--space-3);
}

.site-header__inner .brand {
  margin-right: auto;
}

.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-5);
  font-size: 15px;
  font-weight: 520;
  color: var(--text-muted);
}

.site-nav a {
  position: relative;
  padding-block: var(--space-1);
  transition: color var(--transition);
}

.site-nav a:hover {
  color: var(--text);
}

/* Underline grows from the centre instead of a colour-only hover, which reads
   as a deliberate mark rather than a link that merely changed shade. */
.site-nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 1.5px;
  border-radius: var(--radius-full);
  background: var(--accent);
  transition: left var(--transition), right var(--transition);
}

.site-nav a:hover::after {
  left: 0;
  right: 0;
}

@media (min-width: 760px) {
  .site-nav {
    display: flex;
  }
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  padding-block: var(--space-7) var(--space-8);
  overflow: hidden; /* Contains the glow so it never creates horizontal scroll. */
}

/* A single soft accent wash anchors the hero without a hard band of colour. */
.hero::before {
  content: '';
  position: absolute;
  inset: -40% 0 auto;
  height: 720px;
  background:
    radial-gradient(
      60% 55% at 70% 45%,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent 70%
    ),
    radial-gradient(
      50% 50% at 15% 10%,
      color-mix(in srgb, var(--accent) 8%, transparent),
      transparent 70%
    );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  max-width: 34ch;
}

.hero__title {
  font-size: clamp(34px, 8.5vw, 60px);
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero__subtitle {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 48ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.hero__note {
  font-size: 14.5px;
  color: var(--text-subtle);
}

.hero__visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero {
    padding-block: var(--space-9) var(--space-9);
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-8);
  }

  .hero__text {
    max-width: none;
  }

  .hero__visual {
    justify-content: flex-end;
  }
}

/* ------------------------------------------------------------------ */
/* Phone mock — echoes the real public page so the promise is literal  */
/* ------------------------------------------------------------------ */

.phone {
  /* Width drives every inner size, so the whole device scales as one unit. */
  --phone-width: min(300px, 78vw);

  width: var(--phone-width);
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 44px;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--text) 8%, var(--surface)),
    var(--surface)
  );
  box-shadow: var(--shadow-lg);
}

/* The notch: a bar rather than a cutout, which survives any screen background. */
.phone::before {
  content: '';
  display: block;
  width: 34%;
  height: 5px;
  margin: 2px auto 8px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
}

.phone__screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3) var(--space-5);
  border-radius: 36px;
  background: var(--bg);
  overflow: hidden;
}

.phone__title {
  text-align: center;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.02em;
  padding-block: var(--space-2) var(--space-1);
}

.phone__card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.phone__label {
  grid-column: 1;
  font-size: 10.5px;
  font-weight: 560;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.phone__value {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.phone__copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.phone__card--action {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  font-size: 14.5px;
  font-weight: 560;
}

/* Stand-in for the channel icon the real page renders. */
.phone__card--action::before {
  content: '';
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

/* Chevron, drawn with borders so no asset or extra element is needed. */
.phone__card--action::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: auto;
  flex-shrink: 0;
  border-top: 1.5px solid var(--text-subtle);
  border-right: 1.5px solid var(--text-subtle);
  transform: rotate(45deg);
}

@media (min-width: 900px) {
  .phone {
    --phone-width: 320px;
  }
}

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.section {
  padding-block: var(--space-8);
}

.section--muted {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section__title {
  font-size: clamp(26px, 4.6vw, 38px);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  max-width: 20ch;
}

@media (min-width: 900px) {
  .section {
    padding-block: var(--space-9);
  }

  .section__title {
    margin-bottom: var(--space-7);
  }
}

/* ------------------------------------------------------------------ */
/* Features                                                            */
/* ------------------------------------------------------------------ */

.feature-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.feature {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
}

.feature:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature__title {
  font-size: 17.5px;
  font-weight: 620;
  margin-bottom: var(--space-2);
}

.feature__body {
  color: var(--text-muted);
  font-size: 15.5px;
}

/* Cap at three columns: auto-fit alone would produce four on wide screens and
   leave the six features in an unbalanced 4 + 2. */
@media (min-width: 1000px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

/* ------------------------------------------------------------------ */
/* Use cases                                                           */
/* ------------------------------------------------------------------ */

.use-case-grid {
  display: grid;
  gap: var(--space-4);
}

.use-case {
  padding-left: var(--space-4);
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, var(--border));
}

.use-case__title {
  font-size: 17.5px;
  font-weight: 620;
  margin-bottom: var(--space-2);
}

.use-case__body {
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 54ch;
}

@media (min-width: 760px) {
  .use-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) var(--space-7);
  }
}

/* ------------------------------------------------------------------ */
/* Closing CTA                                                         */
/* ------------------------------------------------------------------ */

/* The CTA carries `section cta`; the card inside already provides the visual
   break, so the outer band only needs breathing room at the page end. */
.cta {
  padding-bottom: var(--space-9);
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-7) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      80% 120% at 50% 0%,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent 70%
    ),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.cta__title {
  font-size: clamp(24px, 4.4vw, 34px);
  letter-spacing: -0.03em;
  max-width: 22ch;
}

.cta__body {
  color: var(--text-muted);
  font-size: 16.5px;
  max-width: 48ch;
}

@media (min-width: 900px) {
  .cta__inner {
    padding: var(--space-8);
  }
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-6);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--text-subtle);
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Entrance                                                            */
/* ------------------------------------------------------------------ */

/* Hero content settles in on load; the phone trails the copy so the eye lands
   on the headline first. Content is visible without the animation running. */
@media (prefers-reduced-motion: no-preference) {
  .hero__text,
  .hero__visual {
    animation: hero-rise 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero__visual {
    animation-delay: 90ms;
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__text,
  .hero__visual {
    animation: none;
  }

  .feature:hover {
    transform: none;
  }

  .site-nav a::after {
    transition: none;
  }
}
