/* Ice Age Trail Passport. Palette and type match mobile/src/components/palette.ts. */

:root {
  color-scheme: light dark;
  --paper: #f7f3e8;
  --card: #fffdf7;
  --ink: #1f2a24;
  --ink-soft: #55605a;
  --forest: #2f5d43;
  --line: #ddd6c4;
  --stamp: #2b4c7e;
  --done: #1f7a3a;
  --started: #d98e04;
  --none: #7c7c78;
  --route: #a0693a;
  --contour: rgb(47 93 67 / 0.17);
  --button: #2f5d43;
  --button-ink: #fffdf7;
  --panel: #2f5d43;
  --panel-ink: #f7f3e8;
  --panel-soft: #d6e3d9;
  --focus: #2b4c7e;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 40px);
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111915;
    --card: #19231e;
    --ink: #eee9da;
    --ink-soft: #a9b3ab;
    --forest: #8dc3a0;
    --line: #2c3a32;
    --stamp: #93b3ea;
    --done: #4cc27a;
    --started: #f0a81c;
    --none: #8a938d;
    --route: #c98f5c;
    --contour: rgb(141 195 160 / 0.13);
    --button: #8dc3a0;
    --button-ink: #0e1712;
    --panel: #1d3a2b;
    --panel-ink: #f1ebda;
    --panel-soft: #b8cbbd;
    --focus: #93b3ea;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

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

a {
  color: var(--forest);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0;
  translate: 0 -120%;
  padding: 0.6rem 1rem;
  background: var(--button);
  color: var(--button-ink);
  border-radius: 0 0 8px 8px;
  z-index: 10;
}

.skip:focus {
  translate: 0 0;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font: 700 1.1rem/1.1 var(--serif);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.4rem;
  font-size: 0.97rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.5rem;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav .nav-extra {
  display: none;
}

@media (min-width: 40em) {
  .site-nav .nav-extra {
    display: inline;
  }
}

/* Store button. Until launch it is a plain statement, not a link. */

.store-soon {
  display: inline-block;
  padding: 0.8rem clamp(1rem, 4vw, 1.35rem);
  border: 2px solid var(--button);
  border-radius: 999px;
  color: var(--ink);
  font-size: clamp(0.9rem, 4.1vw, 1.0625rem);
  font-weight: 600;
  line-height: 1.25;
}

.store-badge {
  display: inline-block;
  line-height: 0;
}

.store-badge img {
  width: 144px;
  height: 48px;
}

.on-panel .store-soon {
  border-color: var(--panel-ink);
  color: var(--panel-ink);
}

.hero {
  position: relative;
  overflow-x: clip;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 -10% auto auto;
  width: min(1100px, 130%);
  aspect-ratio: 4 / 3;
  background: var(--contour);
  -webkit-mask: url("/img/contours.svg") center / 100% 100% no-repeat;
  mask: url("/img/contours.svg") center / 100% 100% no-repeat;
  z-index: -1;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(1.5rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem);
}

@media (min-width: 56em) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 3rem;
  }
}

.nowrap {
  white-space: nowrap;
}

