/* Struck Coins website. The app's Emerald look: banknote green, gold and cream, Young Serif for titles and money. */

@font-face { font-family: 'Young Serif'; src: url('/assets/fonts/YoungSerif-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Open Sans'; font-weight: 400; src: url('/assets/fonts/OpenSans-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Open Sans'; font-weight: 600; src: url('/assets/fonts/OpenSans-Semibold.ttf') format('truetype'); font-display: swap; }

:root {
  color-scheme: light dark;
  --emerald-light: #18a06e;
  --emerald: #0a6144;
  --emerald-dark: #04372a;
  --emerald-deep: #04261c;
  --gold: #e9bc48;
  --gold-bright: #f6d36b;
  --gold-ink: #06281c;
  --ivory: #fff9e8;
  --ivory-soft: #bdddcd;

  /* The cream parts of the page; redefined for dark mode below. */
  --page: #f4eedd;
  --card: #fffcf4;
  --line: #e2d9bf;
  --text: #0d2a1f;
  --text-soft: #4c6157;
  --heading: #04372a;
  --money: #0a6144;
  --link: #0a6144;
  --engraving-on-page: rgba(10, 97, 68, .06);

  --display: 'Young Serif', Georgia, serif;
  --body: 'Open Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #051a13;
    --card: #0b2a1f;
    --line: #1c4635;
    --text: #f3eedd;
    --text-soft: #9db8ab;
    --heading: #f3eedd;
    --money: #f6d36b;
    --link: #f6d36b;
    --engraving-on-page: rgba(255, 249, 232, .035);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--page); }
h1, h2, h3, .money { font-family: var(--display); font-weight: 400; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* The banknote engraving: a white-on-transparent image used as a mask, so its color comes from background-color. */
.engraving {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url('/assets/engraving-wide.webp') center / cover no-repeat;
          mask: url('/assets/engraving-wide.webp') center / cover no-repeat;
}

/* Green header shared by every page. */
.hero {
  position: relative; overflow: hidden; color: var(--ivory);
  background: radial-gradient(ellipse at 70% 40%, #12855c 0%, var(--emerald) 40%, var(--emerald-dark) 100%);
}
.hero .engraving { background: rgba(255, 249, 232, .10); }
.hero a { color: var(--ivory); }
nav.top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 22px; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
nav.top .links { display: flex; gap: 22px; }
nav.top .links a { text-decoration: none; color: var(--ivory-soft); font-size: 15px; }
nav.top .links a:hover, nav.top .links a[aria-current] { color: var(--gold-bright); }

/* Home page hero. The phone hangs over the cream section below, so this header does not clip. */
.hero.home { overflow: visible; }
.hero.home .engraving-clip { position: absolute; inset: 0; overflow: hidden; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 36px 0 0; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; margin: 14px 0 18px; }
.hero h1 em, .gold { font-style: normal; color: var(--gold-bright); }
.hero .eyebrow { color: var(--gold-bright); }
.lede { color: var(--ivory-soft); font-size: 19px; max-width: 30em; margin: 0; }
.cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 28px 0 64px; }

/* Until the app is live this stands where the App Store button goes. */
.app-store-soon {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 14px;
  border: 1.5px solid rgba(246, 211, 107, .6); border-radius: 14px; color: var(--ivory); background: rgba(4, 38, 28, .35);
}
.app-store-soon svg { width: 26px; height: 26px; fill: currentColor; }
.app-store-soon span { display: flex; flex-direction: column; line-height: 1.2; font-size: 18px; font-weight: 600; }
.app-store-soon small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-bright); font-weight: 600; }

.stage { position: relative; z-index: 2; justify-self: center; width: 320px; margin-bottom: -120px; }
.phone { border-radius: 38px; padding: 9px; background: #0d1512; box-shadow: 0 30px 60px rgba(0, 0, 0, .35), inset 0 0 0 2px #2a3a33; }
.phone img { border-radius: 30px; }
.stage .coin { position: absolute; width: 190px; right: -110px; top: 90px; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .4)); }
.tag {
  position: absolute; left: -80px; top: 420px; background: var(--gold); color: var(--gold-ink); border-radius: 10px; padding: 8px 14px;
  font-family: var(--display); font-size: 22px; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); transform: rotate(-4deg);
}
.tag small { display: block; font-family: var(--body); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }

