/* Travel Bucket landing page. Colours match apps/mobile/src/constants/theme.ts. */
:root {
  --sky: #4DCAF9;
  --sky-deep: #1A9FD6;
  --sky-soft: #DBF4FE;
  --grass: #7ACC2E;
  --grass-text: #4E8A20;
  --gold: #EBBB45;
  --gold-soft: #FDF3DA;
  --ink: #12303F;
  --ink-soft: #5B6F7B;
  --land: #E3E7EA;
  --line: #E3E8EB;
  --paper: #FFFFFF;
  --mist: #F3F9FC;

  --display: 'Avenir Next', 'Nunito Sans', system-ui, sans-serif;
  --body: 'Avenir Next', 'Nunito Sans', system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--body);
  color: var(--ink);
  background: var(--mist);
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* Hero: a photo of a famous place, picked at random and cross-faded (main.js). */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #2A7FA6;
  padding: clamp(28px, 6vw, 64px) var(--gutter) clamp(120px, 16vw, 190px);
}
.hero-photos { position: absolute; inset: 0; z-index: -1; }
.hero-photos::after { position: absolute; inset: 0; z-index: 1; }
.hero-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-photo.on { opacity: 1; animation: drift 12s ease-out both; }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
/* Shade so white text stays readable on any photo. */
.hero-photos::after {
  content: '';
  background:
    linear-gradient(90deg, rgba(6, 32, 46, .72) 0%, rgba(6, 32, 46, .42) 45%, rgba(6, 32, 46, .05) 75%),
    linear-gradient(180deg, rgba(6, 32, 46, .35) 0%, rgba(6, 32, 46, 0) 30%, rgba(6, 32, 46, .25) 100%);
}
@media (max-width: 760px) {
  .hero-photos::after { background: linear-gradient(180deg, rgba(6, 32, 46, .5), rgba(6, 32, 46, .62)); }
}
.hero-inner { max-width: var(--wrap); margin: 0 auto; }
.hero-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: clamp(40px, 9vw, 96px);
}
.logo-link { display: block; border-radius: 8px; }
.logo { width: clamp(150px, 22vw, 210px); }
.place {
  text-align: right;
  font-size: .95rem; font-weight: 600; line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
  transition: opacity .6s ease;
}
.place.fading { opacity: 0; }
.place .flag { font-size: 1.1em; margin-right: 6px; }
.place small { display: block; font-size: .78rem; font-weight: 400; opacity: .85; }
.place small a { text-decoration-color: rgba(255, 255, 255, .5); text-underline-offset: 2px; }
@media (max-width: 520px) { .place { font-size: .85rem; max-width: 17ch; } }
.hero h1 {
  font-weight: 700;
  font-size: clamp(2.9rem, 9vw, 7rem);
  line-height: .98;
  letter-spacing: -.025em;
  max-width: 10ch;
  text-wrap: balance;
}
.lede {
  margin-top: 24px;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, .94);
}
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; align-items: center;
  min-height: 52px; padding: 0 24px;
  border-radius: 999px;
  font-weight: 600; text-decoration: none;
  background: #fff; color: var(--ink);
  transition: transform .15s ease;
}
.store:hover { transform: translateY(-1px); }
.store:active { transform: translateY(1px); }

