/* styles.css — Dealture Landing Page v4 */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Brand */
  --accent: #fa9c62;
  --accent-light: #ffe0c9;
  --accent-dark: #e8854a;

  /* Light theme */
  --bg: #ffffff;
  --bg-gradient: linear-gradient(
    180deg,
    #ffede0 0%,
    rgba(255, 237, 224, 0) 480px
  );
  --surface: #f5f5f7;
  --surface-2: #ebebed;
  --border: rgba(0, 0, 0, 0.07);
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --nav-border: rgba(0, 0, 0, 0.08);
  --device-frame: #1a1a1a;
  --device-inner: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.14);
  --shadow-device: 0 32px 80px rgba(0, 0, 0, 0.22);
  --badge-filter: none;

  /* App palette — taken from the iOS app */
  --pink: #d27bb0;
  --tint-peach: #fff2e8;
  --tint-pink: #fcecf3;
  --app-grad: linear-gradient(160deg, #ffe6d3 0%, #fcd6d4 55%, #f7bed4 100%);
  --panel-grad: var(--app-grad);
  --pill-bg: #ffffff;
  --pill-text: #231f1e;
  --pill-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(170, 90, 60, 0.1);
  --label: var(--accent-dark);

  /* Type */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial,
    sans-serif;
  --font-serif:
    "New York", ui-serif, -apple-system-ui-serif, "Times New Roman", serif;
}

[data-theme="dark"] {
  --bg: #111111;
  --bg-gradient: linear-gradient(180deg, #1f1208 0%, rgba(31, 18, 8, 0) 480px);
  --surface: #1e1e1e;
  --surface-2: #2a2a2a;
  --border: rgba(255, 255, 255, 0.08);
  --text-primary: #f5f5f7;
  --text-secondary: #aaaaaa;
  --text-tertiary: #666666;
  --nav-bg: rgba(17, 17, 17, 0.85);
  --nav-border: rgba(255, 255, 255, 0.07);
  --device-frame: #2a2a2a;
  --device-inner: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-device: 0 32px 80px rgba(0, 0, 0, 0.6);
  --badge-filter: invert(1);

  --tint-peach: #21170f;
  --tint-pink: #221520;
  --panel-grad: linear-gradient(160deg, #2b1c12 0%, #2a1621 100%);
  --pill-bg: #232323;
  --pill-text: #f2f2f2;
  --pill-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --label: var(--accent);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  background-size: 100% 480px;
  background-repeat: no-repeat;
  overflow-x: hidden;
  min-height: 100dvh;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
  }
}

img {
  display: block;
}
ul[role="list"] {
  list-style: none;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

/* Nav brand — SF Pro 13 Medium */
.nav-brand-name {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--surface);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-secondary);
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.15s;
}