/* Cream sections. */
.ledger { position: relative; padding: 170px 0 80px; }
.figure { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.figure > div { padding: 28px; border-right: 1px solid var(--line); }
.figure > div:last-child { border: 0; background: var(--emerald); color: var(--ivory); }
.figure .money { font-size: 44px; display: block; line-height: 1.2; margin: 4px 0; color: var(--money); }
.figure > div:last-child .money { color: var(--gold-bright); }
.figure .eyebrow { color: var(--text-soft); }
.figure > div:last-child .eyebrow { color: var(--ivory-soft); }
.pays { max-width: 15em; margin: 0 0 28px; }
.pays span { background: linear-gradient(transparent 68%, rgba(233, 188, 72, .55) 68%); }
.fineprint { color: var(--text-soft); font-size: 14px; margin: 14px 4px 0; }

.section-head { max-width: 40em; margin: 80px 0 0; }
h2 { font-size: clamp(30px, 4vw, 40px); line-height: 1.15; margin: 0 0 10px; color: var(--heading); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.step img { border-radius: 14px; margin-bottom: 16px; width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; object-position: top; }
.step h3 { font-size: 22px; margin: 0 0 6px; color: var(--heading); }
.step p { margin: 0; color: var(--text-soft); }

.free { position: relative; overflow: hidden; background: var(--emerald-dark); color: var(--ivory); padding: 72px 0; text-align: center; }
.free .engraving { background: rgba(255, 249, 232, .07); }
.free .wrap { position: relative; }
.free h2 { color: var(--ivory); font-size: clamp(34px, 5vw, 48px); }
.free p { color: var(--ivory-soft); max-width: 36em; margin: 0 auto 26px; font-size: 18px; }

/* Privacy and support pages. */
.hero.slim { padding-bottom: 44px; }
.hero.slim h1 { position: relative; font-size: clamp(36px, 5vw, 52px); margin: 24px 0 8px; }
.hero.slim p { position: relative; color: var(--ivory-soft); margin: 0; max-width: 36em; }
.doc { position: relative; padding: 48px 0 72px; }
.doc .engraving { background: var(--engraving-on-page); }
.doc article { position: relative; max-width: 780px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 40px 44px; }
.doc h2 { font-size: 28px; margin: 40px 0 10px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 20px; margin: 26px 0 6px; color: var(--heading); }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .updated { color: var(--text-soft); font-size: 15px; }
.doc .short { background: var(--page); border-left: 4px solid var(--gold); border-radius: 0 14px 14px 0; padding: 14px 20px; margin: 0 0 8px; }
.doc .short ul { margin: 6px 0; }
.path { font-weight: 600; white-space: nowrap; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--emerald); color: var(--ivory); border-radius: 18px; padding: 24px 28px; margin: 0 0 8px; }
.contact-card .eyebrow { color: var(--ivory-soft); }
.contact-card .money { font-size: 26px; display: block; }
.contact-card a { color: var(--gold-bright); }
.btn-gold { display: inline-block; background: var(--gold); color: var(--gold-ink) !important; font-weight: 600; text-decoration: none; padding: 12px 24px; border-radius: 999px; }
details { border-top: 1px solid var(--line); padding: 4px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: var(--heading); list-style-position: outside; margin-left: 18px; }
details p, details ul { margin-top: 0; }

footer { padding: 28px 0 36px; font-size: 14px; color: var(--text-soft); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer a { color: var(--text-soft); }
footer nav a + a { margin-left: 18px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 10px; padding-top: 16px; }
  .cta { margin-bottom: 36px; }
  .stage { width: min(270px, 72vw); margin-bottom: -90px; }
  .stage .coin { width: 130px; right: -64px; top: 60px; }
  .tag { left: -44px; top: auto; bottom: 120px; font-size: 19px; }
  .ledger { padding-top: 130px; }
  .figure { grid-template-columns: 1fr; }
  .figure > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 24px; }
  .figure .money { font-size: 36px; }
  .steps { grid-template-columns: 1fr; }
  .step img { aspect-ratio: 1 / .8; }
  .doc article { padding: 26px 20px; border-radius: 18px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .brand { font-size: 19px; }
  .brand img { width: 30px; height: 30px; }
  nav.top .links { gap: 14px; }
  .doc { padding-top: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .stage .coin { animation: float 6s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-8px) rotate(4deg); } }
}
