/* LUMOS · «Ночь → утро». Visual system: landing-page-design skill.
   Night uses the skill's dark palette, morning the milky light palette. */

:root {
  --sp-25: 2px; --sp-50: 4px; --sp-75: 8px; --sp-100: 12px; --sp-200: 16px;
  --sp-300: 24px; --sp-400: 32px; --sp-500: 40px; --sp-600: 48px;
  --sp-700: 64px; --sp-800: 80px; --sp-900: 96px;

  --night: #131209;
  --night-2: #181818;
  --night-3: #1F1F1F;
  --night-4: #272727;
  --night-5: #313131;
  --ink-n: #F4F1EC;
  --ink-n2: #B9B5AE;
  --ink-n3: #6E6A62;

  --day: #F7F5F1;
  --day-surface: #FFFFFF;
  --day-2: #EFECE6;
  --ink: #161616;
  --ink-2: #5F5D59;
  --ink-3: #8A8782;
  --line: #E2DED6;
  --line-strong: #CFCAC0;

  --lamp: #E9B872;
  --red: #C0392B;
  --brown: #8C7660;
  --focus: #6FA0FF;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ink-n);
  font-family: "Manrope", system-ui, sans-serif; font-size: 16px; line-height: 24px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* named text styles */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.025em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.015em; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-2 { font-size: 16px; line-height: 24px; font-weight: 500; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-200); }
@media (min-width: 768px) { .container { padding: 0 var(--sp-400); } }

.skip-link { position: absolute; left: var(--sp-200); top: var(--sp-200); z-index: 100; padding: var(--sp-75) var(--sp-100); border-radius: 8px; background: var(--lamp); color: var(--night); text-decoration: none; transform: translateY(-200%); }
.skip-link:focus-visible { transform: none; }