/* The interactive map, drawn as the app's pull-up sheet rising over the sky. */
.sheet {
  position: relative;
  max-width: var(--wrap);
  margin: calc(-1 * clamp(84px, 12vw, 140px)) auto 0;
  background: var(--paper);
  border-radius: 28px;
  padding: 12px clamp(16px, 3vw, 36px) clamp(20px, 3vw, 32px);
  box-shadow: 0 30px 60px -30px rgba(18, 48, 63, .35);
}
@media (max-width: 1160px) { .sheet { margin-inline: var(--gutter); } }
@media (max-width: 520px) { .sheet { margin-inline: 8px; border-radius: 22px; } }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 18px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.sheet h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.hint { color: var(--ink-soft); font-size: .975rem; margin-top: 2px; }
.figures { display: flex; gap: 10px; }
.figure {
  display: flex; flex-direction: column;
  min-width: 112px; padding: 10px 16px;
  border-radius: 16px; font-size: .9rem; font-weight: 500;
}
.figure strong { font: 700 2rem/1.05 var(--display); font-variant-numeric: tabular-nums; }
.figure.visited { background: var(--sky-soft); color: var(--sky-deep); }
.figure.bucket { background: #E9F6DC; color: var(--grass-text); }

.map-wrap { position: relative; margin-top: 20px; }
.map { aspect-ratio: 2529 / 1165; }
.map svg { width: 100%; height: 100%; display: block; }
.map path {
  fill: var(--land); stroke: #fff; stroke-width: 1; stroke-linejoin: round;
  transition: fill .18s ease;
}
.map path[data-c] { cursor: pointer; }
.map path[data-c]:hover { fill: #CBD3D8; }
.map path.v { fill: var(--sky); }
.map path.b { fill: var(--grass); }
.map path.v:hover { fill: #36B5E6; }
.map path.b:hover { fill: #6BB826; }
.map path.pop { animation: pop .35s ease; transform-box: fill-box; transform-origin: center; }
@keyframes pop { 40% { transform: scale(1.12); } }

.tip {
  position: absolute; pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  padding: 6px 12px; border-radius: 10px;
  background: var(--ink); color: #fff;
  font-size: .875rem; font-weight: 500; white-space: nowrap;
}

.progress { margin-top: 18px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; }
.link-btn {
  font: inherit; font-weight: 500; font-size: .925rem;
  color: var(--ink-soft); background: none; border: 0; padding: 4px 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }
.track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.fill { height: 100%; width: 0; border-radius: 4px; background: var(--sky); transition: width .3s ease; }

/* Friends */
.friends {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(72px, 11vw, 128px) var(--gutter) clamp(56px, 8vw, 96px);
}
.friends > h2 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
}
.section-lede { margin-top: 16px; max-width: 36rem; color: var(--ink-soft); font-size: 1.125rem; }

.feature {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(28px, 6vw, 88px);
  margin-top: clamp(56px, 8vw, 96px);
}
.feature.flip .feature-copy { order: 2; }
.feature-copy { max-width: 30rem; }
.feature h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.feature p { margin-top: 12px; color: var(--ink-soft); }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-copy { order: 0; }
}

/* Small pieces of the app UI, drawn in HTML. */
.mock {
  list-style: none; margin: 0; padding: 8px;
  background: var(--paper); border-radius: 22px;
  border: 1px solid var(--line);
}
.mock li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 14px; font-weight: 500;
}
.mock li + li { border-top: 1px solid var(--line); }
.mock li.you, .mock li.you + li { border-top-color: transparent; }
.mock .who { flex: 1; }
.av {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: .9rem; font-weight: 600; color: #fff;
  background: hsl(var(--h) 55% 52%);
  border: 2px solid #fff;
}
.rank { width: 1.25em; text-align: center; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.board li:first-child .rank { color: #B98912; }
.board li:first-child { background: var(--gold-soft); }
.board .you { background: #EEF8FD; }
.count { font: 700 1.25rem var(--display); color: var(--sky-deep); font-variant-numeric: tabular-nums; }
.flag { font-size: 1.6rem; line-height: 1; }
.avs { display: flex; }
.avs .av + .av { margin-left: -10px; }
.match li { padding-block: 14px; }
.match .avs .av { box-shadow: 0 0 0 2px var(--grass); }

.share { margin: 0; padding: 20px; }
.mini-map { aspect-ratio: 2529 / 1165; }
.mini-map svg { width: 100%; height: 100%; display: block; }
.mini-map path { fill: var(--land); stroke: #fff; stroke-width: 1.5; }
.mini-map path.v { fill: var(--sky); }
.share figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; color: var(--ink-soft); font-size: .95rem; }
.share figcaption strong { color: var(--ink); font: 600 1.125rem var(--display); }

/* Closing call to action */
.cta {
  text-align: center;
  background: var(--sky);
  color: #fff;
  padding: clamp(64px, 10vw, 112px) var(--gutter);
}
.cta img { margin: 0 auto 24px; border-radius: 22px; box-shadow: 0 12px 30px -12px rgba(18, 48, 63, .45); }
.cta h2 { font-size: clamp(2.25rem, 5.5vw, 4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.cta p { margin-top: 12px; font-size: 1.125rem; }
.cta .stores { justify-content: center; }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  max-width: var(--wrap); margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  color: var(--ink-soft); font-size: .925rem;
}

/* Motion. Only when JS is on (html.js), so nothing stays hidden without it. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(90px); } to { opacity: 1; transform: none; } }

/* Hero text comes in line by line; the map sheet then slides up like the app's pull-up sheet. */
.js .intro { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero-top .intro { animation-delay: .05s; }
.js .hero h1.intro { animation-delay: .15s; }
.js .lede.intro { animation-delay: .3s; }
.js .stores.intro { animation-delay: .42s; }
.js .sheet { animation: sheet-up .9s cubic-bezier(.16, 1, .3, 1) .45s both; }

/* Sections build in as they scroll into view (main.js adds .in). */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .feature .mock li { opacity: 0; transform: translateX(24px); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .feature.flip .mock li { transform: translateX(-24px); }
.js .feature.in .mock li { opacity: 1; transform: none; }
.js .feature.in .mock li:nth-child(1) { transition-delay: .2s; }
.js .feature.in .mock li:nth-child(2) { transition-delay: .3s; }
.js .feature.in .mock li:nth-child(3) { transition-delay: .4s; }
.js .feature.in .mock li:nth-child(4) { transition-delay: .5s; }
.js .match .av { transform: scale(0); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.js .feature.in .match .av { transform: scale(1); transition-delay: .6s; }
.mini-map path { transition: fill .4s ease; }
.js .cta img { transform: scale(.6) rotate(-8deg); opacity: 0; transition: transform .7s cubic-bezier(.3, 1.5, .5, 1) .15s, opacity .4s ease .15s; }
.js .cta.in img { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .feature .mock li, .js .match .av, .js .cta img { opacity: 1; transform: none; }
}