.theme-toggle:hover {
  background: var(--surface-2);
  color: var(--text-primary);
  transform: scale(1.08);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Show sun in dark mode, moon in light mode */
[data-theme="light"] .icon-sun {
  display: none;
}
[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="dark"] .icon-sun {
  display: block;
}
[data-theme="light"] .icon-moon {
  display: block;
}

/* Nav Download Button — SF Pro 14 Semibold */
.nav-download {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    background 0.2s,
    transform 0.15s;
}

.nav-download:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.nav-download:active {
  transform: translateY(0);
}


/* ── Shared ────────────────────────────────────────────────── */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* Section headings — New York, same voice as the hero */
.heading-serif {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 3.8vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.cta-note {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head .heading-serif {
  margin-bottom: 14px;
}
.section-head .lead {
  max-width: 38rem;
  margin: 0 auto;
}

.app-store-badge {
  display: inline-block;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.app-store-badge img {
  height: 54px;
  width: auto;
  filter: var(--badge-filter);
  transition: filter 0.25s ease;
}
.app-store-badge:hover {
  transform: scale(1.03);
  opacity: 0.9;
}
.app-store-badge:active {
  transform: scale(0.97);
}

/* App screenshot with its baked-in App Store headline cropped off,
   so only the phone shows */
.screen-crop {
  overflow: hidden;
  border-radius: 30px;
  background: var(--app-grad);
}
.screen-crop img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -43%;
}

/* Checklist with orange tick circles */
.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.check-list li::before {
  content: "";
  flex: 0 0 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 9l3.5 3.5L14 5.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: center;
  position: relative;
  animation: fadeIn 0.8s ease-out;
}

/* Soft peach-pink glow behind the phones */
.hero::before {
  content: "";
  position: absolute;
  right: -80px;
  top: 0;
  width: 680px;
  height: 680px;
  background: radial-gradient(
    circle,
    rgba(240, 140, 175, 0.22) 0%,
    rgba(250, 156, 98, 0.12) 45%,
    transparent 70%
  );
  pointer-events: none;
}
.hero > * {
  position: relative;
}

/* Hero H1 — New York Main Title, Regular */
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 22px;
}

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 32rem;
  margin-bottom: 34px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.facts {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.facts b {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.facts span {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.hero-phones {
  position: relative;
  height: 620px;
}
.hero-phones .screen-crop {
  position: absolute;
  aspect-ratio: 600 / 1040;
  box-shadow: var(--shadow-device);
}
.hero-phones .phone-front {
  width: 290px;
  left: 0;
  top: 0;
  z-index: 2;
}
.hero-phones .phone-back {
  width: 250px;
  right: 0;
  top: 70px;
  transform: rotate(6deg);
}

/* ── Story ─────────────────────────────────────────────────── */
.story {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  border-radius: 32px;
  height: 580px;
  overflow: hidden;
}
.card--peach {
  background: var(--tint-peach);
}
.card--pink {
  background: var(--tint-pink);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.card .check-list {
  margin-top: 20px;
}

/* Step number — the cards are a real sequence */
.step {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--label);
  margin-bottom: 14px;
}
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.card .screen-crop {
  border-radius: 30px 30px 0 0;
  box-shadow: var(--shadow-lg);
}

/* Wide: text left, phone right, phone sits on the bottom edge */
.card--wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.card--wide .card-text {
  padding: 44px 0 0 40px;
}
.card--wide .card-media {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.card--wide .screen-crop {
  width: 290px;
}

/* Narrow: text on top, phone fills the rest */
.card--narrow {
  display: flex;
  flex-direction: column;
}
.card--narrow .card-text {
  padding: 36px 32px 0;
}
.card--narrow .screen-crop {
  width: 236px;
  margin: 26px auto 0;
  flex: 1;
}

/* Full: closing card across the whole grid */
.card--full {
  grid-column: 1 / -1;
  height: 480px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.card--full .card-text {
  padding: 56px 0 0 56px;
  max-width: 30rem;
}
.card--full .card-media {
  display: flex;
  justify-content: center;
  padding-top: 48px;
}
.card--full .screen-crop {
  width: 300px;
  height: 100%;
}

/* ── Topics ────────────────────────────────────────────────── */
.topics {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 100px;
  text-align: center;
}
.topics .heading-serif {
  margin-bottom: 14px;
}
.topics .lead {
  max-width: 34rem;
  margin: 0 auto 36px;
}

/* Chips styled like the app's own */
.app-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.app-pills li {
  background: var(--pill-bg);
  color: var(--pill-text);
  box-shadow: var(--pill-shadow);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

/* ── CTA ───────────────────────────────────────────────────── */
.cta {
  padding: 0 24px 100px;
}
.cta-panel {
  max-width: 1052px;
  margin: 0 auto;
  border-radius: 36px;
  background: var(--panel-grad);
  padding: 72px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(200, 90, 110, 0.28);
  margin-bottom: 28px;
}
.cta-panel .heading-serif {
  margin-bottom: 14px;
}
.cta-panel .lead {
  max-width: 30rem;
  margin-bottom: 30px;
}
.cta-panel .cta-note {
  margin-top: 14px;
}

/* ── Footer ────────────────────────────────────────────────── */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  background: var(--surface);
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* Footer brand — SF Pro 13 Medium */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* Footer links — SF Pro 13 Regular */
.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 400;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Footer copy — SF Pro 12 Regular */
.footer-copy {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-tertiary);
}


/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive — Tablet ───────────────────────────────────── */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 48px;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta,
  .facts {
    justify-content: center;
  }
  .hero-phones {
    width: 400px;
    margin: 0 auto;
  }
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .card--wide,
  .card--full {
    grid-column: 1 / -1;
  }
}

/* ── Responsive — Mobile ───────────────────────────────────── */
@media (max-width: 640px) {
  .nav {
    position: relative;
  }
  .nav-inner {
    padding: 0 16px;
  }
  .nav-download {
    display: none;
  }

  .hero {
    padding: 32px 16px 56px;
  }
  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.4rem);
  }
  .hero-subtitle {
    font-size: 0.9375rem;
  }
  .facts {
    gap: 18px;
  }
  .hero-phones {
    width: 320px;
    height: 480px;
  }
  .hero-phones .phone-front {
    width: 230px;
  }
  .hero-phones .phone-back {
    width: 196px;
    top: 56px;
  }

  .story {
    padding: 24px 16px 64px;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .card,
  .card--wide,
  .card--full {
    grid-column: auto;
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .card--wide .card-text,
  .card--narrow .card-text,
  .card--full .card-text {
    padding: 30px 24px 0;
  }
  .card--wide .card-media,
  .card--full .card-media {
    height: 380px;
    padding-top: 24px;
    align-items: flex-start;
  }
  .card--wide .screen-crop {
    height: 100%;
  }
  .card--narrow .screen-crop {
    flex: none;
    height: 380px;
  }
  .card--wide .screen-crop,
  .card--narrow .screen-crop,
  .card--full .screen-crop {
    width: 240px;
  }
  .card h3 {
    font-size: 1.5rem;
  }

  .topics {
    padding: 0 16px 64px;
  }
  .app-pills li {
    font-size: 0.875rem;
    padding: 9px 15px;
  }

  .cta {
    padding: 0 16px 64px;
  }
  .cta-panel {
    padding: 52px 22px;
    border-radius: 28px;
  }

  .footer-inner {
    gap: 16px;
  }
  .footer-links {
    gap: 4px;
  }
  .footer-links a {
    padding: 10px 14px;
  }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ── No-hover devices ──────────────────────────────────────── */
@media (hover: none) {
  .app-store-badge:hover {
    transform: none;
    opacity: 1;
  }
  .nav-download:hover {
    transform: none;
  }
}
