/* OwnMyDay — shared styles
   Palette pulled from sp_app/lib/utils/colors.dart */

:root {
  --navy: #2C3E50;
  --navy-deep: #1A252F;
  --navy-soft: #3A4E63;
  --lavender: #9C7FCB;
  --lavender-light: #B89FDF;
  --lavender-dark: #7B5EA7;
  --lavender-wash: #E2D9F3;
  --cream: #F5F1EA;
  --cream-soft: #FBF8F2;
  --text-muted: #8FA8BF;
  --text-muted-light: #6B7A8A;

  /* Theme-driven (dark default) */
  --bg: var(--navy);
  --bg-2: var(--navy-deep);
  --surface: #34495E;
  --surface-2: #2A3A4C;
  --border: rgba(255,255,255,0.08);
  --text: #FFFFFF;
  --text-soft: rgba(255,255,255,0.72);
  --text-dim: rgba(255,255,255,0.48);
  --accent: var(--lavender);
  --accent-soft: var(--lavender-light);
  --glow: rgba(156,127,203,0.35);
  --chip-bg: rgba(156,127,203,0.15);
  --chip-text: var(--lavender-light);
}

html[data-theme="light"] {
  --bg: var(--cream-soft);
  --bg-2: #F0E9DC;
  --surface: #FFFFFF;
  --surface-2: #F5F1EA;
  --border: rgba(44,62,80,0.10);
  --text: var(--navy);
  --text-soft: rgba(44,62,80,0.76);
  --text-dim: rgba(44,62,80,0.50);
  --accent: var(--lavender-dark);
  --accent-soft: var(--lavender);
  --glow: rgba(123,94,167,0.18);
  --chip-bg: rgba(156,127,203,0.18);
  --chip-text: var(--lavender-dark);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  text-wrap: pretty;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient glow behind dark hero */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient::before,
.ambient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
}
.ambient::before {
  width: 620px; height: 620px;
  background: radial-gradient(circle, var(--lavender) 0%, transparent 70%);
  top: -180px; left: -120px;
}
.ambient::after {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--lavender-dark) 0%, transparent 70%);
  top: 40%; right: -160px;
}
html[data-theme="light"] .ambient::before,
html[data-theme="light"] .ambient::after { opacity: 0.35; }

/* Layout */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.wrap-narrow { max-width: 780px; }

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
  color: var(--text);
}
h1 { font-size: clamp(44px, 6vw, 76px); letter-spacing: -0.03em; }
h2 { font-size: clamp(32px, 4vw, 48px); }
h3 { font-size: clamp(22px, 2.4vw, 28px); }
h4 { font-size: 18px; letter-spacing: 0; }

p { margin: 0 0 16px; color: var(--text-soft); font-size: 17px; }
p.lead { font-size: 20px; color: var(--text-soft); line-height: 1.55; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--text); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chip-text);
  background: var(--chip-bg);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand img {
  height: 32px;
  width: auto;
  display: block;
}
.brand .my { color: var(--accent-soft); }

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 8px 24px var(--glow);
}
.nav-cta:hover { transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    right: 16px;
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    padding: 18px 22px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    gap: 14px;
  }
  .nav-toggle { display: inline-flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--lavender-light); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); }

/* Store badges */
.store-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 16px;
  border-radius: 14px;
  background: #000;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.1);
  min-width: 180px;
  transition: transform .15s;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge svg { flex-shrink: 0; }
.store-badge .small { font-size: 10px; opacity: 0.8; display: block; line-height: 1.1; font-weight: 500; }
.store-badge .big { font-size: 17px; font-weight: 600; line-height: 1.1; }

/* Sections */
section { position: relative; z-index: 2; padding: 100px 0; }
section.tight { padding: 72px 0; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-head p { font-size: 18px; margin-top: 14px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  transition: transform .2s, border-color .2s;
}
.card:hover {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  transform: translateY(-3px);
}

/* Footer */
footer {
  position: relative;
  z-index: 2;
  padding: 64px 0 36px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.foot-col h5 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.foot-col a {
  display: block;
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 10px;
}
.foot-col a:hover { color: var(--text); }
.foot-about p { font-size: 14px; max-width: 320px; }
.foot-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
}

@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}

/* Content-page helpers (legal, FAQ, story, about) */
.page-hero {
  padding: 120px 0 48px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(40px, 5vw, 60px); }
.page-hero .sub { color: var(--text-soft); margin-top: 16px; font-size: 19px; }

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px 120px;
}
.prose h2 { margin: 48px 0 16px; font-size: 28px; }
.prose h3 { margin: 32px 0 12px; font-size: 20px; }
.prose p, .prose li { font-size: 17px; color: var(--text-soft); line-height: 1.7; }
.prose li { margin-bottom: 8px; }
.prose ul { padding-left: 22px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose .callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  border-radius: 12px;
  margin: 24px 0;
}
.prose .callout p { margin: 0; }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  z-index: 200;
  min-width: 260px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: none;
  font-family: inherit;
}
.tweaks-panel.show { display: block; }
.tweaks-panel h6 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.tweaks-group { margin-bottom: 14px; }
.tweaks-group:last-child { margin-bottom: 0; }
.tweaks-label {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
  font-weight: 500;
}
.tweaks-seg {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.tweaks-seg button {
  flex: 1;
  background: transparent;
  border: none;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.tweaks-seg button.active {
  background: var(--accent);
  color: #fff;
}

/* Phone mockup */
.phone {
  position: relative;
  width: 300px;
  height: 620px;
  background: #111;
  border-radius: 44px;
  padding: 10px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--navy-deep);
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 26px;
  background: #000;
  border-radius: 16px;
  z-index: 5;
}
.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.phone-header {
  background: linear-gradient(135deg, var(--lavender-light), var(--lavender-dark));
  padding: 14px 18px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.phone-body {
  flex: 1;
  padding: 18px;
  background: var(--navy-deep);
  overflow: hidden;
}

/* Schedule tile (mirrors app's LabeledScheduleTile) */
.tile {
  background: #34495E;
  border-radius: 14px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}
.tile-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26,37,47,0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 4px;
  text-align: center;
}
.tile-empty {
  background: transparent;
  border: 2px dashed rgba(156,127,203,0.4);
}
.tile-empty::after {
  content: '+';
  color: rgba(156,127,203,0.6);
  font-size: 20px;
  font-weight: 300;
}
.tile-icon {
  font-size: 32px;
  line-height: 1;
}
