/* Daynu Web — Official Visual System
 * Palette matches DaynuTheme.kt & Android app exactly:
 * Night #171720 | Panel #20202C | Gold #FFD447 | Lavender #B4A0FF | Paper #F6F3FA | Muted #ABA6BA
 */
:root {
  --night: #171720;
  --night-deep: #111119;
  --panel: #20202C;
  --panel-elevated: #282737;
  --border: rgba(246, 243, 250, 0.08);
  --border-strong: rgba(246, 243, 250, 0.14);
  --gold: #FFD447;
  --gold-soft: rgba(255, 212, 71, 0.14);
  --lavender: #B4A0FF;
  --lavender-soft: rgba(180, 160, 255, 0.14);
  --paper: #F6F3FA;
  --muted: #ABA6BA;
  --ring-off: rgba(171, 166, 186, 0.35);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  --font: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 80% -10%, rgba(180, 160, 255, 0.11), transparent 60%),
    radial-gradient(760px 460px at 15% 10%, rgba(255, 212, 71, 0.08), transparent 62%),
    var(--night);
  color: var(--paper);
  line-height: 1.6;
}

a { color: var(--lavender); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(23, 23, 32, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.055em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-day { color: var(--gold); }
.brand-nu { color: var(--lavender); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.94rem;
  font-weight: 600;
}
.nav-links a { color: var(--muted); transition: color 0.18s ease; }
.nav-links a:hover { color: var(--paper); text-decoration: none; }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.lang-btn[aria-pressed="true"] {
  background: var(--lavender-soft);
  color: var(--paper);
}

/* Buttons (WCAG AAA: Night #171720 on Gold #FFD447 = 12.7:1) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  background: var(--gold);
  color: var(--night);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); text-decoration: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.btn-secondary:hover { border-color: var(--lavender); background: var(--panel-elevated); text-decoration: none; }

/* Hero */
.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--lavender-soft);
  color: var(--lavender);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.35rem, 4.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 1.14rem;
  color: var(--muted);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot-gold {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* Interactive Phone Mockup */
.phone-shell {
  background: linear-gradient(160deg, #272638 0%, #171720 65%);
  border: 1px solid var(--border-strong);
  border-radius: 34px;
  padding: 18px;
  box-shadow: var(--shadow);
  max-width: 370px;
  margin: 0 auto;
}

.phone-screen {
  background: var(--night);
  border-radius: 24px;
  padding: 20px 18px 16px;
  border: 1px solid var(--border);
}

.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.phone-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--lavender);
  background: var(--lavender-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.sun-stage {
  position: relative;
  height: 142px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #1b1a29 0%, #242138 68%, #1a1925 100%);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 14px;
}

.sun-orb {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFF1A8 0%, var(--gold) 58%, #E6A922 100%);
  box-shadow: 0 0 42px rgba(255, 212, 71, 0.55);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), opacity 0.35s ease;
  margin-bottom: 8px;
}

.sun-horizon {
  position: absolute;
  inset: auto 0 0 0;
  height: 44px;
  background: linear-gradient(180deg, rgba(23, 23, 32, 0.15) 0%, #171720 75%);
  border-top: 1px solid rgba(255, 212, 71, 0.2);
}

.sun-caption {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--paper);
}

.demo-hint {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0 0 10px;
  text-align: center;
}

.demo-goals {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-goal {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid rgba(180, 160, 255, 0.28);
  color: var(--paper);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.demo-goal.is-done {
  border-color: rgba(255, 212, 71, 0.48);
  background: rgba(255, 212, 71, 0.08);
}

.demo-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--lavender);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--night);
  transition: all 0.2s ease;
}

.demo-goal.is-done .demo-check {
  background: var(--gold);
  border-color: var(--gold);
}

.demo-goal-text { flex: 1; }

/* Sections */
.section {
  padding: 64px 0;
}

.section-header {
  max-width: 660px;
  margin-bottom: 34px;
}

.section-tag {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lavender);
  margin-bottom: 8px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

/* Bento Grid (Flighty-inspired asymmetric cards) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.bento-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.bento-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
}

.bento-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }

.bento-visual {
  background: var(--night);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* Interactive concentric rings preview */
.rings-demo {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.rings-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 170px;
}

.ring-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--paper);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.ring-chip[aria-pressed="true"] {
  border-color: rgba(255, 212, 71, 0.55);
  background: var(--gold-soft);
  color: var(--gold);
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Flagship Spotlights (Widget & Social) */
.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.spotlight-grid.reverse .spotlight-media { order: 2; }
.spotlight-grid.reverse .spotlight-copy { order: 1; }

.spotlight-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spotlight-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.96rem;
}

