/* Dailyish marketing site — shared styles.
   Grounded in BRAND_KIT.md: SF-rounded type, #8E5AF5 accent, 16pt card radius,
   20pt horizontal edge, gentle/encouraging voice. Light + dark via prefers-color-scheme. */

:root {
  /* Accent (matches AccentColor.colorset) */
  --accent: #8E5AF5;
  --accent-deep: #5B3CC4;
  --accent-soft: #D9CBFB;

  /* Habit palette accents used as feature cues */
  --hue-blue:   #4A8FD9;
  --hue-orange: #E8734A;
  --hue-green:  #4FC878;
  --hue-pink:   #F270B3;
  --hue-yellow: #F5C542;
  --hue-mint:   #3DC9B0;
  --hue-cobalt: #1F70EB;

  /* Surfaces (light) */
  --bg:           #FBF9FF;
  --bg-elevated:  #FFFFFF;
  --bg-tinted:    rgba(142, 90, 245, 0.06);
  --border:       rgba(20, 18, 32, 0.08);
  --border-strong:rgba(20, 18, 32, 0.14);

  /* Text */
  --ink:          #1A1726;
  --ink-soft:     #4A4759;
  --ink-mute:     #7C7990;

  /* Rhythm */
  --edge: 20px;
  --radius-card: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(20, 18, 32, 0.04), 0 8px 24px rgba(20, 18, 32, 0.06);
  --shadow-hero: 0 20px 60px rgba(142, 90, 245, 0.22), 0 4px 12px rgba(20, 18, 32, 0.08);

  --font-rounded:
    ui-rounded,
    "SF Pro Rounded",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Inter",
    Roboto,
    sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0F0D1A;
    --bg-elevated:  #181527;
    --bg-tinted:    rgba(142, 90, 245, 0.10);
    --border:       rgba(255, 255, 255, 0.07);
    --border-strong:rgba(255, 255, 255, 0.14);

    --ink:          #F1EFFA;
    --ink-soft:     #C5C2D6;
    --ink-mute:     #8A879C;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-hero: 0 20px 60px rgba(142, 90, 245, 0.35), 0 4px 12px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-rounded);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover { color: var(--accent-deep); }

img { display: block; max-width: 100%; height: auto; }

/* ---- Layout primitives ---- */

.page { width: 100%; }

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

.section {
  padding: 80px 0;
}
@media (max-width: 720px) {
  .section { padding: 56px 0; }
}

/* ---- Header / nav ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.10); }

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--ink); }
.nav .pill {
  background: var(--ink);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
}
.nav .pill:hover {
  background: var(--accent);
  color: white;
}
@media (max-width: 520px) {
  .nav { gap: 12px; }
  .nav a:not(.pill) { display: none; }
}

/* ---- Hero ---- */

.hero {
  position: relative;
  padding-top: 64px;
  padding-bottom: 24px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -180px 0 auto 0;
  height: 760px;
  background:
    radial-gradient(800px 480px at 70% 10%, rgba(242, 112, 179, 0.20), transparent 60%),
    radial-gradient(900px 540px at 20% 0%,  rgba(142, 90, 245, 0.25), transparent 60%),
    radial-gradient(1100px 600px at 50% 30%, rgba(63, 184, 224, 0.16), transparent 60%);
  z-index: -1;
  pointer-events: none;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  background: var(--bg-tinted);
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 18px 0;
}
.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 0 28px 0;
}
@media (max-width: 880px) {
  .hero .lede { margin-left: auto; margin-right: auto; }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
@media (max-width: 880px) {
  .cta-row { justify-content: center; }
}

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #111;
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  font-family: var(--font-rounded);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.20);
}
.appstore-badge:hover {
  transform: translateY(-1px);
  color: white;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
.appstore-badge svg { width: 28px; height: 28px; fill: white; flex-shrink: 0; }
.appstore-badge .stack { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore-badge .stack .small { font-size: 0.72rem; opacity: 0.85; font-weight: 500; }
.appstore-badge .stack .big   { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }

.trust {
  color: var(--ink-mute);
  font-size: 0.92rem;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-art img {
  width: 100%;
  max-width: 360px;
  border-radius: 38px;
  box-shadow: var(--shadow-hero);
  transform: rotate(-2deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-art:hover img { transform: rotate(0deg); }

/* ---- Sections ---- */

.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
}
.section-head p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Feature grid ---- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 920px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.feature {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.feature .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* Cue colors for feature icons (transparent fill + colored glyph) */
.feature.cue-purple .icon { background: rgba(142, 90, 245, 0.14); color: var(--accent); }
.feature.cue-green  .icon { background: rgba(79, 200, 120, 0.16); color: var(--hue-green); }
.feature.cue-orange .icon { background: rgba(232, 115, 74, 0.16); color: var(--hue-orange); }
.feature.cue-pink   .icon { background: rgba(242, 112, 179, 0.16); color: var(--hue-pink); }
.feature.cue-yellow .icon { background: rgba(245, 197, 66, 0.20); color: #B27D00; }
.feature.cue-mint   .icon { background: rgba(61, 201, 176, 0.16); color: var(--hue-mint); }

/* ---- Screenshot strip ---- */

.showcase {
  background: linear-gradient(180deg, transparent, var(--bg-tinted) 30%, transparent 100%);
}
.showcase-strip {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 4px 28px;
  -webkit-overflow-scrolling: touch;
}
.showcase-strip::-webkit-scrollbar { height: 8px; }
.showcase-strip::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }

.shot {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: center;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--bg-elevated);
}
.shot img { display: block; width: 100%; height: auto; }

/* ---- Platform row ---- */

.platforms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
@media (max-width: 720px) { .platforms { grid-template-columns: repeat(2, 1fr); } }

.platform {
  padding: 24px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.platform svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 8px; }
.platform .label {
  font-weight: 700;
  font-size: 1rem;
}
.platform .sub {
  color: var(--ink-mute);
  font-size: 0.85rem;
  margin-top: 2px;
}

/* ---- Final CTA ---- */

.final-cta {
  text-align: center;
  background:
    radial-gradient(600px 360px at 50% 0%, rgba(142, 90, 245, 0.18), transparent 60%),
    var(--bg-tinted);
  border-radius: 32px;
  padding: 64px 24px;
}
.final-cta h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
}
.final-cta p {
  color: var(--ink-soft);
  max-width: 460px;
  margin: 0 auto 24px;
}

/* ---- Footer ---- */

.site-footer {
  padding: 48px 0 64px;
  color: var(--ink-mute);
  font-size: 0.92rem;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
@media (max-width: 560px) {
  .site-footer .wrap { grid-template-columns: 1fr; text-align: center; }
}
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 560px) {
  .footer-links { justify-content: center; }
}
.footer-links a { color: var(--ink-soft); font-weight: 600; }
.footer-links a:hover { color: var(--ink); }

/* ---- Content pages (support, privacy) ---- */

.page-hero {
  padding: 56px 0 28px;
  text-align: center;
  background: var(--bg-tinted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}
.page-hero .updated {
  color: var(--ink-mute);
  font-size: 0.92rem;
  margin: 0;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--edge) 80px;
}
.prose h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 36px 0 12px 0;
}
.prose h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 24px 0 8px 0;
}
.prose p { color: var(--ink-soft); margin: 0 0 14px 0; }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 1.1rem; color: var(--ink-soft); }
.prose li { margin: 4px 0; }
.prose details {
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.prose summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 16px;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
  transition: transform 0.2s ease;
}
.prose details[open] summary::after {
  content: "−";
}
.prose details > *:not(summary) {
  padding: 0 16px 14px;
  color: var(--ink-soft);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ---- Accessibility ---- */

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
