:root {
  color-scheme: light;
  --ink: oklch(18% 0.02 37);
  --muted: oklch(45% 0.03 37);
  --paper: oklch(96% 0.016 72);
  --panel: oklch(99% 0.008 72);
  --line: oklch(84% 0.025 55);
  --rose: oklch(72% 0.09 38);
  --rose-deep: oklch(43% 0.11 31);
  --copper: oklch(64% 0.105 48);
  --blue: oklch(62% 0.16 247);
  --green: oklch(62% 0.12 151);
  --yellow: oklch(82% 0.15 86);
  --cyan: oklch(75% 0.12 207);
  --purple: oklch(58% 0.15 314);
  --white-mode: oklch(94% 0.01 76);
  --shadow: 0 24px 80px oklch(28% 0.05 35 / 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, oklch(92% 0.08 43 / 0.65), transparent 32rem),
    radial-gradient(circle at 85% 5%, oklch(87% 0.09 235 / 0.45), transparent 30rem),
    linear-gradient(140deg, oklch(95% 0.018 72), oklch(89% 0.028 42));
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 8%, oklch(100% 0 0 / 0.23) 8.4% 8.8%, transparent 9.2% 100%),
    radial-gradient(circle at 55% 20%, oklch(100% 0 0 / 0.45), transparent 20rem);
  mask-image: linear-gradient(90deg, transparent, black 25%, black 75%, transparent);
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
  position: relative;
}

.gate {
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(340px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.gate-art,
.gate-panel,
.coach,
.hero-card,
.mode-panel,
.reminder-panel,
.mini-stat,
.upgrade-card {
  border: 1px solid oklch(100% 0 0 / 0.48);
  background: oklch(98% 0.012 72 / 0.78);
  box-shadow: var(--shadow);
}

.gate-art {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: 36px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, oklch(18% 0.02 37), oklch(50% 0.04 42)),
    var(--panel);
}

.gate-logo {
  position: absolute;
  top: 30px;
  left: 32px;
  width: 190px;
  filter: drop-shadow(0 12px 28px oklch(100% 0 0 / 0.38));
  z-index: 2;
}

.gate-product {
  width: min(92%, 760px);
  border-radius: 28px;
  filter: drop-shadow(0 36px 70px oklch(0% 0 0 / 0.36));
}

.gate-panel {
  border-radius: 36px;
  padding: clamp(28px, 5vw, 58px);
  align-content: center;
  display: grid;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose-deep);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.065em;
  margin-bottom: 22px;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: oklch(100% 0.004 72 / 0.82);
  color: var(--ink);
  padding: 0 15px;
  outline: none;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid oklch(72% 0.11 38 / 0.38);
  outline-offset: 2px;
}