.hero h1 {
  font-size: clamp(2.6rem, 1.4rem + 6.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 11em;
}

.hero .lede {
  margin-top: 1.4rem;
  max-width: 28em;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero-cta {
  margin-top: 2rem;
  display: grid;
  gap: 0.7rem;
  justify-items: start;
}

.fine {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.hero-visual {
  --hero-phone: clamp(13.5rem, 58vw, 17.5rem);
  --hero-stamp: clamp(6.5rem, 30vw, 9rem);
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(26rem, 112vw, 40rem);
}

.trail * {
  fill: none;
  stroke-linejoin: round;
}

.trail-routes {
  stroke: var(--route);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 0 6.4;
}

.trail-none {
  stroke: var(--none);
  stroke-width: 3;
  stroke-dasharray: 4.5 4.5;
}

.trail-started {
  stroke: var(--started);
  stroke-width: 5.2;
  stroke-linecap: round;
}

.trail-done {
  stroke: var(--done);
  stroke-width: 5.2;
  stroke-linecap: round;
}

.hero-visual .phone {
  position: relative;
  z-index: 1;
  --phone-width: var(--hero-phone);
}

.hero-visual .stamp {
  --size: var(--hero-stamp);
  position: absolute;
  z-index: 2;
  top: 34%;
  left: calc(50% - var(--hero-phone) / 2 - var(--size) * 0.55);
}

/* Phone frame. The screenshot is any file with the iPhone 6.9 inch ratio. */

.phone {
  --phone-width: 16rem;
  margin: 0;
  width: var(--phone-width);
  aspect-ratio: 1320 / 2868;
  padding: calc(var(--phone-width) * 0.027);
  border-radius: 14% / 6.4%;
  background: #15181a;
  box-shadow:
    inset 0 0 0 1.5px #4a514d,
    0 1px 0 #6b736e,
    0 28px 50px -18px rgb(10 20 14 / 0.55),
    0 8px 18px -8px rgb(10 20 14 / 0.4);
  position: relative;
}

.phone::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 2.9%;
  left: 50%;
  width: 29%;
  height: 2.5%;
  translate: -50% 0;
  background: #000;
  border-radius: 999px;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 11.6% / 5.35%;
  background: #f7f3e8;
}

/* Passport stamp, drawn the way the app draws it. */

.stamp {
  --size: 9rem;
  width: var(--size);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  rotate: -9deg;
  border: 3px solid var(--stamp);
  border-radius: 50%;
  background: var(--paper);
  color: var(--stamp);
  opacity: 0.96;
  filter: url("#ink");
  text-align: center;
}

.stamp-inner {
  width: 84%;
  height: 84%;
  display: grid;
  place-content: center;
  gap: 0.28rem;
  border: 1px solid var(--stamp);
  border-radius: 50%;
  padding-inline: 0.4rem;
}

.stamp-name {
  font: 800 0.95rem/1.05 var(--serif);
  text-transform: uppercase;
}

.stamp-rule {
  width: 60%;
  height: 1px;
  margin-inline: auto;
  background: var(--stamp);
}

.stamp-date {
  font: 700 0.62rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-visual .stamp {
    animation: stamp-down 0.55s 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25) backwards;
  }
}

@keyframes stamp-down {
  from {
    scale: 1.3;
    opacity: 0;
  }
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section-title {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem);
  max-width: 16em;
}

.section-lede {
  margin-top: 1rem;
  max-width: 34em;
  color: var(--ink-soft);
}

.about-trail {
  border-block: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.about-copy p {
  max-width: 24em;
  font: 400 clamp(1.4rem, 1rem + 1.7vw, 2rem) / 1.3 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.about-copy p + p {
  margin-top: 1.25rem;
  font: 400 1.0625rem/1.6 var(--sans);
  letter-spacing: 0;
  color: var(--ink-soft);
  max-width: 32em;
}

.trail-figure {
  margin: 0;
}

.trail {
  width: 100%;
  height: auto;
}

.key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.key li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.key i {
  width: 1.7rem;
  border-top: 4px solid var(--done);
  border-radius: 2px;
}

.key .k-started {
  border-color: var(--started);
}

.key .k-none {
  border-top: 3px dashed var(--none);
  border-radius: 0;
}

.key .k-route {
  border-top: 4px dotted var(--route);
  border-radius: 0;
}

.trail-figure .fine {
  margin-top: 0.4rem;
}

@media (min-width: 56em) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 4rem;
  }
}

.features {
  display: grid;
  gap: clamp(3rem, 7vw, 6rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.feature {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.feature-shot {
  position: relative;
  display: grid;
  place-items: center;
  align-items: start;
  padding-top: 1.5rem;
  overflow: clip;
  isolation: isolate;
}

.feature-shot::before,
.feature-shot::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4% 6%;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.feature-shot::after {
  inset: 11% 13%;
}

.feature-shot .phone {
  --phone-width: clamp(12.5rem, 56vw, 15rem);
  margin-bottom: calc(var(--phone-width) * -0.62);
  -webkit-mask-image: linear-gradient(#000 52%, transparent 71%);
  mask-image: linear-gradient(#000 52%, transparent 71%);
}

.feature h3 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.15rem);
}

.feature p {
  margin-top: 0.8rem;
  max-width: 28em;
  color: var(--ink-soft);
}

@media (min-width: 50em) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
  }

  .feature:nth-child(even) .feature-shot {
    order: 2;
  }

  .feature-shot .phone {
    --phone-width: 15.5rem;
  }
}

.steps {
  list-style: none;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  gap: 2.25rem;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.1rem;
  align-items: start;
  position: relative;
}

.step-number {
  grid-row: span 2;
  width: 3.4rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 3px solid var(--stamp);
  border-radius: 50%;
  color: var(--stamp);
  font: 800 1.3rem/1 var(--serif);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--stamp);
}

.steps h3 {
  font-size: 1.4rem;
  align-self: center;
}

.steps p {
  color: var(--ink-soft);
  margin-top: 0.35rem;
  max-width: 24em;
}

@media (min-width: 46em) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }

  .steps li {
    grid-template-columns: 1fr;
    gap: 1.1rem 0;
  }

  .steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.7rem;
    left: 4.2rem;
    right: -1.4rem;
    border-top: 3px dotted var(--route);
  }

  .step-number {
    grid-row: auto;
  }
}

