/* Archer's Journal — landing page styles
   Palette taken from the app icon: target rings (gold, red, blue, ink). */

:root {
  --gold: #f7c825;
  --red: #e8493c;
  --blue: #3ba9e3;
  --ink: #26292e;

  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --surface: #ffffff;
  --text: #1c1d21;
  --muted: #5d616b;
  --rule: #e3e5ea;
  --shadow: 0 1px 2px rgba(28, 29, 33, .06), 0 12px 32px rgba(28, 29, 33, .08);
  --phone-shadow: 0 4px 12px rgba(28, 29, 33, .12), 0 24px 60px rgba(28, 29, 33, .18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-alt: #1a1d22;
    --surface: #1e2126;
    --text: #eceef2;
    --muted: #a4a9b4;
    --rule: #2e323a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    --phone-shadow: 0 4px 12px rgba(0, 0, 0, .5), 0 24px 60px rgba(0, 0, 0, .55);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.muted { color: var(--muted); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 3.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  margin-right: auto;
}

.brand img { border-radius: 7px; }

.nav-links {
  display: flex;
  gap: 1.4rem;
  font-size: .93rem;
  color: var(--muted);
}

.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }

@media (max-width: 40rem) {
  .nav-links { display: none; }
}

/* ---------- hero ---------- */

.hero {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 56rem) {
  .hero { padding: 3rem 0 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2.75rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.032em;
  margin: 0 0 1.1rem;
  font-weight: 700;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 34rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: var(--ink);
  color: #fff;
  padding: .8rem 1.3rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.badge-soon svg { width: 21px; height: 21px; flex: none; }

.badge-soon.is-disabled { cursor: default; }

.cta-note { font-size: .88rem; color: var(--muted); }

.hero-stats {
  display: flex;
  gap: 2.2rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}

.hero-stats div { font-size: .88rem; color: var(--muted); }

.hero-stats strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -.01em;
}

/* ---------- device frames ---------- */

.phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
}

.phone {
  width: 15rem;
  flex: none;
  border-radius: 2.4rem;
  background: var(--ink);
  padding: .55rem;
  box-shadow: var(--phone-shadow);
}

.phone .screen {
  width: 100%;
  height: auto;
  border-radius: 1.95rem;
  background: #f2f2f7;
}

/* second device sits lower and slightly smaller */
.phone.back {
  transform: translateY(2.5rem) scale(.94);
  transform-origin: top center;
}

.hero .phone.back { order: -1; }

@media (max-width: 68rem) {
  .phone { width: 13.5rem; }
  .phones { gap: 1rem; }
}

@media (max-width: 44rem) {
  .phone.back { display: none; }
  .phone { width: 15rem; }
}

@media (max-width: 56rem) {
  .hero { padding-bottom: 3rem; }
}

/* ---------- sections ---------- */

section { padding: 4.75rem 0; }

.alt { background: var(--bg-alt); border-block: 1px solid var(--rule); }

.section-head { max-width: 40rem; margin-bottom: 2.75rem; }

.section-head h2::after,
.split h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 1.1rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transform-origin: left;
}

h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 0 0 .8rem;
  font-weight: 700;
}

.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

h3 {
  font-size: 1.03rem;
  margin: 0 0 .4rem;
  letter-spacing: -.01em;
  font-weight: 600;
}

/* feature grid */

.grid {
  perspective: 1000px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.4rem;
}

.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  margin-bottom: .9rem;
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  color: var(--blue);
}

.icon svg { width: 19px; height: 19px; }
.icon.g { background: color-mix(in srgb, var(--gold) 20%, transparent); color: #9a7800; }
.icon.r { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }

@media (prefers-color-scheme: dark) {
  .icon.g { color: var(--gold); }
}

/* two-column split with artwork */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 56rem) {
  .split { grid-template-columns: 1fr; gap: 2.75rem; }
}

.phones.pair { padding-bottom: 2.5rem; }

.chart-list { list-style: none; margin: 0; padding: 0; }

.chart-list li {
  padding: .95rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .85rem;
}

.chart-list li:last-child { border-bottom: 1px solid var(--rule); }

.chart-list b { display: block; font-weight: 600; }
.chart-list span { color: var(--muted); font-size: .93rem; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: .45rem;
  background: var(--blue);
}

.dot.g { background: var(--gold); }
.dot.r { background: var(--red); }

/* checklists */

