/*
 * StepLore website. Colors, typefaces and shapes come from the mobile app
 * (mobile/src/StepLore.Mobile.App/Resources/Styles): change them there first.
 * Mobile first; wider layouts from 640px (tablet) and 960px (desktop).
 */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colors.xaml */
  --paper: #f0f1e8;
  --surface: #fffef7;
  --white: #ffffff;
  --ink: #111914;
  --muted: #556158;
  --line: #cdd3c8;
  --forest: #175c35;
  --forest-dark: #0d4225;
  --brand-green: #084c2b;
  --gold: #f2c94c;
  --segment: #e2e8df;
  --segment-stroke: #b7c4b8;
  --on-forest-muted: #c7d8cc;
  --notice: #fff8d7;

  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* The app's signature shape: rounded top-left and bottom-right corners only. */
  --radius: 22px;
  --radius-small: 12px;

  --gutter: clamp(16px, 5vw, 40px);
  --section-space: clamp(56px, 9vw, 112px);
  --max-width: 1160px;
  --header-height: 72px;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

a:hover {
  color: var(--forest-dark);
}

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

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

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--forest-dark);
  color: var(--white);
  border-radius: var(--radius-small);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--white);
}

main:focus {
  outline: none;
}

.container {
  width: 100%;
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: calc(760px + 2 * var(--gutter));
}

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

/* Type, as Typography.xaml and Styles.xaml */

.eyebrow {
  margin: 0 0 10px;
  color: var(--forest-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-on-dark,
.download .eyebrow-on-dark {
  color: var(--gold);
  font-size: 0.8125rem;
}

.wordmark {
  color: var(--forest-dark);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
}

.page-title {
  font-size: clamp(2.25rem, 5.2vw, 3.5rem);
}

.section-title {
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
}

.card-title {
  margin-bottom: 8px;
  font-size: 1.375rem;
}

.lead {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  line-height: 1.55;
}

.section-lead {
  max-width: 62ch;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 1.125rem;
}

.text-link {
  font-weight: 700;
}

.text-link::after {
  content: " →";
}

/* Buttons: PrimaryButton (gold) and SecondaryButton (segment) */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-small);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--gold);
  color: var(--forest-dark);
}

.button-primary:hover {
  background: #e8bc35;
  color: var(--forest-dark);
}

.button-secondary {
  background: var(--segment);
  color: var(--forest-dark);
}

.button-secondary:hover {
  background: #d4dcd0;
  color: var(--forest-dark);
}

.button-small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
}

.brand-on-dark .wordmark {
  color: var(--white);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav-links {
  display: flex;
  gap: 24px;
}

.site-nav-links a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.site-nav-links a:hover,
.site-nav-links a[aria-current="page"] {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.language-switch img {
  width: 24px;
  height: 16px;
  border: 1px solid #aeb9ad;
  border-radius: 6px 0 6px 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-small);
  background: var(--segment);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--forest-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Phones: the navigation folds into a menu, when scripts run. Without them it wraps under the logo. */
@media (max-width: 759px) {
  .site-header-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-bottom: 12px;
  }

  .js .nav-toggle {
    display: block;
  }

  .js .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 4px 0 20px;
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .site-nav-links {
    flex-direction: column;
    gap: 0;
  }

  .js .site-nav-links a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.125rem;
  }

  .js .site-nav-actions {
    justify-content: space-between;
    padding-top: 8px;
  }
}

/* Sections */

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

.section-paper {
  background: var(--paper);
}

.page-hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(8px, 2vw, 24px);
}

.page-hero + .section:not(.section-paper) {
  padding-top: clamp(32px, 5vw, 56px);
}

.page-hero.status {
  padding-bottom: var(--section-space);
}

.page-hero .lead + p {
  margin-top: 28px;
}

/* Cards: SignatureCard */

.card {
  padding: 26px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius) 0 var(--radius) 0;
}

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

/* Home hero */

.hero {
  padding: clamp(40px, 7vw, 88px) 0 var(--section-space);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 72px;
  }
}

/* The phone: an illustration of the app's Explore screen */

.phone {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto;
  padding: 12px;
  background: var(--ink);
  border-radius: 46px;
  box-shadow: 0 40px 80px -30px rgb(13 66 37 / 45%), 0 18px 36px -18px rgb(17 25 20 / 35%);
}

.phone::before {
  content: "";
  position: absolute;
  inset: -40px -60px auto auto;
  z-index: -1;
  width: 260px;
  height: 260px;
  background: var(--gold);
  border-radius: 120px 0 120px 0;
  opacity: 0.55;
}

.phone-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 18px 20px;
  background: var(--surface);
  border-radius: 34px;
  overflow: hidden;
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-top img {
  width: 30px;
  height: 20px;
  border: 1px solid #aeb9ad;
  border-radius: 8px 0 8px 0;
}

.phone .eyebrow {
  margin: 4px 0 0;
  font-size: 0.6875rem;
}

.phone-title {
  margin: -8px 0 0;
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.1;
}

.segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--segment);
  border: 1px solid var(--segment-stroke);
  border-radius: 14px 0 14px 0;
}

.segment {
  padding: 7px 4px;
  border-radius: 10px 0 10px 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: center;
}

.segment.is-selected {
  background: var(--forest-dark);
  color: var(--white);
}