.pricing {
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: clamp(20px, 4vw, 36px);
  padding: clamp(1.75rem, 5vw, 4rem);
  display: grid;
  gap: 2rem;
}

.pricing h2 {
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.4rem);
  line-height: 1.05;
}

.pricing .terms {
  margin-top: 1rem;
  max-width: 24em;
  color: var(--panel-soft);
}

.pricing .terms-more {
  margin-top: 0.75rem;
  max-width: 28em;
  font-size: 0.95rem;
  color: var(--panel-soft);
}

.pricing a {
  color: var(--panel-ink);
}

.pricing .store {
  margin-top: 1.75rem;
}

.included {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.included li {
  position: relative;
  padding-left: 2rem;
}

.included li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.4em;
  width: 0.75rem;
  height: 0.4rem;
  border-left: 2.5px solid var(--panel-ink);
  border-bottom: 2.5px solid var(--panel-ink);
  rotate: -45deg;
}

@media (min-width: 50em) {
  .pricing {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 4rem;
    align-items: center;
  }
}

.faq {
  margin-top: clamp(1.75rem, 4vw, 3rem);
  max-width: 46rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  font: 700 1.2rem/1.3 var(--serif);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  font: 400 1.3rem/1 var(--sans);
  color: var(--forest);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .answer {
  padding-bottom: 1.3rem;
  max-width: 38em;
  color: var(--ink-soft);
}

.faq .answer p + p {
  margin-top: 0.7rem;
}

.site-footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
  background: var(--card);
  padding-block: 2.5rem 3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
}

.footer-links a {
  color: var(--ink);
  display: inline-block;
  padding-block: 0.4rem;
}

.footer-small {
  display: grid;
  gap: 0.7rem;
  max-width: 44em;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font: 700 1.1rem/1.2 var(--serif);
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.page-head {
  padding-block: clamp(1.5rem, 5vw, 3.5rem) 1rem;
  position: relative;
  isolation: isolate;
}

.page-head h1 {
  font-size: clamp(2.2rem, 1.3rem + 4.2vw, 3.6rem);
  letter-spacing: -0.025em;
}

.page-head .meta {
  margin-top: 0.8rem;
  color: var(--ink-soft);
}

.prose {
  max-width: 42rem;
  padding-bottom: 2rem;
}

.prose h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.8rem);
  margin-top: 2.75rem;
  scroll-margin-top: 1rem;
}

.prose h3 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
}

.prose p,
.prose ul,
.prose ol,
.prose dl {
  margin-top: 0.9rem;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose .summary {
  margin-top: 1.75rem;
  padding: 1.1rem 1.3rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.prose .summary p:first-child {
  margin-top: 0;
}

.terms-table {
  margin: 1rem 0 0;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}

.terms-table div {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 0.9rem 1.2rem;
}

.terms-table div + div {
  border-top: 1px solid var(--line);
}

.terms-table dt {
  font-weight: 700;
}

.terms-table dd {
  margin: 0;
}

@media (min-width: 36em) {
  .terms-table div {
    grid-template-columns: 11rem 1fr;
  }
}

.contact-card {
  margin-top: 1.75rem;
  padding: 1.4rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.contact-card a {
  font: 700 1.25rem/1.3 var(--serif);
}

.toc {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  padding: 0;
  list-style: none;
}

.landing {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(2rem, 7vw, 5rem) 2rem;
  align-items: center;
}

.landing h1 {
  font-size: clamp(2.2rem, 1.3rem + 4.4vw, 3.8rem);
  letter-spacing: -0.025em;
  max-width: 12em;
}

.landing .lede {
  margin-top: 1.1rem;
  max-width: 28em;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

.landing .actions {
  margin-top: 1.75rem;
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.button {
  display: inline-block;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.button:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.notice {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--started);
  background: var(--card);
  border-radius: 4px 12px 12px 4px;
  max-width: 32em;
}

.landing .stamp {
  --size: 11rem;
  justify-self: center;
}

@media (min-width: 46em) {
  .landing {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 3rem;
  }
}