.checks { list-style: none; margin: 1rem 0 0; padding: 0; }

.checks li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: .55rem;
  color: var(--muted);
  font-size: .96rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: .3rem;
  top: .5rem;
  width: 5px;
  height: 9px;
  border: solid var(--blue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checks.big li { font-size: 1rem; margin-bottom: .75rem; }

/* privacy callout */

.callout {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 2.25rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem;
  align-items: start;
  box-shadow: var(--shadow);
}

.callout h2 { font-size: 1.5rem; }
.callout p { margin: 0; }

.callout-link { margin-top: 1.25rem !important; }

.callout-link a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.callout-link a:hover { text-decoration: underline; }

@media (max-width: 40rem) {
  .callout { grid-template-columns: 1fr; padding: 1.6rem; gap: 1.1rem; }
}

.lock {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  color: #9a7800;
  flex: none;
}

.lock svg { width: 24px; height: 24px; }

@media (prefers-color-scheme: dark) { .lock { color: var(--gold); } }

/* ---------- footer ---------- */

footer {
  padding: 2.75rem 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .9rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
}

footer .spacer { margin-right: auto; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* ==========================================================================
   Motion
   All CSS, no JavaScript. Three mechanisms:
     1. transitions      — hover / focus feedback
     2. time animations  — the hero entrance, on load
     3. scroll timelines — reveals, parallax, nav state, progress bar
   (3) is wrapped in @supports so unsupporting browsers show static content;
   nothing is hidden unless the animation that reveals it can actually run.
   Everything is disabled under prefers-reduced-motion.
   ========================================================================== */

:root {
  /* decelerating, for things arriving */
  --ease-out: cubic-bezier(.22, .75, .28, 1);
  /* slight overshoot, for things responding to a pointer */
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
}

/* ---------- cross-document transition (landing <-> privacy) ---------- */

@view-transition { navigation: auto; }

@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .22s var(--ease-out) both; }
  ::view-transition-new(root) { animation: vt-in .32s var(--ease-out) both; }
}

/* ---------- interaction ---------- */

.nav-links a,
footer a { transition: color .2s ease; }

.nav-links a {
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

.card {
  transition: transform .3s var(--ease-spring),
              box-shadow .3s ease,
              border-color .3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--blue) 35%, var(--rule));
  box-shadow: var(--shadow);
}

.icon { transition: transform .35s var(--ease-spring); }
.card:hover .icon { transform: scale(1.1) rotate(-5deg); }

.badge-soon { transition: transform .2s var(--ease-spring), box-shadow .2s ease; }

.badge-soon:not(.is-disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(28, 29, 33, .18), 0 16px 40px rgba(28, 29, 33, .16);
}

.badge-soon:not(.is-disabled):active { transform: translateY(0); }

.chart-list li { transition: border-color .25s ease; }
.dot { transition: transform .3s var(--ease-spring), box-shadow .3s ease; }

