/* ============================================================
   TimeTactix — 7-Day 5–9 Reset
   Deep navy base, ember orange accent, premium card system.
   ============================================================ */

:root {
  --navy-950: #070b16;
  --navy-900: #0c1322;
  --navy-800: #121b30;
  --navy-700: #1c2946;
  --navy-600: #2a3a5f;

  --ink-100: #f1f5f9;
  --ink-300: #c7d2e2;
  --ink-500: #8fa0bd;

  --ember-300: #fdba74;
  --ember-400: #fb923c;
  --ember-500: #f97316;
  --ember-600: #ea580c;

  --mint-400: #34d399;
  --mint-500: #10b981;

  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--ink-100);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--ember-400);
  outline-offset: 2px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / footer ---------- */

.site-header {
  border-bottom: 1px solid rgba(28, 41, 70, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-accent {
  color: var(--ember-500);
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-500);
}

.header-motto {
  font-size: 12px;
  color: var(--ink-500);
}

.site-main {
  flex: 1;
  padding: 40px 0 56px;
}

.site-footer {
  border-top: 1px solid rgba(28, 41, 70, 0.6);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 12px;
  color: var(--ink-500);
}

/* ---------- Shared components ---------- */

.card {
  background: rgba(18, 27, 48, 0.7);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-lg);
}

.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--ember-500);
  color: #fff;
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.25);
}

.btn-primary:hover {
  background: var(--ember-400);
}

.btn-primary:disabled {
  background: var(--navy-700);
  color: var(--ink-500);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-100);
  border: 1px solid var(--navy-600);
}

.btn-ghost:hover {
  border-color: var(--ink-500);
}

.btn-block {
  display: block;
  width: 100%;
}

.link-muted {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink-500);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.link-muted:hover {
  color: var(--ink-300);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-500);
}

.badge-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.badge-ember {
  background: rgba(249, 115, 22, 0.15);
  color: var(--ember-400);
}

.badge-mint {
  background: rgba(16, 185, 129, 0.15);
  color: var(--mint-400);
}

/* ---------- Landing ---------- */

.hero {
  text-align: center;
  padding-top: 24px;
}

.hero-badge {
  display: inline-block;
  border: 1px solid var(--navy-600);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ember-400);
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero .accent {
  color: var(--ember-500);
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 560px;
  font-size: 18px;
  color: var(--ink-300);
}

.hero-cta {
  margin-top: 32px;
}

.hero-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-500);
}

.section {
  margin-top: 64px;
}

.section-heading {
  text-align: center;
  margin: 0 0 24px;
}

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

.loop-card {
  padding: 24px;
}

.loop-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.15);
  color: var(--ember-400);
  font-size: 14px;
  font-weight: 700;
}

.loop-card h3 {
  margin: 16px 0 0;
  font-size: 16px;
}

.loop-card p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-500);
}

.overview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.overview-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
}

.overview-list li + li {
  border-top: 1px solid rgba(28, 41, 70, 0.7);
}

.overview-day {
  flex-shrink: 0;
  width: 56px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
}

.overview-title {
  font-size: 14px;
  font-weight: 500;
}

.closer {
  text-align: center;
  padding-bottom: 16px;
}

.closer p {
  margin: 0 auto;
  max-width: 440px;
  color: var(--ink-300);
}

.closer .btn {
  margin-top: 24px;
}

/* ---------- Dashboard ---------- */

.dash-title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-sub {
  margin: 8px 0 0;
  color: var(--ink-500);
}

.progress-wrap {
  margin-top: 24px;
}

.progress-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-current {
  font-size: 14px;
  font-weight: 600;
}

.progress-count {
  font-size: 14px;
  color: var(--ink-500);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--navy-700);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ember-600), var(--ember-400));
  transition: width 0.5s ease;
}

.continue-wrap {
  margin-top: 40px;
}

.day-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.day-card {
  padding: 20px;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.day-card:hover:not(:disabled) {
  border-color: rgba(251, 146, 60, 0.7);
}

.day-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.day-card.is-current {
  border-color: rgba(249, 115, 22, 0.7);
}

.day-card.is-completed {
  border-color: rgba(16, 185, 129, 0.3);
}

.day-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-card h3 {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.35;
}

.day-card-status {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-500);
}

.icon {
  width: 20px;
  height: 20px;
}

.icon-check {
  color: var(--mint-400);
}

.icon-lock {
  width: 16px;
  height: 16px;
  color: var(--ink-500);
}

.dash-reset {
  margin-top: 40px;
  text-align: center;
}

/* ---------- Day detail ---------- */

.back-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--ink-500);
  cursor: pointer;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--ink-300);
}

.day-header {
  margin-top: 32px;
}

.day-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.day-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ember-400);
}

.day-header h1 {
  margin: 8px 0 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lesson {
  margin-top: 32px;
}

.lesson p {
  margin: 0 0 16px;
  color: var(--ink-300);
  line-height: 1.65;
}

.task-card {
  margin-top: 32px;
  padding: 24px;
  border-color: rgba(249, 115, 22, 0.4);
}

.task-card p {
  margin: 12px 0 0;
  font-weight: 500;
  line-height: 1.6;
}

.reflection {
  margin-top: 32px;
}

.reflection label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.reflection textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border-radius: var(--radius-md);
  border: 1px solid var(--navy-600);
  background: var(--navy-900);
  color: var(--ink-100);
  padding: 12px 16px;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.reflection textarea::placeholder {
  color: rgba(143, 160, 189, 0.7);
}

.reflection textarea:focus {
  border-color: var(--ember-400);
  outline: none;
}

.autosave-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-500);
}

.complete-wrap {
  margin-top: 32px;
}

.complete-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-500);
}

/* ---------- Completion ---------- */

.completion-hero {
  text-align: center;
  padding-top: 16px;
}

.completion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: rgba(16, 185, 129, 0.15);
  margin-bottom: 20px;
}

.completion-icon .icon {
  width: 28px;
  height: 28px;
  color: var(--mint-400);
}

.completion-hero h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.completion-hero p {
  margin: 16px auto 0;
  max-width: 440px;
  font-size: 18px;
  color: var(--ink-300);
}

.stats-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 20px;
  text-align: center;
}

.stat-value {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--ember-400);
}

.stat-label {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-500);
}

.wins-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.wins-list li {
  padding: 20px;
}

.win-reflection {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-300);
  white-space: pre-line;
}

.cta-card {
  margin-top: 48px;
  padding: 32px;
  text-align: center;
  border-color: rgba(249, 115, 22, 0.4);
}

.cta-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-card > p {
  margin: 16px auto 0;
  max-width: 480px;
  color: var(--ink-300);
  line-height: 1.65;
}

.cta-card .btn {
  margin-top: 24px;
}

.cta-fineprint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-500);
}

.completion-back {
  margin-top: 48px;
  text-align: center;
  padding-bottom: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .hero h1 {
    font-size: 34px;
  }

  .loop-grid,
  .day-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .header-motto {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
  }

  .section {
    margin-top: 48px;
  }
}
