/* Photerra — shared design system */

:root {
  /* Palette */
  --cream: #F8F6F1;
  --cream-2: #F1EDE4;
  --cream-3: #E8E2D4;
  --ink: #2C2A26;
  --ink-2: #4A463F;
  --ink-3: #78736A;
  --line: #D9D3C4;
  --line-soft: #E6E0D0;

  /* App-derived accents — muted, photography-friendly */
  --moss: #5C6B4E;       /* deep map-green */
  --sage: #93AB90;       /* soft sage (from current site) */
  --clay: #C97B4F;       /* warm terracotta */
  --sky:  #6B8FA8;       /* muted map water */
  --gem:  #2A7F62;       /* gem pin green */

  /* Typography */
  --serif: 'Fraunces', 'GT Super', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

  /* Layout */
  --max: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

html {
  /* Clip horizontal overflow without creating a scroll container so
     position: sticky on the nav still works. `overflow-x: hidden` would
     break sticky; `clip` doesn't. iOS 16+ / Safari 16+ (Sept 2022). */
  overflow-x: clip;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* Typography scale */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.02em;
  line-height: 0.98;
  font-size: clamp(44px, 7.2vw, 108px);
  text-wrap: balance;
}
.display-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.015em;
  line-height: 1.02;
  font-size: clamp(36px, 4.8vw, 68px);
  text-wrap: balance;
}
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 72, "SOFT" 30;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-size: clamp(30px, 3.6vw, 48px);
  text-wrap: balance;
}
.h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "opsz" 36;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* --ink-3 is too light against cream/cream-2 (~3:1) for 12px text;
     --ink-2 gives ~7.8:1 and still reads as a muted secondary label. */
  color: var(--ink-2);
}
a.eyebrow-link {
  text-decoration: none;
  transition: color 0.15s ease;
}
a.eyebrow-link:hover,
a.eyebrow-link:focus-visible { color: var(--ink); }
.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-2);
  line-height: 1.55;
  text-wrap: pretty;
}
.small { font-size: 14px; color: var(--ink-2); }

/* Container */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--cream) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line-soft); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em;
  font-weight: 500;
}
.brand-mark {
  width: 28px; height: 28px; display: block; flex-shrink: 0;
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links a {
  text-decoration: none; font-size: 14.5px; color: var(--ink-2);
  font-weight: 500; letter-spacing: -0.002em;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
/* Specificity bump: .nav-links a sets color: var(--ink-2), which would
   otherwise override .nav-cta's color and render "Get the app" as dark
   text on a dark button. */
.nav-links a.nav-cta,
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 999px;
  font-weight: 500; font-size: 14px; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
  transition: transform .15s ease, background .15s;
}
.nav-links a.nav-cta:hover,
.nav-cta:hover { background: #1a1917; color: var(--cream); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s, border-color .15s;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: #1a1917; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; }

/* Store badges (text-only, clean) */
.stores { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 12px;
  text-decoration: none; transition: background .15s;
  min-width: 160px;
}
.store-badge:hover { background: #1a1917; }
.store-badge svg { width: 22px; height: 22px; flex-shrink: 0; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge-text small { font-size: 10.5px; opacity: .78; letter-spacing: 0.04em; }
.store-badge-text strong { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }

/* Sections */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 720px; margin-bottom: clamp(32px, 4vw, 56px);
}

/* Footer */
footer.site {
  background: var(--ink); color: var(--cream);
  padding: 80px 0 40px;
}
footer.site .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
footer.site h3 {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: color-mix(in oklab, var(--cream) 55%, transparent);
  margin: 0 0 16px;
}
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 10px; }
footer.site a {
  color: color-mix(in oklab, var(--cream) 80%, transparent);
  text-decoration: none; font-size: 14.5px;
}
footer.site a:hover { color: var(--cream); }
footer.site .brand { color: var(--cream); }
/* (Removed `.brand-mark { background: cream; color: ink }` — that was
    styling the old text-based "P" tile. The real PNG logo has its own
    transparent background and reads cleanly on the dark footer.) */
footer.site .foot-tag {
  color: color-mix(in oklab, var(--cream) 65%, transparent);
  max-width: 340px; margin-top: 16px; font-size: 14.5px;
}
footer.site .foot-meta {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between;
  padding-top: 40px; margin-top: 40px;
  border-top: 1px solid color-mix(in oklab, var(--cream) 14%, transparent);
  font-size: 13px;
  color: color-mix(in oklab, var(--cream) 55%, transparent);
}

@media (max-width: 860px) {
  footer.site .wrap { grid-template-columns: 1fr 1fr; }
  footer.site .brand-col { grid-column: 1 / -1; }
  .nav-links a.hide-sm { display: none; }
}
@media (max-width: 560px) {
  footer.site .wrap { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
}
@media (max-width: 460px) {
  /* Brand logo already links home — drop the redundant text link. */
  .nav-links a.hide-xs { display: none; }
  .nav-links { gap: 12px; }
  .nav-cta { font-size: 13.5px; padding: 9px 14px; }
}
@media (max-width: 420px) {
  /* Icon-only CTA on narrow phones — text would overflow the nav bar */
  .nav-cta .nav-cta-label { display: none; }
  .nav-cta { padding: 10px; gap: 0; }
  .nav-cta svg { width: 16px; height: 16px; }
}

/* Utilities */
.grid { display: grid; gap: 24px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap-gap { gap: 16px; flex-wrap: wrap; }

/* Dot pulse */
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gem); position: relative;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--gem) 50%, transparent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--gem) 55%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Subtle rules */
hr.rule {
  border: 0; height: 1px; background: var(--line-soft); margin: 0;
}

/* Scroll reveal util (opt-in) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============== ACCESSIBILITY ============== */

/* Visually hidden but read by screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  border: 0;
}

/* Keyboard focus ring — only shown for keyboard users, not mouse clicks */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gem);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible,
.nav-cta:focus-visible,
.store-badge:focus-visible,
.map-tab:focus-visible,
.pin:focus-visible,
.faq-item summary:focus-visible { outline-offset: 3px; }

/* Skip-to-content link — first element injected, visible on focus */
.skip-link {
  position: absolute; top: -40px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--ink); color: var(--cream);
  text-decoration: none; font-weight: 500; font-size: 14px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .dot { animation: none; box-shadow: 0 0 0 0 transparent; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
