/*
 * wentThere's website. The app's look (src/theme): a warm off-white canvas,
 * charcoal ink, one terracotta accent; Newsreader for headings and friends'
 * tips, DM Sans for the rest.
 */

@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --canvas: #faf8f5;
  --surface: #ffffff;
  --surface-muted: #f3f0eb;
  --ink: #222222;
  --ink-secondary: #6b6862;
  --ink-tertiary: #a19d96;
  --hairline: #e9e5de;
  --accent: #e4643d;
  --accent-pressed: #c9522e;
  --accent-soft: #fceee7;
  --accent-muted: #f4c9b8;

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  --shadow-float: 0 4px 10px rgba(58, 42, 26, 0.08), 0 12px 32px rgba(58, 42, 26, 0.14);
  --shadow-pin: 0 2px 6px rgba(58, 42, 26, 0.25);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration-color: var(--accent-muted);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--accent);
}
a:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 20px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 14px;
}

/* ---------- Type ---------- */

.overline {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  font-size: clamp(44px, 6.4vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.lede {
  margin: 20px 0 0;
  max-width: 32em;
  font-size: clamp(18px, 1.8vw, 20px);
  color: var(--ink-secondary);
  text-wrap: pretty;
}

/* ---------- Header and footer ---------- */

.site-header {
  padding: 22px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark svg {
  width: 28px;
  height: 28px;
}
.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-secondary);
}
.site-nav a {
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--ink);
}

.site-footer {
  margin-top: 96px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--ink-secondary);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-footer nav {
  display: flex;
  gap: 22px;
}

/* ---------- Home: hero ---------- */

