/* ============================================================
   CitySleuth — landing page
   Aesthetic: editorial noir × modern minimal
   ============================================================ */

:root {
  /* Palette — drawn from the app icon + in-app theme */
  --ink:        #141A24;   /* near-black */
  --ink-soft:   #2A323F;
  --charcoal:   #5B6573;
  --paper:      #FBFAF7;   /* warm cream */
  --paper-2:    #F2EFE9;
  --parchment:  #EAE6DD;
  --line:       #E3DED3;

  --red:        #E0314B;   /* signature red — fingerprint / sash */
  --red-deep:   #B81E37;
  --indigo:     #5145E8;   /* brand accent */
  --indigo-2:   #6F5BF6;
  --blue:       #3B82F6;

  --radius-lg: 28px;
  --radius:    18px;
  --radius-sm: 12px;

  --shadow-sm: 0 2px 8px rgba(20,26,36,.06);
  --shadow:    0 18px 50px -20px rgba(20,26,36,.30);
  --shadow-lg: 0 40px 90px -30px rgba(20,26,36,.45);

  --maxw: 1140px;
  --ease:  cubic-bezier(.22,.61,.36,1);

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* decorative film grain / warmth */
.bg-grain {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% -5%, rgba(81,69,232,.10), transparent 70%),
    radial-gradient(55% 45% at 0% 8%, rgba(224,49,75,.08), transparent 70%);
}

/* ---------- typography ---------- */
.display {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.9rem, 7vw, 5.1rem);
  line-height: .98;
  letter-spacing: -.02em;
}
.h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -.015em;
}
.ink-accent {
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}
.lede { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-soft); max-width: 33ch; margin-top: 1.4rem; }
.sub  { color: var(--charcoal); font-size: 1.06rem; max-width: 62ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .95rem;
  padding: .85rem 1.4rem; border-radius: 100px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--red); }
