/* antamio.com homepage. Built on styles.css (tokens, header, buttons, faq, footer, the dark .join band);
   this file only lays out the homepage's own sections. The page says what the app does, shows the real app,
   and offers the two install buttons on the first screen. */
:root {
  --accent: #ef693d;
  --kept: var(--action);
  --page-max: 1440px;
}
.section {
  padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem);
}
.section h2 {
  max-width: 18ch;
}
.screens-note {
  margin: 1.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- First screen: people mid-effort, the real app in hand, the two install buttons ---------- */
/* A campaign photo carries the energy; the copy sits on its dark side; the real Today view and the
   people mid-effort sit over it. */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #111517;
  color: #f6f4f0;
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(12 16 19 / 0.9) 0%, rgb(12 16 19 / 0.86) 55%, rgb(12 16 19 / 0.2) 80%, rgb(12 16 19 / 0) 100%),
    linear-gradient(0deg, rgb(12 16 19 / 0.55) 0%, rgb(12 16 19 / 0) 28%);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  min-height: clamp(36rem, calc(100svh - 6rem), 50rem);
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.hero-copy {
  min-width: 0;
  align-self: center;
  max-width: 40rem;
}
.home-hero h1 {
  font-size: clamp(2.9rem, 1.2rem + 5.2vw, 6rem);
  font-weight: 750;
  line-height: 0.95;
  letter-spacing: -0.035em;
  max-width: 13ch;
  color: #f6f4f0;
  text-wrap: balance;
}
.home-hero h1 .serif {
  color: #ff7a4c;
}
.hero-example {
  margin: 1rem 0 0;
  max-width: 38ch;
  font-size: 1rem;
  line-height: 1.5;
  color: #e9e5de;
}
.step-caption {
  display: block;
  max-width: 22ch;
}
.hero-lead {
  margin: 1.5rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.45;
  color: #e9e5de;
}
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.button.store {
  justify-content: space-between;
  min-width: min(100%, 15.5rem);
  max-width: 100%;
  min-height: 3.75rem;
  text-align: start;
}
.button.store span {
  display: grid;
  line-height: 1.15;
}
.button.store small {
  font-size: 0.75rem;
  font-weight: 500;
}
.button.store-alt {
  background-color: transparent;
  color: #f6f4f0;
  box-shadow: inset 0 0 0 1.5px #f6f4f0;
}
.home-hero .button.store-alt:hover {
  background-color: #f6f4f0;
  color: #111517;
  box-shadow: inset 0 0 0 1.5px #f6f4f0, 0 10px 24px rgb(0 0 0 / 0.3);
}
.home-hero :focus-visible {
  outline-color: #f6f4f0;
}
.hero-note {
  margin: 1rem 0 0;
  max-width: 46ch;
  font-size: 0.9375rem;
  color: #d9d4cc;
}
.hero-caption {
  position: absolute;
  inset: auto 0 0.75rem;
  margin: 0 auto;
  font-size: 0.75rem;
  color: #c9c3ba;
  text-align: start;
}
/* The real Today view, in hand over the runners' legs, running off the bottom edge. */
.hero-device {
  position: relative;
  align-self: end;
  width: 15rem;
  margin-bottom: calc(-1 * clamp(9rem, 6rem + 6vw, 13rem));
  margin-right: clamp(0rem, 4vw, 4rem);
}
.hero-phone {
  position: relative;
  display: block;
  width: 100%;
  border: 6px solid #0a0d0f;
  border-radius: 32px;
  overflow: hidden;
  background: #17272e;
  box-shadow: 0 40px 80px rgb(0 0 0 / 0.5);
}
.hero-phone img {
  display: block;
  width: 100%;
  height: auto;
}
/* Phones: the photo on top, fading into ink; the copy and buttons follow on the dark. */
@media (max-width: 700px) {
  .hero-photo {
    height: 100%;
    opacity: 0.35;
    object-position: 50% 30%;
  }
  .home-hero::before {
    background: linear-gradient(90deg, rgb(17 21 23 / 0.9), rgb(17 21 23 / 0.4));
  }
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 2.25rem 2rem;
  }
  /* Keep the install actions on the first phone screen; real app views follow below. */
  .hero-device {
    display: none;
    position: absolute;
    top: 8.75rem;
    right: var(--page-margin);
    width: 6.5rem;
    margin: 0;
    rotate: 4deg;
  }
  .hero-phone {
    border-width: 4px;
    border-radius: 18px;
  }
  .home-hero h1 {
    font-size: clamp(2.5rem, 1rem + 7vw, 3.25rem);
  }
  .hero-lead {
    margin-top: 1rem;
    font-size: 1.0625rem;
  }
  .store-buttons {
    margin-top: 1.5rem;
  }
  .store-buttons .button {
    width: 100%;
  }
  .hero-app-caption {
    display: none;
  }
  .hero-caption {
    position: static;
    padding-bottom: 1rem;
    text-align: start;
  }
}
/* ---------- How it works: three stamped steps, each with its real screen ---------- */
.how-steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.how-steps li {
  display: flex;
  flex-direction: column;
}
.step-stamp {
  display: grid;
  place-items: center;
  width: 3.4rem;
  aspect-ratio: 1.7;
  border: 4px solid var(--action);
  border-radius: 999px;
  font-weight: 650;
  color: var(--accent-text);
}
.how-steps h3 {
  margin: 1rem 0 0.4rem;
  font-size: var(--step-1);
}
.how-steps p {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
}
.step-screen {
  display: block;
  margin-top: 1.5rem;
  width: min(14rem, 100%);
  border: 1px solid var(--line);
  background: #17272e;
}
.step-screen img,
.friends-screen img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Challenge ideas ---------- */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.section-head .text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.idea-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.idea-grid a {
  position: relative;
  display: block;
  overflow: hidden;
  color: #f6f8f9;
  text-decoration: none;
  background: #2a2b31;
}
.idea-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.idea-text {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 0.15rem;
  padding: 3rem 1.1rem 1rem;
  background: linear-gradient(0deg, rgb(15 27 32 / 0.85), transparent);
}
.idea-text strong {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.idea-text span {
  font-size: 0.9375rem;
  opacity: 0.9;
}
@media (prefers-reduced-motion: no-preference) {
  .idea-grid img {
    transition: transform 0.6s var(--ease-out);
  }
  .idea-grid a:hover img {
    transform: scale(1.04);
  }
}
.idea-grid a:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Better with someone in it ---------- */
.home-friends {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.friends-copy .friends-privacy {
  font-size: 0.9375rem;
  color: var(--muted);
}
.friends-copy p {
  max-width: 44ch;
  font-size: 1.125rem;
}
.friends-screen {
  display: block;
  width: 16rem;
  border: 1px solid var(--line);
  background: #17272e;
}

/* ---------- The shared-week demo ---------- */
.preserved-example {
  padding-bottom: clamp(3rem, 2rem + 3vw, 5rem);
}
.preserved-example > details {
  border-block: 1px solid var(--line);
}
.preserved-example summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  min-height: 44px;
  padding-block: 1.5rem;
  font-size: var(--step-1);
  font-weight: 600;
  cursor: pointer;
}
.preserved-example summary::-webkit-details-marker {
  display: none;
}
.shared-example {
  max-width: 44rem;
  padding-bottom: 2rem;
}
.shared-example h3 {
  margin: 0;
}
.shared-example > p {
  margin: 0.75rem 0 0;
}
.sample-row {
  display: grid;
  grid-template-columns: 4rem 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}
.sample-row > strong {
  font-weight: 500;
}
.sample-row ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.sample-row li {
  display: grid;
  place-items: center;
  aspect-ratio: 1.7;
  border: 3px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.sample-row li.kept {
  background: var(--kept);
  color: var(--on-action);
  border-color: var(--kept);
}
.sample-row li.today {
  border-color: var(--action);
  font-weight: 650;
}
.sample-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}
.sample-controls > button:not(.button) {
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 0.6rem 1rem;
}
.shared-example .disclosure {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- Free and Plus, questions ---------- */
.plans-table {
  table-layout: fixed;
  overflow-wrap: normal;
  width: 100%;
  max-width: 48rem;
  margin-top: 2rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.plans-table th,
.plans-table td {
  padding: 0.85rem 0.75rem;
  text-align: start;
  border-block-end: 1px solid var(--line);
}
.plans-table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.plans-table tbody th {
  font-weight: 600;
}
.plan-notes {
  max-width: 48rem;
  color: var(--muted);
}
.plan-notes a {
  color: var(--accent-text);
  font-weight: 600;
}
.faq-title {
  margin-top: 3rem;
}
.home-plans .faq {
  max-width: 48rem;
  margin-top: 1rem;
}
.home-plans .faq a {
  color: var(--accent-text);
}

/* ---------- Get the app (the shared dark band) ---------- */
.join-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.join .join-note {
  max-width: 52ch;
}

/* ---------- Enlarged screen ---------- */
#screen-dialog {
  max-width: min(26rem, 92vw);
  border: 0;
  padding: 1.25rem;
  background: var(--surface);
  color: var(--ink);
}
#screen-dialog::backdrop {
  background: rgb(15 27 32 / 0.7);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.dialog-head h2 {
  font-size: var(--step-1);
}
#close-dialog {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
}
#screen-dialog img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Narrow screens ---------- */
@media (max-width: 1000px) {
  .how-steps,
  .idea-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .how-steps {
    grid-template-columns: 1fr;
  }
  .how-steps li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 9rem;
    column-gap: 1.25rem;
    align-items: start;
  }
  .how-steps li > :not(.step-screen) {
    grid-column: 1;
  }
  .step-screen {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
  }
  .home-friends {
    grid-template-columns: 1fr;
  }
  .friends-screen {
    width: min(14rem, 70%);
  }
}
@media (max-width: 650px) {
  .idea-grid {
    grid-template-columns: 1fr;
  }
  .how-steps li {
    grid-template-columns: minmax(0, 1fr) 6.5rem;
  }
  .sample-row {
    grid-template-columns: 3rem 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .idea-grid img,
  .idea-grid a:hover img {
    transition: none;
    transform: none;
  }
}

/* Inline links in notes and answers: at least 24px tall to tap. */
.plan-notes a,
.join-note a,
.home-plans .faq a {
  display: inline-block;
  min-height: 24px;
  padding-block: 3px;
}
/* The enlargeable screens and the demo's reset answer the pointer too. */
.hero-phone,
.step-screen,
.friends-screen {
  transition: translate 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.2s;
}
.hero-phone:hover,
.step-screen:hover,
.friends-screen:hover {
  border-color: var(--action);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-phone:hover,
  .step-screen:hover,
  .friends-screen:hover {
    translate: 0 -6px;
    box-shadow: 0 36px 70px rgb(18 33 40 / 0.32);
  }
}
.sample-controls > button:not(.button) {
  transition: background-color 0.2s, color 0.2s;
}
.sample-controls > button:not(.button):hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Layout pass (October 23): no stranded columns, one gap between sections ---------- */
.section + .section {
  padding-top: clamp(1.5rem, 1rem + 2vw, 3rem);
}
.screens-note {
  font-size: 0.875rem;
}
/* "All challenge plans": the site's orange wash and an arrow that steps forward. */
.section-head .text-link {
  gap: 0.4rem;
  padding-inline: 0.25rem;
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--ink);
  transition: box-shadow 0.25s var(--ease-out);
}
.section-head .text-link:hover {
  color: var(--ink);
  box-shadow: inset 0 -2.6em 0 var(--action-soft);
}
.section-head .text-link svg {
  transition: translate 0.25s var(--ease-out);
}
.section-head .text-link:hover svg {
  translate: 4px 0;
}
/* The outlined store button floods dark like the primary one (its own box-shadow used to win). */
.button.store-alt:hover {
  box-shadow: inset 20em 0 0 0 #0f1b20, 0 10px 24px rgb(18 33 40 / 0.22);
  color: #f6f8f9;
}
/* Better with someone in it: copy and the screen share the width. */
@media (min-width: 1001px) {
  .home-friends {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
  .friends-screen {
    justify-self: center;
    width: 18rem;
  }
}
/* The shared week: copy on the left, the two rows large on the right. */
.shared-example {
  max-width: none;
}
.sample-meta {
  font-size: 1.125rem;
  max-width: 34ch;
}
@media (min-width: 1001px) {
  .shared-example {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
  .shared-example > * {
    grid-column: 1;
  }
  .shared-example > .sample-rows {
    grid-column: 2;
    grid-row: 1 / span 6;
  }
  .sample-rows .sample-row:first-child {
    margin-top: 0;
  }
  .sample-row li {
    font-size: 1.0625rem;
    border-width: 4px;
  }
}
.sample-row li {
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s;
}
/* Pressing "Stamp day N": today's ring fills, then the day lands with a pop, like the app's hold-to-stamp. */
@media (prefers-reduced-motion: no-preference) {
  .sample-row li.pressing {
    animation: sample-fill 0.5s linear forwards;
  }
  .sample-row li.stamped {
    animation: sample-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
  }
}
@keyframes sample-fill {
  to {
    box-shadow: inset 0 0 0 2.5rem rgb(239 105 61 / 0.35);
  }
}
@keyframes sample-pop {
  from {
    scale: 0.6;
  }
  to {
    scale: 1;
  }
}
/* Free and Plus beside the questions on wide screens. */
@media (min-width: 1001px) {
  .home-plans {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
  }
  .home-plans > h2 {
    grid-column: 1 / -1;
    max-width: none;
  }
  .home-plans .faq-title {
    margin-top: 2rem;
  }
}
/* Phones: each step's screen readable under its step, not squeezed beside it. */
@media (max-width: 650px) {
  .how-steps li {
    display: flex;
  }
  .step-screen {
    width: min(15rem, 72%);
    margin-top: 1.25rem;
  }
}
/* The group screen sits in the same phone frame as the hero's. */
.friends-screen {
  border: 6px solid #0f1b20;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgb(18 33 40 / 0.25);
}
.preserved-example + .section {
  padding-top: clamp(2.5rem, 2rem + 2vw, 4rem);
}
@media (min-width: 1001px) {
  .home-plans .faq-title {
    margin-top: 1.25rem;
    font-size: var(--step-2);
  }
}

/* ---------- Photo-led pass (October 23): people first, the app in their hands ---------- */
.hero-points {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.0625rem;
}
.hero-points li::before {
  content: "";
  flex: none;
  width: 0.9rem;
  height: 3px;
  border-radius: 2px;
  background: var(--action);
}
/* The achievable daily walk leads; the other ideas fill around it. */
@media (min-width: 1001px) {
  .idea-grid li:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
  .idea-grid li:first-child a,
  .idea-grid li:first-child img {
    height: 100%;
  }
  .idea-grid li:first-child img {
    aspect-ratio: auto;
  }
  .idea-grid li:first-child .idea-text strong {
    font-size: var(--step-3);
    letter-spacing: -0.03em;
  }
}
/* Friends: the pull-up scene bleeds off the left edge; the group's own screen overlaps it. */
.friends-visual {
  position: relative;
}
.friends-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 50% 40%;
  background: #2a2b31;
}
.friends-visual .friends-screen {
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  width: clamp(9rem, 22vw, 16rem);
}
@media (min-width: 1001px) {
  .home-friends {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    column-gap: clamp(4rem, 7vw, 7rem);
    padding-bottom: clamp(5rem, 3rem + 4vw, 8rem);
  }
  .friends-visual {
    order: -1;
    margin-inline-start: calc(-1 * var(--page-margin));
  }
  .friends-visual .friends-screen {
    right: -4.5rem;
  }
}
@media (max-width: 1000px) {
  .friends-visual {
    margin-top: 2rem;
    margin-inline: calc(-1 * var(--page-margin));
  }
  .friends-visual .friends-screen {
    right: var(--page-margin);
    bottom: -2.5rem;
    width: min(10rem, 34%);
  }
  .home-friends {
    padding-bottom: 4rem;
  }
}
/* Phones: the step screens centred and readable. */
@media (max-width: 650px) {
  .step-screen {
    width: min(16rem, 78%);
    margin-inline: auto;
  }
}
/* Closing band: the plank at sunrise behind it, under an ink scrim. */
#join {
  isolation: isolate;
}
.join-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
#join::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(12 16 19 / 0.88) 0%, rgb(12 16 19 / 0.7) 45%, rgb(12 16 19 / 0.25) 100%);
}
/* How it works stays on paper: the dark app screens read best against it, framed like phones. */
.step-screen {
  width: min(16rem, 100%);
  border: 6px solid #111517;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgb(18 33 40 / 0.28);
}
@media (max-width: 650px) {
  .step-screen {
    width: min(13rem, 66%);
  }
}
/* The clifftop runners sit in the right half; the headline takes the open sea on the left. */
@media (min-width: 701px) {
  .hero-photo {
    object-position: 60% 45%;
  }
  .hero-device {
    margin-right: 0;
  }
}
@media (max-width: 700px) {
  .hero-photo {
    object-position: 40% 20%;
  }
  .hero-device {
    top: 9.5rem;
    width: 5.5rem;
  }
}
@media (min-width: 701px) {
  /* Keep the phone clear of faces. */
  .hero-device {
    margin-bottom: calc(-1 * clamp(13rem, 9rem + 6vw, 17rem));
  }
}
/* Keep the lead walk's landscape readable. */
.idea-grid li:first-child img {
  object-position: 50% 50%;
}

/* Large text keeps the actual words inside the photo and comparison columns. */
.home-hero h1,
.hero-copy,
.home-plans > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.button.store span {
  min-width: 0;
}

/* A plan comparison reads one feature at a time on a phone, even with enlarged text. */
@media (max-width: 700px) {
  .plans-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .plans-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border-block-end: 1px solid var(--line);
  }
  .plans-table tbody th,
  .plans-table td {
    min-width: 0;
    border: 0;
    overflow-wrap: normal;
  }
  .plans-table tbody th {
    padding-block: 1rem 0.25rem;
  }
  .plans-table td {
    padding-block: 0.5rem;
  }
  .plans-table td:last-child {
    padding-block-end: 1rem;
  }
  .plans-table td::before {
    content: attr(data-plan);
    display: block;
    font: inherit;
    font-weight: 650;
    color: var(--muted);
  }
}