/* ---------- sky: fixed flat layers, crossfaded by scroll (opacity only) ---------- */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.sky i { position: absolute; inset: 0; opacity: 0; }
.sky .s-night { background: var(--night); opacity: 1; }
.sky .s-late { background: var(--night-3); }
.sky .s-dawn { background: #3A3631; }
.sky .s-day { background: var(--day); }

/* theme of content: dark by default, flips to light in the morning */
.is-day { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-75);
  padding: var(--sp-75) var(--sp-100); border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 500ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.btn i { font-size: 20px; }
.btn-lg { padding: var(--sp-100) var(--sp-300); border-radius: 12px; }
.btn-lamp { background: var(--lamp); color: var(--night); }
.btn-lamp:hover { background: #F2CB91; transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2E2C29; transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }

/* menu and footer live in nav.css */

/* ---------- 1. HERO: Lumos ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero .plan { position: absolute; inset: 0; }
.hero .plan svg { width: 100%; height: 100%; display: block; }
.hero .plan.dim { opacity: 0.08; }
.hero .plan.lit {
  -webkit-mask-image: radial-gradient(circle 240px at var(--x, 70%) var(--y, 50%), #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
          mask-image: radial-gradient(circle 240px at var(--x, 70%) var(--y, 50%), #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
}
.hero .halo { position: absolute; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; background: radial-gradient(circle, rgba(233, 184, 114, 0.14), transparent 65%); transform: translate(var(--x, 70%), var(--y, 50%)); pointer-events: none; will-change: transform; }
.hero .copy { position: relative; z-index: 2; padding: 128px 0 var(--sp-800); display: grid; gap: var(--sp-300); max-width: 680px; }
.hero .clock-line { color: var(--ink-n3); display: flex; gap: var(--sp-100); align-items: center; }
.hero .clock-line .dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--red); }
.hero h1 { max-width: 680px; }
.hero h1 .grad { background: linear-gradient(90deg, #FFFFFF, #9B9B9B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .spell { color: var(--lamp); }
.hero .sub { color: var(--ink-n2); max-width: 680px; }
.hero .actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-100); padding-top: var(--sp-75); }
.hero .hint { color: var(--ink-n3); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-75); padding-top: var(--sp-200); }
.chip { display: inline-flex; gap: var(--sp-75); align-items: center; padding: var(--sp-50) var(--sp-100); border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.12); color: var(--ink-n2); }
.chip i { color: var(--lamp); font-size: 16px; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: var(--sp-300); transform: translateX(-50%); color: var(--ink-n3); display: flex; flex-direction: column; align-items: center; gap: var(--sp-50); }
.scroll-cue i { font-size: 20px; animation: cue 2400ms var(--ease) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(8px); opacity: 1; } }
@media (max-width: 639px) {
  .hero h1 { font-size: 48px; line-height: 48px; }
  .hero .copy { padding-top: 112px; }
}

/* ---------- 2. NIGHT JOURNAL ---------- */
.journal { position: relative; padding: var(--sp-900) 0; }
.journal-head { max-width: 680px; display: grid; gap: var(--sp-200); margin-bottom: var(--sp-700); }
.journal-head .k { color: var(--lamp); }
.journal-head p { color: var(--ink-n2); }
.journal-grid { display: grid; gap: var(--sp-400); }
@media (min-width: 1024px) { .journal-grid { grid-template-columns: 4fr 8fr; gap: var(--sp-700); } }
.clock-col { position: sticky; top: 24px; z-index: 3; align-self: start; padding: var(--sp-100) 0; }
.big-clock { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 500; font-size: 96px; line-height: 1; letter-spacing: -0.04em; color: var(--ink-n); font-variant-numeric: tabular-nums; }
.big-clock .colon { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.clock-col .file { margin-top: var(--sp-200); color: var(--ink-n3); }
.clock-col .bar { margin-top: var(--sp-300); height: 2px; background: var(--night-5); border-radius: 2px; overflow: hidden; }
.clock-col .bar i { display: block; height: 100%; background: var(--lamp); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 600ms var(--ease); }
@media (max-width: 1023px) {
  .clock-col { top: 0; background: rgba(24, 24, 24, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin: 0 calc(-1 * var(--sp-200)); padding: var(--sp-100) var(--sp-200); display: flex; align-items: center; gap: var(--sp-200); }
  .big-clock { font-size: 36px; }
  .clock-col .file { margin: 0; }
  .clock-col .bar { display: none; }
}

.entries { display: grid; gap: var(--sp-700); }
.entry { display: grid; gap: var(--sp-300); }
.entry .when { color: var(--ink-n3); display: flex; gap: var(--sp-100); align-items: center; }
.entry .when b { color: var(--lamp); font-weight: 500; }
.entry .was { color: var(--ink-n3); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.entry .now { color: var(--ink-n); }
.entry .now em { font-style: normal; color: var(--lamp); }
.entry .detail { color: var(--ink-n2); max-width: 560px; }

.screen { border-radius: 16px; background: var(--night-3); border: 1px solid var(--night-5); padding: var(--sp-75); max-width: 640px; }
.screen-bar { display: flex; justify-content: space-between; padding: var(--sp-50) var(--sp-75) var(--sp-100); color: var(--ink-n3); }
.screen .pane { border-radius: 8px; background: var(--night-2); overflow: hidden; } /* 16 − 8 = 8 */
.screen .pane.shot { display: flex; justify-content: center; padding: var(--sp-300) var(--sp-300) 0; height: 320px; background: #EDEAE4; }
.screen .pane.shot img { width: 100%; max-width: 300px; object-fit: cover; object-position: top; border-radius: 8px 8px 0 0; }

/* Real panel screenshot: native size, no frame, soft plan glow behind */
.panel-shot { position: relative; margin: 0; width: 100%; max-width: 322px; }
.panel-shot::before { content: ""; position: absolute; inset: -40px -56px; background: url(assets/plan-lamp.webp?v=3) center / cover no-repeat; opacity: 0.12; border-radius: 24px; pointer-events: none; }
.panel-shot .ps-img { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.10); box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(233, 184, 114, 0.06); background: #F0F0F0; }
.panel-shot img { display: block; width: 100%; height: auto; }
.panel-shot figcaption { position: relative; margin-top: var(--sp-200); display: flex; justify-content: space-between; gap: var(--sp-100); color: var(--ink-n3); }
@media (min-width: 1200px) {
  .journal-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .entry.has-shot { grid-template-columns: minmax(0, 1fr) 322px; grid-template-rows: repeat(4, auto) 1fr; column-gap: var(--sp-600); }
  .entry.has-shot > * { grid-column: 1; }
  .entry.has-shot > .panel-shot { grid-column: 2; grid-row: 1 / span 5; align-self: start; }
}
@media (max-width: 767px) {
  .panel-shot { justify-self: center; }
  .panel-shot::before { inset: -24px -8px; }
  .panel-shot .ps-img { max-height: 480px; }
  .panel-shot .ps-img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 96px; background: linear-gradient(rgba(24, 24, 24, 0), rgba(24, 24, 24, 0.92)); pointer-events: none; }
}

.mock-save { padding: var(--sp-300); display: grid; gap: var(--sp-200); }
.mock-row { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-200); }
.switch { width: 40px; height: 24px; border-radius: 9999px; background: var(--lamp); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; right: 4px; top: 4px; width: 16px; height: 16px; border-radius: 9999px; background: var(--night); }
.ticks-row { display: flex; gap: var(--sp-50); align-items: flex-end; height: 48px; }
.ticks-row i { flex: 1; border-radius: 2px; background: var(--night-5); height: 24%; }
.ticks-row i.s { background: var(--lamp); height: 100%; }
.mock-save .status { color: var(--ink-n2); display: flex; gap: var(--sp-75); align-items: center; }
.mock-save .status i { color: var(--lamp); font-size: 20px; }

.mock-font { padding: var(--sp-300); display: grid; gap: var(--sp-200); }
.specimen { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-200); }
.specimen .aa { font-size: 60px; line-height: 60px; font-weight: 600; text-align: center; }
.specimen .aa.old { font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: var(--ink-n3); }
.specimen .arrow { color: var(--lamp); font-size: 24px; }
.mock-font .sheets { display: flex; gap: var(--sp-75); flex-wrap: wrap; }
.mock-font .sheets span { padding: var(--sp-25) var(--sp-75); border-radius: 4px; border: 1px solid var(--night-5); color: var(--ink-n2); }

.mock-export { padding: var(--sp-300); display: grid; gap: var(--sp-100); }
.file-row { display: flex; align-items: center; gap: var(--sp-100); padding: var(--sp-75) var(--sp-100); border-radius: 8px; background: var(--night-3); color: var(--ink-n2); }
.file-row i { color: var(--lamp); font-size: 20px; }
.file-row .ok { margin-left: auto; color: var(--ink-n3); }

/* ---------- 3. DAWN ---------- */
.dawn { min-height: 90vh; display: flex; align-items: center; text-align: center; padding: var(--sp-900) 0; }
.dawn .inner { display: grid; gap: var(--sp-300); justify-items: center; }
.dawn .time { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 500; font-size: 128px; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) { .dawn .time { font-size: 72px; } }
.dawn p { max-width: 560px; color: inherit; opacity: 0.72; }
.dawn .sun { width: 96px; height: 2px; border-radius: 2px; background: var(--lamp); }

/* ---------- 4. MORNING ---------- */
.day-zone { color: var(--ink); }
.section { padding: var(--sp-900) 0; }
.eyebrow { color: var(--brown); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

.tagline p {
  max-width: 880px; margin: 0 auto; text-align: center;
  font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em;
}
@media (min-width: 768px) { .tagline p { font-size: 48px; line-height: 48px; letter-spacing: -0.02em; } }
.tagline .w { color: rgba(22, 22, 22, 0.28); transition: color 600ms var(--ease); }
.tagline .w.on { color: var(--ink); }
.tagline .w.lit.on { color: var(--brown); }

.chut { text-align: center; display: grid; gap: var(--sp-400); justify-items: center; }
.chut h2 { font-size: 72px; line-height: 72px; font-weight: 600; letter-spacing: -0.035em; }
.chut .row2 { display: inline-flex; align-items: stretch; }
.gapword { position: relative; display: inline-block; width: 0; transition: width 1400ms var(--ease); }
.chut.go .gapword { width: 168px; }
.ext { position: absolute; top: 8px; bottom: 8px; width: 1px; background: #E2B4AE; opacity: 0; transition: opacity 600ms 900ms var(--ease); }
.ext.l { left: 0; } .ext.r { right: 0; }
.dimline { position: absolute; left: 0; right: 0; top: 50%; height: 24px; margin-top: -12px; opacity: 0; transition: opacity 600ms 900ms var(--ease); }
.chut.go .ext, .chut.go .dimline { opacity: 1; }
.dimline::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 1px; background: var(--red); }
.dimline i { position: absolute; top: 4px; width: 1px; height: 16px; background: var(--red); transform: skewX(-45deg); }
.dimline i:first-child { left: 0; } .dimline i:last-child { right: 0; }
.dimline b { position: absolute; left: 50%; top: -32px; transform: translateX(-50%); font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: 0; color: var(--red); white-space: nowrap; }
@media (max-width: 767px) { .chut h2 { font-size: 36px; line-height: 40px; } .chut.go .gapword { width: 88px; } .dimline b { font-size: 20px; line-height: 28px; top: -24px; } }

.letter {
  max-width: 680px; margin: 0 auto; text-align: left;
  background: var(--day-surface); border: 1px solid var(--line); border-radius: 24px; padding: var(--sp-400);
  display: grid; gap: var(--sp-200);
}
.letter .sign { display: flex; justify-content: space-between; align-items: end; gap: var(--sp-200); padding-top: var(--sp-200); border-top: 1px solid var(--line); }

/* measured facts: one chain of dimensions, like on a drawing */
.measures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--sp-600); margin-top: var(--sp-300); }
@media (min-width: 900px) { .measures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.measure { position: relative; display: grid; gap: var(--sp-75); align-content: start; justify-items: center; text-align: center; padding: var(--sp-200) var(--sp-300) 0; }
.measure .num { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.measure .dim { position: relative; justify-self: stretch; height: 24px; margin: 0 calc(-1 * var(--sp-300)); }
.measure .dim::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 1px; background: var(--brown); transform-origin: left; transform: scaleX(0); transition: transform 900ms var(--ease); }
.measure .dim i { position: absolute; top: 4px; width: 1.5px; height: 16px; background: var(--ink); transform: skewX(-45deg); }
.measure .dim i:first-child { left: 0; } .measure .dim i:last-child { right: 0; }
.measure .body-6 { max-width: 220px; }
.measure::before, .measure::after { content: ""; position: absolute; top: var(--sp-75); height: 108px; width: 1px; background: var(--brown); opacity: 0.45; transform-origin: bottom; transform: scaleY(0); transition: transform 700ms var(--ease) 300ms; }
.measure::before { left: 0; }
.measure::after { right: 0; display: none; }
.measure:nth-child(2n)::after { display: block; }
@media (min-width: 900px) { .measure:nth-child(2n)::after { display: none; } .measure:last-child::after { display: block; } }
.measure.in .dim::before { transform: scaleX(1); }
.measure.in::before, .measure.in::after { transform: scaleY(1); }
.no-js .measure .dim::before, .no-js .measure::before, .no-js .measure::after { transform: none; }
@media (max-width: 599px) {
  .measure { padding: var(--sp-200) var(--sp-100) 0; }
  .measure .dim { margin: 0 calc(-1 * var(--sp-100)); }
  .measure .num { font-size: 48px; line-height: 48px; }
  .measure::before, .measure::after { height: 92px; }
}

.steps { display: grid; gap: var(--sp-200); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: grid; gap: var(--sp-100); align-content: start; padding: var(--sp-300); border: 1px solid var(--line); border-radius: 16px; background: var(--day-surface); }
.tagmark { width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 9999px; font-family: "Geist Mono", monospace; font-size: 14px; line-height: 20px; font-weight: 600; }
.step code { font-family: "Geist Mono", monospace; font-size: 14px; line-height: 20px; background: var(--day-2); border-radius: 4px; padding: var(--sp-25) var(--sp-50); white-space: nowrap; }

.offer { display: grid; gap: var(--sp-400); padding: var(--sp-400); border-radius: 24px; border: 1px solid var(--line); background: var(--day-surface); }
@media (min-width: 900px) { .offer { grid-template-columns: 1fr 1fr; padding: var(--sp-600); align-items: center; } }
.offer-box { background: var(--day-2); border-radius: 16px; padding: var(--sp-300); display: grid; gap: var(--sp-200); }
.ul-check { display: grid; gap: var(--sp-75); }
.ul-check li { display: flex; gap: var(--sp-75); }
.ul-check i { color: var(--brown); font-size: 20px; flex: none; }

.faq-grid { display: grid; gap: var(--sp-600); }
@media (min-width: 1024px) { .faq-grid { grid-template-columns: 4fr 8fr; align-items: start; } .faq-grid .head { position: sticky; top: 32px; } }
.head { display: grid; gap: var(--sp-200); max-width: 680px; align-content: start; }
.section .head { margin-bottom: var(--sp-600); }
.faq-grid .head { margin-bottom: 0; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-200); padding: var(--sp-300) 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { font-size: 20px; color: var(--ink-2); flex: none; transition: transform 500ms var(--ease); }
.faq details[open] summary i { transform: rotate(45deg); }
.faq .answer { padding: 0 0 var(--sp-300); color: var(--ink-2); max-width: 680px; }

.final { text-align: center; display: grid; gap: var(--sp-300); justify-items: center; padding: var(--sp-800) var(--sp-300); border-radius: 24px; background: var(--ink); color: #fff; }
.final .t { font-family: "Geist Mono", monospace; color: var(--lamp); }
.final p { color: #B9B5AE; max-width: 560px; }


/* reveal */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: opacity 300ms linear; }
  .tagline .w, .gapword, .ext, .dimline, .measure .dim::before { transition: none; }
  .big-clock .colon, .scroll-cue i { animation: none; }
  .btn:hover { transform: none; }
  .mobile-menu .m-item { transform: none; }
}

.dawn { color: var(--ink-n); transition: color 500ms var(--ease); }
.day .dawn { color: var(--ink); }
.dawn .sun { transform: scaleX(var(--sun, 0.2)); transition: transform 300ms var(--ease); }

/* tile mock */
.mock-tile { padding: var(--sp-200); display: grid; gap: var(--sp-100); }
.mock-tile svg { width: 100%; height: auto; display: block; }
.tile-legend { display: flex; flex-wrap: wrap; gap: var(--sp-200); color: var(--ink-n2); }
.tile-legend span { display: inline-flex; align-items: center; gap: var(--sp-75); }
.sw { width: 12px; height: 12px; border-radius: 2px; display: inline-block; border: 1px solid #4A4740; }
.sw.full { background: var(--night-4); }
.sw.cut { background: #5C4E38; }
.sw.slope { border: 1px dashed var(--lamp); }

/* future entries */
.entry.future .now, .entry.future .detail { color: var(--ink-n2); }
.entry.future .was { text-decoration: none; }
.entry .stage { margin-left: var(--sp-75); padding: var(--sp-25) var(--sp-75); border-radius: 9999px; border: 1px dashed var(--lamp); color: var(--lamp); }
.progress { display: flex; align-items: center; gap: var(--sp-100); color: var(--ink-n3); }
.progress a { color: var(--lamp); }
.pips { display: inline-flex; gap: var(--sp-50); }
.pips i { width: 16px; height: 4px; border-radius: 2px; background: var(--night-5); }
.pips i.f { background: var(--lamp); }

/* Ctrl+S */
.keys { display: flex; align-items: center; gap: var(--sp-200); justify-content: center; padding: var(--sp-200) 0 var(--sp-75); }
.key {
  min-width: 96px; height: 88px; padding: 0 var(--sp-300); display: grid; place-items: center;
  border-radius: 16px; background: var(--night-3); border: 1px solid var(--night-5); border-bottom-width: 8px;
  font-size: 36px; line-height: 40px; font-weight: 600; color: var(--ink-n);
  transition: transform 120ms var(--ease), border-bottom-width 120ms var(--ease), color 300ms var(--ease);
}
.key.down { transform: translateY(6px); border-bottom-width: 2px; color: var(--lamp); }
.keys .plus { font-family: "Geist Mono", monospace; font-size: 24px; line-height: 32px; color: var(--ink-n3); }
.reflex { text-align: center; color: var(--ink-n2); display: grid; gap: var(--sp-50); }
.reflex b { color: var(--lamp); font-weight: 600; }
@media (max-width: 639px) { .key { min-width: 72px; height: 64px; font-size: 24px; line-height: 32px; padding: 0 var(--sp-200); border-radius: 12px; } }

.toast {
  position: fixed; left: 50%; bottom: var(--sp-300); z-index: 60;
  display: flex; align-items: center; gap: var(--sp-100);
  padding: var(--sp-100) var(--sp-200); border-radius: 12px;
  background: var(--night-3); color: var(--ink-n); border: 1px solid var(--night-5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity 300ms var(--ease), transform 500ms var(--ease);
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast i { color: var(--lamp); font-size: 20px; flex: none; }
.day .toast { background: var(--ink); border-color: var(--ink); color: #fff; }

.final .spell-nox { color: var(--lamp); }

.all-features { margin-top: var(--sp-700); display: flex; justify-content: center; }

/* real plan under the lamp */
.hero .plan img { position: absolute; top: 72px; bottom: 0; right: 0; height: calc(100% - 72px); width: auto; max-width: none; }
@media (min-width: 1024px) { .hero .plan img { right: 4%; } }
@media (max-width: 1023px) { .hero .plan img { height: auto; width: 140%; right: -20%; top: 96px; } }
.hero .plan.dim { opacity: 0.1; }

/* ================= PHONE: lamp stage ================= */
.lamp-stage { position: absolute; inset: 0; }
.lamp-hint { display: none; }
@media (max-width: 767px) {
  .hero { display: flex; flex-direction: column-reverse; align-items: stretch; min-height: 0; padding-bottom: var(--sp-600); }
  .hero .copy { padding: 112px 0 var(--sp-400); gap: var(--sp-200); }
  .hero .sub { font-size: 16px; line-height: 24px; }
  .hero .chips { padding-top: var(--sp-100); }
  .lamp-stage {
    position: relative; inset: auto; height: 340px; margin: 0 var(--sp-200);
    border-radius: 24px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.10);
    background: #0E0D07; touch-action: none;
  }
  .lamp-stage .plan img { position: absolute; inset: var(--sp-200); width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; top: var(--sp-200); right: auto; }
  .hero .plan.dim { opacity: 0.14; }
  .lamp-hint {
    display: flex; align-items: center; gap: var(--sp-75);
    position: absolute; left: 50%; bottom: var(--sp-200); transform: translateX(-50%);
    margin: 0; padding: var(--sp-50) var(--sp-100); border-radius: 9999px; white-space: nowrap;
    background: rgba(19, 18, 9, 0.8); border: 1px solid rgba(233, 184, 114, 0.3); color: var(--lamp);
    transition: opacity 500ms var(--ease);
  }
  .lamp-hint i { font-size: 16px; }
  .lamp-stage.touched .lamp-hint { opacity: 0; }
  .hero .scroll-cue { display: none; }
}
@media (max-width: 767px) {
  .hero { flex-direction: column; padding-top: 104px; }
  .hero > .container, .hero .copy { display: contents; }
  .hero .copy > * { margin-left: var(--sp-200); margin-right: var(--sp-200); }
  .hero .clock-line { order: 1; margin-bottom: var(--sp-200); }
  .hero h1 { order: 2; margin-bottom: var(--sp-300); }
  .lamp-stage { order: 3; height: 260px; margin-bottom: var(--sp-300); }
  .hero .actions { order: 4; padding-top: 0; margin-bottom: var(--sp-300); }
  .hero .actions .btn { align-self: stretch; }
  .hero .sub { order: 5; margin-bottom: var(--sp-200); color: var(--ink-n2); }
  .hero .chips { order: 6; padding-top: 0; }
}
@media (max-width: 767px) {
  .hero .plan.lit {
    -webkit-mask-image: radial-gradient(circle 110px at var(--x, 50%) var(--y, 50%), #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
            mask-image: radial-gradient(circle 110px at var(--x, 50%) var(--y, 50%), #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
  }
  .hero .halo { width: 280px; height: 280px; margin: -140px 0 0 -140px; }
}

/* ================= PHONE: night journal ================= */
.now-name { display: none; }
@media (max-width: 1023px) {
  .clock-col { position: sticky; top: 0; flex-wrap: wrap; row-gap: var(--sp-50); padding-bottom: var(--sp-100); }
  .clock-col .file { display: none; }
  .now-name { display: block; color: var(--ink-n); }
  .now-name.future { color: var(--lamp); }
  .now-name.future::after { content: " · скоро"; color: var(--ink-n3); }
  .clock-col .bar { display: block; position: absolute; left: 0; right: 0; bottom: 0; margin: 0; height: 2px; border-radius: 0; }
  .entry .when b { display: none; }
}
@media (max-width: 767px) {
  .journal { padding-top: var(--sp-700); }
  .journal-head { margin-bottom: var(--sp-400); }
  .entries { gap: var(--sp-600); margin-top: var(--sp-300); }
  .entry { gap: var(--sp-200); }
  .entry .now { font-size: 24px; line-height: 32px; }
  .entry .was { font-size: 16px; line-height: 24px; }
  .entry .detail { font-size: 14px; line-height: 20px; }
  .screen { padding: 0; border: 0; background: transparent; }
  .screen-bar { padding: 0 0 var(--sp-75); }
  .screen .pane.shot { background: transparent; padding: 0; height: 400px; justify-content: flex-start; }
  .screen .pane.shot img { max-width: 100%; width: 100%; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.10); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5); }
  .screen .pane.mock-save, .screen .pane.mock-font, .screen .pane.mock-export, .screen .pane.mock-tile { border-radius: 12px; border: 1px solid var(--night-5); }
  .all-features { margin-top: var(--sp-500); }
  .all-features .btn { width: 100%; }
}
@media (max-width: 767px) {
  .chut.go .gapword { width: 104px; }
  .dimline b { top: -30px; font-size: 20px; line-height: 28px; }
  .letter { padding: var(--sp-300); }
}

/* Plan always fits the window: sized by viewport height, a bit smaller than before */
@media (min-width: 768px) {
  .hero .plan img {
    top: 104px; bottom: auto; right: 4%; left: auto;
    height: calc(100vh - 168px); height: calc(100svh - 168px);
    max-height: 900px; width: auto; max-width: 62%;
    object-fit: contain; object-position: right top;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero .plan img { max-width: 92%; right: 4%; opacity: 0.85; }
}
@media (max-width: 767px) {
  .dimline b { top: 16px; font-size: 18px; line-height: 24px; }
  .chut.go .gapword { width: 96px; }
}

/* ================= PHONE: no overlaps ================= */
@media (max-width: 767px) {
  .hero { padding-top: 88px; }
  /* Clock bar sits right under the nav, one line only */
  .clock-col { top: 0; flex-wrap: nowrap; }
  .now-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Offer: the price box stays inside its card */
  .offer { padding: var(--sp-200); gap: var(--sp-300); }
  .offer-box { padding: var(--sp-200); min-width: 0; }
  .offer-box .btn, .final .btn { white-space: normal; width: 100%; text-align: center; }
  .final { padding: var(--sp-600) var(--sp-200); }
}

/* ---------- cards: thin gradient border with an inner glow ---------- */
.letter, .offer {
  border: 1px solid transparent;
  background: linear-gradient(var(--day-surface), var(--day-surface)) padding-box,
    linear-gradient(135deg, #FFFFFF 0%, var(--line-strong) 45%, rgba(233, 184, 114, 0.75) 100%) border-box;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
.final {
  border: 1px solid transparent;
  background: linear-gradient(var(--ink), var(--ink)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.06) 45%, rgba(233, 184, 114, 0.6) 100%) border-box;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
.screen .pane.mock-save, .screen .pane.mock-font, .screen .pane.mock-export, .screen .pane.mock-tile {
  border: 1px solid transparent;
  background: linear-gradient(var(--night-2), var(--night-2)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(233, 184, 114, 0.45) 100%) border-box;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
.screen {
  border: 1px solid transparent;
  background: linear-gradient(var(--night-3), var(--night-3)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(233, 184, 114, 0.45) 100%) border-box;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
@media (max-width: 767px) { .screen { border: 0; background: transparent; box-shadow: none; } }