.btn-line  { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn-ghost { background: var(--ink); color: var(--paper); padding: .6rem 1.1rem; }
.btn-ghost:hover { background: var(--red); }

/* App Store badge */
.appstore-badge {
  display: inline-flex; align-items: center; gap: .7rem;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.3rem; border-radius: 14px;
  transition: transform .25s var(--ease), background .25s var(--ease);
  position: relative;
}
.appstore-badge:hover { transform: translateY(-2px); background: #000; }
.appstore-badge .apple { width: 26px; height: 26px; }
.badge-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.badge-text small { font-size: .62rem; opacity: .8; }
.badge-text strong { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 2rem; }
.cta-row.center { justify-content: center; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(251,250,247,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-color: var(--line); background: rgba(251,250,247,.9); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-icon { width: 38px; height: 38px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-word { font-family: var(--font-serif); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.brand-accent { color: var(--red); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: .95rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--red); }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 2rem; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-2); border: 1px solid var(--line);
  padding: .42rem .9rem; border-radius: 100px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(224,49,75,.5); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224,49,75,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(224,49,75,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,49,75,0); }
}
.trust {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-top: 1.8rem; font-size: .95rem; font-weight: 500; color: var(--ink-soft);
}
.trust svg { color: var(--red); flex: none; }

/* phone mockup */
.hero-art { display: flex; justify-content: center; }
.phone {
  position: relative; width: 300px; max-width: 78vw;
  border-radius: 44px; padding: 10px;
  background: linear-gradient(160deg, #20262f, #0c0f15);
  box-shadow: var(--shadow-lg);
  animation: float 7s ease-in-out infinite;
}
.phone img { border-radius: 34px; width: 100%; }
.phone-glow {
  position: absolute; inset: -30px -30px -10px; z-index: -1; border-radius: 60px;
  background: radial-gradient(60% 60% at 50% 30%, rgba(81,69,232,.30), transparent 70%);
  filter: blur(10px);
}
.phone-sm { width: 260px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* trust strip */
.strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
}
.strip-item { display: flex; align-items: center; gap: .7rem; font-size: .98rem; color: var(--ink-soft); }
.strip-item svg { width: 30px; height: 30px; flex: none; color: var(--red); background: rgba(224,49,75,.08); padding: 5px; border-radius: 9px; }
.strip-item strong { color: var(--ink); font-weight: 600; }

/* ---------- generic section ---------- */
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section[id], .hero { scroll-margin-top: 84px; }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.kicker {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red); margin-bottom: 1rem;
}
.section-head .sub { margin: 1rem auto 0; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.step {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 2.2rem 1.8rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.step-num {
  font-family: var(--font-serif); font-size: 2.4rem; font-weight: 700;
  color: var(--parchment); position: absolute; top: 1.2rem; right: 1.6rem;
}
.step-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 1.3rem;
  background: var(--ink); color: var(--paper);
}
.step:hover .step-icon { background: var(--red); }
.step-icon svg { width: 28px; height: 28px; }
.step h3 { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; margin-bottom: .5rem; }
.step p { color: var(--charcoal); font-size: .98rem; }

/* ---------- feature split ---------- */
.feature-split { background: var(--paper-2); border-block: 1px solid var(--line); }
.split-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: center; }
.split-art { display: flex; justify-content: center; }
.split-copy .kicker { color: var(--indigo); }
.split-copy .sub { margin-top: 1rem; }
.check-list { margin-top: 1.6rem; display: grid; gap: .85rem; }
.check-list li {
  position: relative; padding-left: 2rem; color: var(--ink-soft); font-weight: 500;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--indigo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ---------- features grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card-icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(224,49,75,.10); color: var(--red); margin-bottom: 1.2rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; margin-bottom: .45rem; }
.card p { color: var(--charcoal); font-size: .96rem; }

/* ---------- gallery ---------- */
.gallery { background: var(--paper-2); border-block: 1px solid var(--line); overflow: hidden; }
.shots-track {
  display: flex; gap: 1.6rem; padding: .5rem 24px 1.5rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  justify-content: flex-start;
}
.shots-track::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; width: 232px; scroll-snap-align: center; text-align: center; }
.phone-shot {
  width: 232px; padding: 7px; border-radius: 34px; margin: 0 auto;
  animation: none;
}
.phone-shot img { border-radius: 27px; }
.shot figcaption { margin-top: 1.1rem; color: var(--charcoal); font-size: .9rem; line-height: 1.4; }
.shot figcaption strong { display: block; color: var(--ink); font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; margin-bottom: .15rem; }
/* center the track when it fits, scroll when it doesn't */
@media (min-width: 1240px) {
  .shots-track { justify-content: center; }
}

/* ---------- themes ---------- */
.themes { background: var(--ink); color: var(--paper); }
.themes .kicker { color: #FF8095; }
.themes .h2 { color: var(--paper); }
.themes .sub { color: #AEB6C2; }
.theme-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; max-width: 820px; margin: 0 auto;
}
.theme-chip {
  display: inline-flex; align-items: center; gap: .6rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  padding: .8rem 1.3rem; border-radius: 100px; font-weight: 500; font-size: 1.02rem;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.theme-chip i { font-style: normal; font-size: 1.15rem; }
.theme-chip:hover { transform: translateY(-3px); background: rgba(224,49,75,.18); border-color: var(--red); }
.theme-note { text-align: center; color: #AEB6C2; margin-top: 2.4rem; font-size: 1rem; }
.theme-note strong { color: var(--paper); }

/* ---------- get / cta ---------- */
.get { background: var(--paper-2); }
.get-card {
  text-align: center; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 760px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.get-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(50% 55% at 50% 0%, rgba(81,69,232,.10), transparent 70%);
}
.get-card > * { position: relative; z-index: 1; }
.get-icon { width: 92px; height: 92px; border-radius: 22px; margin: 0 auto 1.5rem; box-shadow: var(--shadow); }
.get-card .sub { margin: 1rem auto 0; }
.notify {
  display: flex; gap: .6rem; max-width: 440px; margin: 1.8rem auto 0; flex-wrap: wrap; justify-content: center;
}
.notify input {
  flex: 1; min-width: 220px; font-family: inherit; font-size: 1rem;
  padding: .85rem 1.1rem; border: 1px solid var(--line); border-radius: 100px;
  background: var(--paper-2); color: var(--ink); outline: none;
  transition: border-color .2s, background .2s;
}
.notify input:focus { border-color: var(--indigo); background: #fff; }
.notify-note { margin-top: .9rem; font-size: .88rem; color: var(--charcoal); }
.notify-note.ok { color: var(--indigo); font-weight: 600; }

/* ---------- faq ---------- */
.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq-list { display: grid; gap: .8rem; }
details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 1.4rem; transition: border-color .25s, box-shadow .25s;
}
details[open] { border-color: transparent; box-shadow: var(--shadow); }
summary {
  list-style: none; cursor: pointer; font-weight: 600; font-size: 1.05rem;
  padding: 1.2rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; font-size: 1.6rem; font-weight: 400; color: var(--red);
  transition: transform .3s var(--ease); line-height: 1;
}
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--charcoal); padding-bottom: 1.3rem; max-width: 62ch; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #AEB6C2; padding: 3.5rem 0 2rem; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap;
  padding-bottom: 2.2rem; border-bottom: 1px solid rgba(255,255,255,.10);
}
.footer-brand { display: flex; gap: .9rem; align-items: center; }
.footer-brand img { border-radius: 10px; }
.footer-brand .brand-word { color: var(--paper); font-size: 1.2rem; }
.footer-brand p { font-size: .92rem; margin-top: .15rem; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a { font-size: .95rem; transition: color .2s; }
.footer-links a:hover { color: var(--paper); }
.footer-base {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-top: 1.6rem; font-size: .85rem; flex-wrap: wrap;
}
.footer-soon {
  color: var(--paper); background: rgba(255,255,255,.07);
  padding: .35rem .8rem; border-radius: 100px; font-weight: 500;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.steps .step:nth-child(2) { transition-delay: .08s; }
.steps .step:nth-child(3) { transition-delay: .16s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .lede { max-width: 48ch; }
  .cta-row { justify-content: center; }
  .hero-art { order: -1; margin-bottom: 1rem; }
  .split-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .split-copy { text-align: center; }
  .check-list { display: inline-grid; text-align: left; }
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .strip { grid-template-columns: 1fr; gap: .8rem; }
  .grid { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn, .cta-row .appstore-badge { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