.track-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius) 0 var(--radius) 0;
  overflow: hidden;
}

.track-card-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.track-card-body {
  padding: 12px 14px 14px;
}

.track-card-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.15;
}

.track-card-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--forest);
  border-radius: 9px 0 9px 0;
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
}

.continuation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: var(--forest-dark);
  border-radius: var(--radius) 0 var(--radius) 0;
  color: var(--white);
}

.continuation strong {
  display: block;
  font-size: 0.875rem;
}

.continuation small {
  display: block;
  color: var(--on-forest-muted);
  font-size: 0.6875rem;
}

.continuation-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--gold);
  border-radius: 9px 0 9px 0;
}

.continuation-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--forest-dark);
  stroke-width: 2;
  stroke-linejoin: round;
}

/* Steps, modes and facts */

.steps,
.modes {
  display: grid;
  gap: 16px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  background: var(--gold);
  border-radius: 12px 0 12px 0;
  color: var(--forest-dark);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
}

.mode-summary {
  margin-bottom: 10px;
  color: var(--forest) !important;
  font-weight: 700;
}

.modes + p {
  margin-top: 28px;
}

@media (min-width: 640px) {
  .modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .modes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.icon {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--forest);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.split {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 72px;
  }
}

.facts {
  display: grid;
  gap: 12px;
}

.fact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px 0 16px 0;
  font-weight: 600;
}

/* Photos */

.gallery {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.photo {
  margin: 0;
}

.photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--segment);
  border-radius: var(--radius) 0 var(--radius) 0;
}

@media (min-width: 960px) {
  .gallery .photo img {
    aspect-ratio: 4 / 5;
  }
}

.photo figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 10px;
}

.photo-place {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.photo-credit {
  color: var(--muted);
  font-size: 0.75rem;
}

.photo-credit a {
  color: inherit;
  white-space: nowrap;
}

/* Download band: ContinuationCard */

.download {
  background: var(--forest-dark);
  color: var(--white);
}

.download p {
  color: var(--on-forest-muted);
  font-size: 1.125rem;
}

.download-inner {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 960px) {
  .download-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 64px;
  }
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  min-height: 60px;
  padding: 10px 20px 10px 16px;
  background: var(--gold);
  border-radius: var(--radius) 0 var(--radius) 0;
  color: var(--forest-dark);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.store-button small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
}

.store-button:hover {
  background: #e8bc35;
  color: var(--forest-dark);
}

.store-button.is-soon {
  background: transparent;
  border: 1px solid rgb(255 255 255 / 35%);
  color: var(--white);
}

.store-button.is-soon small {
  color: var(--on-forest-muted);
}

.store-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* How it works */

.timeline {
  counter-reset: journey;
  display: grid;
  gap: 0;
  margin-top: 32px;
}

.timeline li {
  position: relative;
  padding: 0 0 32px 64px;
  counter-increment: journey;
}

.timeline li::before {
  content: counter(journey);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--forest-dark);
  border-radius: 12px 0 12px 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.timeline li::after {
  content: "";
  position: absolute;
  top: 52px;
  bottom: 8px;
  left: 21px;
  width: 2px;
  background: var(--line);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li:last-child::after {
  display: none;
}

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

.callout {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--notice);
  border: 1px solid #ecdca0;
  border-radius: var(--radius) 0 var(--radius) 0;
}

.callout .icon {
  width: 28px;
  height: 28px;
  stroke: #9b6a00;
}

.faq {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px 0 16px 0;
}

.faq summary {
  position: relative;
  padding: 18px 56px 18px 20px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--forest);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

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

.faq details p {
  padding: 0 20px 20px;
  color: var(--muted);
}

/* About and Privacy */

.prose h2 {
  margin: 40px 0 12px;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
}

.prose h2:first-child,
.prose .notice + h2 {
  margin-top: 0;
}

.prose .notice + h2 {
  margin-top: 40px;
}

.notice {
  padding: 18px 20px;
  background: var(--notice);
  border-radius: 16px 0 16px 0;
}

.quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--forest-dark);
}

.credits {
  display: grid;
  gap: 12px;
  margin: 20px 0 24px;
}

.credits li {
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
}

.credits strong {
  color: var(--ink);
}

.table-scroll {
  margin: 0 0 1em;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Footer */

.site-footer {
  padding: 56px 0 28px;
  background: var(--ink);
  color: var(--on-forest-muted);
}

.site-footer a {
  color: var(--white);
}

.site-footer-inner {
  display: grid;
  gap: 32px;
}

.footer-tagline {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.footer-nav ul {
  display: grid;
  gap: 10px;
}

.footer-nav a {
  text-decoration: none;
}

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

.footer-meta {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-meta p {
  margin: 0;
}

.site-footer .language-switch {
  color: var(--white);
}

.footer-legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 14%);
  font-size: 0.875rem;
}

@media (min-width: 760px) {
  .site-footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* Consent banner */

.consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  max-width: 560px;
  margin-left: auto;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius) 0 var(--radius) 0;
  box-shadow: 0 24px 60px -20px rgb(17 25 20 / 40%);
}

.consent[hidden] {
  display: none;
}

.consent-title {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.consent p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

@media print {
  .site-header,
  .site-footer,
  .consent,
  .phone,
  .download {
    display: none;
  }
}