.hero {
  padding: 40px 0 24px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
}
.hero-copy {
  max-width: 560px;
}
.hero-art {
  justify-self: center;
  /* The whole phone fits on a laptop's screen: 340 × 690 is its shape. */
  width: min(100%, 360px, max(280px, calc((100svh - 150px) * 340 / 690)));
}
@media (max-width: 860px) {
  .hero {
    padding-top: 16px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-art {
    width: min(100%, 300px);
  }
}

/* ---------- The phone picture ----------
 * The app's "How it works" map scene, drawn in the app's points: the screen
 * is 320 wide, and --u is one of its points, so everything scales with it.
 */

.phone {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 340 / 690;
  padding: 2.8%;
  border-radius: 15% / 7.4%;
  background: #1d1b19;
  box-shadow: 0 30px 60px -20px rgba(58, 42, 26, 0.35), 0 12px 24px -8px rgba(58, 42, 26, 0.18),
    inset 0 0 0 1.5px #3a3733;
}
.screen {
  --u: calc(100cqw / 320);
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: calc(42 * var(--u));
  background: var(--surface-muted);
  font-size: calc(16 * var(--u));
  line-height: 1.3;
}
.screen > * {
  position: absolute;
}
.map {
  inset: 0;
  width: 100%;
  height: 100%;
}
.island {
  top: calc(11 * var(--u));
  left: 50%;
  width: calc(96 * var(--u));
  height: calc(28 * var(--u));
  margin-left: calc(-48 * var(--u));
  border-radius: calc(14 * var(--u));
  background: #000;
}
.clock {
  top: calc(15 * var(--u));
  left: calc(34 * var(--u));
  font-weight: 600;
  font-size: calc(15 * var(--u));
}
.city-chip,
.globe-button,
.chip,
.tab-bar,
.place-card {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(58, 42, 26, 0.06), 0 2px 8px rgba(58, 42, 26, 0.06);
}
.city-chip {
  top: calc(56 * var(--u));
  left: calc(14 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  height: calc(42 * var(--u));
  padding: 0 calc(14 * var(--u));
  border-radius: 999px;
  font-weight: 500;
  font-size: calc(17 * var(--u));
}
.city-chip svg {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
}
.globe-button {
  top: calc(56 * var(--u));
  right: calc(14 * var(--u));
  display: grid;
  place-items: center;
  width: calc(42 * var(--u));
  height: calc(42 * var(--u));
  border-radius: 50%;
}
.globe-button svg {
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
}
.chips {
  top: calc(108 * var(--u));
  left: calc(14 * var(--u));
  display: flex;
  gap: calc(7 * var(--u));
  white-space: nowrap;
}
.chip {
  display: flex;
  align-items: center;
  gap: calc(5 * var(--u));
  height: calc(32 * var(--u));
  padding: 0 calc(13 * var(--u));
  border-radius: 999px;
  font-weight: 500;
  font-size: calc(14 * var(--u));
}
.chip svg {
  width: calc(13 * var(--u));
  height: calc(13 * var(--u));
}
.chip.on {
  background: var(--ink);
  color: #fff;
}

/* A friend's pick: the place's category, with their face on the rim (decision 0021). */
.pin {
  --size: calc(36 * var(--u));
  left: calc(var(--x) * var(--u) - var(--size) / 2);
  top: calc(var(--y) * var(--u) - var(--size) / 2);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: calc(2 * var(--u)) solid var(--surface);
  background: var(--tint);
  box-shadow: var(--shadow-pin);
  display: grid;
  place-items: center;
  animation: pin-in 520ms var(--spring) both;
  animation-delay: calc(300ms + var(--i) * 90ms);
}
.pin > svg {
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
  color: #fff;
}
.pin .face {
  position: absolute;
  left: calc(50% + 12.7 * var(--u) - 10 * var(--u));
  top: calc(50% + 12.7 * var(--u) - 10 * var(--u));
}
.pin.selected {
  --size: calc(41 * var(--u));
  box-shadow: 0 0 0 calc(2.5 * var(--u)) var(--accent), var(--shadow-pin);
}
.face {
  display: grid;
  place-items: center;
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
  border-radius: 50%;
  border: calc(1.5 * var(--u)) solid var(--surface);
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: calc(7.5 * var(--u));
  letter-spacing: 0.02em;
}

/* Categories (src/data/categories.ts): the pin colour, and a photo's fallback wash. */
.eat {
  --tint: #d1603d;
  --wash: #fbede6;
}
.coffee {
  --tint: #8b6348;
  --wash: #f4ece5;
}
.drinks {
  --tint: #9a4e68;
}
.do {
  --tint: #4f74a0;
}
.see {
  --tint: #6e62a0;
  --wash: #eeecf6;
}
.outdoors {
  --tint: #5f8469;
}

.place-card {
  left: calc(12 * var(--u));
  right: calc(12 * var(--u));
  bottom: calc(96 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
  padding: calc(10 * var(--u));
  border-radius: calc(18 * var(--u));
  box-shadow: var(--shadow-float);
  animation: card-in 600ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
  animation-delay: 1200ms;
}
.place-photo {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  border-radius: calc(14 * var(--u));
  background: linear-gradient(145deg, var(--wash), #f6d9cc);
  color: var(--tint);
}
.place-photo svg {
  width: calc(26 * var(--u));
  height: calc(26 * var(--u));
}
.place-body {
  min-width: 0;
  display: grid;
  gap: calc(4 * var(--u));
}
.place-name {
  font-weight: 600;
  font-size: calc(17 * var(--u));
  letter-spacing: -0.01em;
}
.place-who {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  font-size: calc(13 * var(--u));
  color: var(--ink-secondary);
}
.place-who .face {
  border: 0;
  font-size: calc(8 * var(--u));
}
.place-tip {
  font-family: var(--serif);
  font-style: italic;
  font-size: calc(15 * var(--u));
  white-space: nowrap;
}

.tab-bar {
  left: calc(14 * var(--u));
  right: calc(14 * var(--u));
  bottom: calc(18 * var(--u));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(62 * var(--u));
  padding: calc(5 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: calc(10.5 * var(--u));
  font-weight: 500;
}
.tab {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: calc(3 * var(--u));
  border-radius: 999px;
}
.tab svg {
  width: calc(22 * var(--u));
  height: calc(22 * var(--u));
}
.tab.on {
  background: var(--surface-muted);
  color: var(--accent);
}

@keyframes pin-in {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(calc(24 * var(--u)));
  }
}

/* ---------- Home: sections ---------- */

.section {
  padding-top: 112px;
}
.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.step-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.step-icon svg {
  width: 22px;
  height: 22px;
}
.step p {
  margin: 10px 0 0;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

/* From your photos: copy beside a "Where you went" sheet, as the app shows it. */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}
.facts {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-secondary);
}
.facts li {
  position: relative;
  padding-left: 22px;
}
.facts li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.visits {
  justify-self: center;
  width: min(100%, 420px);
}
.visits-card {
  padding: 26px 22px 22px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
}
.visits-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
}
.visits-sub {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink-secondary);
}
.visits-day {
  margin: 22px 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.visit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.visit + .visit {
  border-top: 1px solid var(--hairline);
}
.visit-photo {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--wash);
  background: linear-gradient(145deg, var(--wash), color-mix(in srgb, var(--tint) 24%, var(--wash)));
  color: var(--tint);
}
.visit-photo svg {
  width: 22px;
  height: 22px;
}
.visit-photo .count {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.visit-body {
  flex: 1;
  min-width: 0;
}
.visit-name {
  font-weight: 600;
  font-size: 16px;
}
.visit-meta {
  font-size: 13px;
  color: var(--ink-secondary);
}
.rating {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.rating.on {
  background: var(--accent-soft);
  color: var(--accent-pressed);
}
.rating svg {
  width: 13px;
  height: 13px;
}
.visits-button {
  display: grid;
  place-items: center;
  height: 50px;
  margin-top: 14px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.support-card {
  padding: 36px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.support-card p {
  margin: 12px 0 0;
  font-size: 18px;
}

@media (max-width: 860px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
@media (max-width: 720px) {
  .section {
    padding-top: 80px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .step,
  .support-card {
    padding: 24px;
  }
}
@media (max-width: 400px) {
  .visits-card {
    padding: 22px 16px 16px;
  }
  .visit {
    gap: 12px;
  }
}

/* ---------- About and the privacy policy ---------- */

.page {
  max-width: 720px;
  padding-top: 40px;
}
.page h1 {
  font-size: clamp(40px, 5.4vw, 56px);
}
.page .updated {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink-tertiary);
}
.page h2 {
  margin-top: 48px;
  font-size: 28px;
  line-height: 1.2;
}
.page p,
.page ul {
  margin: 16px 0 0;
  text-wrap: pretty;
}
.page ul {
  padding-left: 1.2em;
}
.page li + li {
  margin-top: 8px;
}
.page li::marker {
  color: var(--accent);
}
.page strong {
  font-weight: 600;
}
.page .small {
  margin-top: 40px;
  font-size: 15px;
  color: var(--ink-secondary);
}
.beliefs {
  display: grid;
  gap: 20px;
  margin: 20px 0 0;
}
.beliefs dt {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
}
.beliefs dd {
  margin: 4px 0 0;
  color: var(--ink-secondary);
}

/* ---------- 404 ---------- */

.lost {
  padding-top: 96px;
  text-align: center;
}
.lost .lede {
  margin-left: auto;
  margin-right: auto;
}

@media (prefers-reduced-motion: reduce) {
  .pin,
  .place-card {
    animation: none;
  }
}