.spotlight-list strong { color: var(--paper); }

.spotlight-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 8px;
  flex-shrink: 0;
}

.spotlight-bullet.lav { background: var(--lavender); }

/* Home Screen Widget Showcase */
.homescreen-frame {
  background:
    radial-gradient(280px 180px at 80% 15%, rgba(180, 160, 255, 0.22), transparent 70%),
    radial-gradient(240px 180px at 20% 85%, rgba(255, 212, 71, 0.14), transparent 70%),
    linear-gradient(160deg, #1f1e2e 0%, #12121a 100%);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.widget-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.widget-toggle {
  border: 1px solid var(--border-strong);
  background: rgba(23, 23, 32, 0.72);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.widget-toggle[aria-pressed="true"] {
  background: var(--gold-soft);
  border-color: rgba(255, 212, 71, 0.55);
  color: var(--gold);
}

.android-widget {
  background: rgba(23, 23, 32, 0.94);
  border: 1px solid rgba(255, 212, 71, 0.26);
  border-radius: 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  transition: max-width 0.25s ease;
}

.android-widget.is-compact {
  max-width: 230px;
  grid-template-columns: 1fr;
  text-align: center;
  margin: 0 auto;
}

.widget-sun-badge {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(180deg, #252239 0%, #171720 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.widget-sun-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFF1A8 0%, var(--gold) 62%, #E5A922 100%);
  box-shadow: 0 0 22px rgba(255, 212, 71, 0.55);
}

.widget-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

.android-widget.is-compact .widget-meta { justify-content: center; }

.widget-progress { color: var(--gold); }
.widget-streak { color: var(--lavender); }

.widget-carousel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.android-widget.is-compact .widget-carousel { display: none; }

.widget-carousel-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--paper);
  text-align: left;
}

.widget-next-btn {
  border: 1px solid var(--border-strong);
  background: var(--night);
  color: var(--gold);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 800;
  flex-shrink: 0;
}

.app-dots-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
  opacity: 0.45;
}

.app-dot {
  height: 36px;
  border-radius: 12px;
  background: rgba(246, 243, 250, 0.1);
}

/* Social & Daynu Together Showcase */
.social-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.social-card {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.social-card.together {
  border-color: rgba(180, 160, 255, 0.35);
  background: linear-gradient(145deg, rgba(180, 160, 255, 0.12), var(--panel) 55%);
}

.social-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.nu-mini {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--night);
  border: 2px solid var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nu-mini.lav { border-color: var(--lavender); }

.social-author { font-weight: 800; font-size: 0.96rem; line-height: 1.2; }
.social-handle { color: var(--muted); font-size: 0.8rem; }

.social-badge {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
}

.social-badge.lav {
  background: var(--lavender-soft);
  color: var(--lavender);
}

.social-post-title {
  font-size: 1.04rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.social-post-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.social-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cheer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 71, 0.45);
  background: var(--gold-soft);
  color: var(--gold);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cheer-btn[aria-pressed="true"] {
  background: var(--gold);
  color: var(--night);
  border-color: var(--gold);
}

.together-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.participant-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--night);
  border: 1px solid var(--border);
  color: var(--paper);
}

.participant-pill.done {
  border-color: rgba(255, 212, 71, 0.45);
  color: var(--gold);
}

.step-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(180, 160, 255, 0.14), rgba(255, 212, 71, 0.1));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
}

.cta-banner h2 { margin: 0 0 10px; }
.cta-banner p { margin: 0 auto 24px; max-width: 52ch; color: var(--muted); }

/* Legal & Utility pages */
.doc-page {
  padding: 48px 0 80px;
}

.doc-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 820px;
  margin: 0 auto;
}

.doc-card h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.doc-card h2 {
  margin: 28px 0 10px;
  font-size: 1.25rem;
  color: var(--gold);
}

.doc-card p, .doc-card li {
  color: var(--paper);
  font-size: 0.98rem;
}

.doc-card ul, .doc-card ol {
  padding-left: 20px;
}

.code-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--night);
  border: 1px solid var(--border-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  color: var(--gold);
  word-break: break-all;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--paper); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .spotlight-grid { grid-template-columns: 1fr; }
  .spotlight-grid.reverse .spotlight-media { order: 0; }
  .spotlight-grid.reverse .spotlight-copy { order: 0; }
  .span-7, .span-5, .span-6, .span-4 { grid-column: span 12; }
  .steps-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

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