.primary-button,
.secondary-button,
.ghost-button,
.login-form button {
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 20px;
  font-weight: 850;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

.primary-button,
.login-form button {
  color: oklch(98% 0.01 70);
  background: linear-gradient(135deg, var(--rose-deep), oklch(51% 0.12 42));
  box-shadow: 0 18px 44px oklch(42% 0.12 31 / 0.28);
}

.secondary-button,
.ghost-button {
  color: var(--ink);
  background: oklch(98% 0.012 72 / 0.66);
  border-color: var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.login-form button:hover {
  transform: translateY(-1px);
}

.form-message {
  min-height: 22px;
  color: var(--rose-deep);
  font-size: 14px;
  margin: 0;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.trust-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 12px;
  background: oklch(100% 0.004 72 / 0.56);
}

.coach {
  min-height: calc(100vh - 48px);
  border-radius: 34px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  padding: 22px;
  border-right: 1px solid var(--line);
  background: oklch(93% 0.02 69 / 0.7);
  display: flex;
  flex-direction: column;
}

.brand-lockup {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-lockup img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: contain;
  padding: 7px;
  background: linear-gradient(145deg, oklch(18% 0.02 37), oklch(32% 0.045 39));
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.16);
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.logout {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 14px;
  font-weight: 760;
}

.nav-item.active {
  color: var(--ink);
  background: oklch(100% 0.006 72 / 0.72);
  box-shadow: 0 10px 28px oklch(42% 0.08 32 / 0.1);
}

.logout {
  margin-top: auto;
}

.content {
  padding: clamp(18px, 3vw, 34px);
  overflow: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.topbar h2,
.section-heading h3,
.learn-layout h3 {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.hero-card {
  border-radius: 30px;
  padding: clamp(22px, 4vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at 80% 10%, oklch(88% 0.08 39 / 0.9), transparent 18rem),
    oklch(98% 0.012 72 / 0.8);
}

.hero-copy h3 {
  max-width: 13ch;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p:not(.eyebrow) {
  color: var(--muted);
  max-width: 66ch;
  line-height: 1.6;
}

.session-controls,
.reminder-line,
.routine-builder,
.note-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.timer-dial {
  position: relative;
  display: grid;
  place-items: center;
}

.timer-dial svg {
  width: 200px;
  transform: rotate(-90deg);
}

.timer-dial .track,
.timer-dial .progress {
  fill: none;
  stroke-width: 10;
}

.timer-dial .track {
  stroke: oklch(84% 0.025 55);
}

.timer-dial .progress {
  stroke: var(--rose-deep);
  stroke-linecap: round;
  stroke-dasharray: 364.4;
  stroke-dashoffset: 364.4;
  transition: stroke-dashoffset 240ms linear;
}

.timer-dial div {
  position: absolute;
  text-align: center;
}

.timer-dial strong {
  display: block;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.timer-dial span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.today-grid {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr 0.65fr 0.65fr;
  gap: 14px;
  margin-top: 14px;
}

.mode-panel,
.reminder-panel,
.mini-stat {
  border-radius: 24px;
  padding: 22px;
}

.mode-panel {
  position: relative;
  overflow: hidden;
}

.mode-dot {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  top: -48px;
  right: -44px;
  background: var(--mode-color, var(--rose));
  filter: blur(5px);
  opacity: 0.48;
}

.mode-panel h3,
.mode-panel p {
  position: relative;
}

.mode-panel p:not(.eyebrow),
.reminder-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.mini-stat {
  display: grid;
  place-items: center;
  text-align: center;
}

.mini-stat span {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.mini-stat p {
  color: var(--muted);
  margin: 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.goal-grid,
.wavelength-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.goal-card,
.wave-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: oklch(99% 0.008 72 / 0.68);
  padding: 20px;
  min-height: 150px;
}

.goal-card {
  text-align: left;
}

.goal-card.selected {
  border-color: var(--rose-deep);
  background: oklch(94% 0.045 40 / 0.75);
}

.goal-card strong,
.wave-card strong {
  display: block;
  margin-bottom: 8px;
}

.goal-card span,
.wave-card span,
.wave-card p {
  color: var(--muted);
  line-height: 1.5;
}

.routine-builder {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: oklch(100% 0.004 72 / 0.58);
  border: 1px solid var(--line);
}

.routine-builder label {
  min-width: 190px;
}

.wave-card {
  position: relative;
  overflow: hidden;
}

.wave-card::before {
  content: "";
  position: absolute;
  inset: auto -20px -48px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: var(--wave-color);
  opacity: 0.5;
  filter: blur(4px);
}

.note-form input {
  flex: 1 1 320px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.history-item {
  border: 1px solid var(--line);
  background: oklch(99% 0.008 72 / 0.66);
  border-radius: 18px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.history-item span {
  color: var(--muted);
  font-size: 13px;
}

.learn-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.learn-image {
  width: 100%;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.steps {
  margin: 22px 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.steps li + li {
  margin-top: 8px;
}

.upgrade-card {
  border-radius: 24px;
  padding: 22px;
}

.upgrade-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 980px) {
  .gate,
  .coach,
  .hero-card,
  .learn-layout {
    grid-template-columns: 1fr;
  }

  .coach {
    border-radius: 24px;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
  }

  .nav-item {
    white-space: nowrap;
  }

  .today-grid,
  .goal-grid,
  .wavelength-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 10px;
  }

  .gate-art {
    min-height: 420px;
  }

  .gate-logo {
    width: 140px;
    left: 20px;
  }

  .topbar,
  .session-controls,
  .reminder-line,
  .routine-builder {
    align-items: stretch;
    flex-direction: column;
  }

  .today-grid,
  .goal-grid,
  .wavelength-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 22px;
  }

  .timer-dial svg {
    width: 164px;
  }

  h1 {
    font-size: 46px;
  }
}

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