.chart-list li:hover .dot {
  transform: scale(1.6);
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.callout-link a {
  display: inline-block;
  transition: transform .24s var(--ease-out);
}

.callout-link a:hover { transform: translateX(5px); }

a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- hero entrance ---------- */

/* the headline rises out of a mask, one line at a time */
.line {
  display: block;
  overflow: hidden;
  /* the mask must not clip descenders (the y in "Every") */
  padding-bottom: .1em;
  margin-bottom: -.1em;
}

.line > span { display: block; }

@keyframes line-rise {
  from { transform: translateY(105%); }
  to   { transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}

@keyframes rise-phone {
  from { opacity: 0; transform: translateY(34px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 55%, transparent); }
  50%      { box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 0%, transparent); }
}

@media (prefers-reduced-motion: no-preference) {
  h1 .line > span {
    animation: line-rise .85s var(--ease-out) both;
  }

  h1 .line:nth-child(2) > span { animation-delay: .1s; }

  .hero .eyebrow,
  .hero .lede,
  .hero .cta-row,
  .hero .hero-stats {
    animation: rise .7s var(--ease-out) both;
  }

  .hero .lede       { animation-delay: .26s; }
  .hero .cta-row    { animation-delay: .36s; }
  .hero .hero-stats { animation-delay: .44s; }

  .hero .phones { animation: rise-phone .95s var(--ease-out) .12s both; }

  /* slow breathing ring on the eyebrow dot, once the hero has settled */
  .eyebrow::before { animation: dot-pulse 3.4s ease-in-out 1.4s infinite; }
}

/* ---------- scroll-driven ---------- */

@keyframes reveal {
  from { opacity: 0; transform: translateY(44px); }
  to   { opacity: 1; transform: none; }
}

@keyframes bar-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* cards tilt up into place */
@keyframes reveal-card {
  from { opacity: 0; transform: translateY(54px) scale(.955) rotateX(9deg); }
  to   { opacity: 1; transform: none; }
}

/* list rows arrive from the left */
@keyframes reveal-row {
  from { opacity: 0; transform: translate(-26px, 16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes reveal-callout {
  from { opacity: 0; transform: translateY(46px) scale(.955); }
  to   { opacity: 1; transform: none; }
}

@keyframes reveal-lock {
  from { transform: rotate(-14deg) scale(.8); }
  to   { transform: none; }
}

/* the two devices in a pair scrub past each other while the section is on screen */
@keyframes pair-drift {
  from { transform: translateY(34px); }
  to   { transform: translateY(-34px); }
}

@keyframes pair-drift-back {
  from { transform: translateY(calc(2.5rem + 74px)) scale(.94); }
  to   { transform: translateY(calc(2.5rem - 74px)) scale(.94); }
}

@keyframes grow-x {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes drift {
  to { transform: translateY(-34px); }
}

@keyframes nav-settle {
  to {
    box-shadow: 0 1px 0 var(--rule), 0 6px 24px rgba(28, 29, 33, .07);
    background: color-mix(in srgb, var(--bg) 96%, transparent);
  }
}

/* reading-progress hairline under the nav */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress {
      animation: grow-x linear both;
      animation-timeline: scroll(root block);
    }

    .nav {
      animation: nav-settle linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 120px;
    }

    /* the hero device drifts up as the page scrolls past it */
    .hero .phone {
      animation: drift linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 90vh;
    }
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Containers are left alone; each child owns its own movement, so
       transforms never compound on nested elements. */

    /* headings rise out of a mask, accent bar draws in behind them */
    .section-head h2 .line > span,
    .split h2 .line > span {
      animation: line-rise linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 54%;
    }

    .section-head h2::after,
    .split h2::after {
      animation: bar-draw linear both;
      animation-timeline: view();
      animation-range: entry 26% entry 76%;
    }

    /* supporting copy follows its heading */
    .section-head p,
    .split .lede {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 12% entry 62%;
    }

    /* cards tilt up, staggered by column */
    .card {
      animation: reveal-card linear both;
      animation-timeline: view();
      animation-range: entry 6% entry 56%;
    }

    .card:nth-child(2) { animation-range: entry 12% entry 62%; }
    .card:nth-child(3) { animation-range: entry 18% entry 68%; }
    .card:nth-child(5) { animation-range: entry 12% entry 62%; }

    /* insight rows sweep in from the left */
    .chart-list li {
      animation: reveal-row linear both;
      animation-timeline: view();
      animation-range: entry 8% entry 54%;
    }

    .chart-list li:nth-child(2) { animation-range: entry 13% entry 59%; }
    .chart-list li:nth-child(3) { animation-range: entry 18% entry 64%; }
    .chart-list li:nth-child(4) { animation-range: entry 23% entry 69%; }
    .chart-list li:nth-child(5) { animation-range: entry 28% entry 74%; }

    /* privacy callout scales in, its lock settles upright */
    .callout {
      animation: reveal-callout linear both;
      animation-timeline: view();
      animation-range: entry 8% entry 60%;
    }

    .lock {
      animation: reveal-lock linear both;
      animation-timeline: view();
      animation-range: entry 20% entry 72%;
    }

    .checks li {
      animation: reveal-row linear both;
      animation-timeline: view();
      animation-range: entry 22% entry 68%;
    }

    .checks li:nth-child(2) { animation-range: entry 26% entry 72%; }
    .checks li:nth-child(3) { animation-range: entry 30% entry 76%; }
    .checks li:nth-child(4) { animation-range: entry 34% entry 80%; }

    /* continuous parallax: the pair keeps moving the whole time it is on screen */
    #insights .phone {
      animation: pair-drift linear both;
      animation-timeline: view();
      animation-range: cover;
    }

    #insights .phone.back { animation-name: pair-drift-back; }
  }
}

/* ---------- opt out ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
