/* Likhtar Home — a dark room with one warm light. See DIRECTION.md. */

@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+2190-2199; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-cyrillic.woff2) format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --night: #13110e;
  --graphite: #1f1b17;
  --card: #27231e;
  --line: rgba(255, 250, 242, .1);
  --amber: #e8c27a;
  --glow: #ffd27a;
  --paper: #fffaf2;
  --muted: #bfb6a8;
  --dim: #8d8478;
  --ink: #1c1a17;
  --display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(16px, 5vw, 72px);
  --max: 1240px;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); color: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--text); background: var(--night); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: normal; color: var(--amber); }
code, kbd { font: 500 .85em/1 ui-monospace, "SF Mono", Menlo, monospace; }
kbd { display: inline-block; padding: 4px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; color: var(--paper); background: var(--card); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: clamp(34px, 4.8vw, 64px); max-width: 18ch; }
h3 { font-family: var(--text); font-size: 20px; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
p { margin: 0; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 54ch; text-wrap: pretty; }
.small { font-size: 14px; color: var(--dim); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }

:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--paper); color: var(--ink); border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 16px/1 var(--text); text-decoration: none; border: 0; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; box-shadow: 0 0 0 0 rgba(255, 210, 122, 0); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -8px rgba(255, 210, 122, .55); background: #fff; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255, 250, 242, .35); }
.btn-ghost:hover { background: rgba(255, 250, 242, .08); box-shadow: inset 0 0 0 1.5px var(--paper); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 14px var(--pad); transition: background .3s, backdrop-filter .3s; }
.nav.scrolled { background: rgba(19, 17, 14, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; text-decoration: none; }
.brand img { width: auto; height: 24px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(255, 210, 122, .6)); }
.nav nav { display: flex; gap: 26px; margin-left: auto; }
.nav nav a { font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav nav a:hover { color: var(--paper); }
.nav-tools { display: flex; align-items: center; gap: 12px; }
.lang { font-size: 14px; font-weight: 800; text-decoration: none; padding: 9px 12px; border-radius: 999px; color: var(--muted); }
.lang:hover { color: var(--paper); background: rgba(255, 250, 242, .08); }
.sound { font: 600 13px/1 var(--text); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.sound:hover { color: var(--paper); border-color: rgba(255, 250, 242, .3); }
.sound .sound-on, .sound[aria-pressed="true"] .sound-off { display: none; }
.sound[aria-pressed="true"] .sound-on { display: inline; color: var(--amber); }
html:not(.js) .sound { display: none; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding: 120px var(--pad) clamp(40px, 8vh, 90px); isolation: isolate; overflow: hidden; }
.hero-scene { position: absolute; inset: 0; z-index: -2; }
.hero-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; transform-origin: 78% 72%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(19, 17, 14, .92) 0%, rgba(19, 17, 14, .55) 42%, rgba(19, 17, 14, 0) 70%),
  linear-gradient(0deg, var(--night) 0%, rgba(19, 17, 14, 0) 35%); }
.hero-light { position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: screen;
  --lx: 79%; --ly: 68%;
  background: radial-gradient(circle at var(--lx) var(--ly), rgba(255, 196, 102, .38) 0, rgba(255, 170, 70, .14) 14%, rgba(255, 170, 70, 0) 34%);
  animation: breathe 5.5s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .72; } }
.hero-copy { max-width: 760px; }
.hero h1 { font-size: clamp(46px, 7.4vw, 112px); margin-bottom: 26px; }
.hero .lead { margin-bottom: 34px; color: #d9d0c2; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 30px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.facts li::before { content: "•"; color: var(--amber); margin-right: 8px; }
.lantern-hit { position: absolute; left: 75%; top: 47%; width: 8%; height: 30%; border: 0; background: transparent; cursor: pointer; border-radius: 30px; }
.lantern-hit:focus-visible { outline-offset: 0; }

/* Shared section layout */
main > section { position: relative; padding: clamp(80px, 13vh, 150px) var(--pad); }
.section-head { max-width: var(--max); margin: 0 auto clamp(36px, 6vh, 64px); }
.hint { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* The name, in two sentences */
main > section.name { padding-top: clamp(56px, 9vh, 96px); padding-bottom: 0; }
.name p { max-width: 760px; margin: 0 auto; text-align: center; font-size: clamp(20px, 2vw, 26px); line-height: 1.5; color: var(--muted); text-wrap: balance; }
.name b { color: var(--paper); }

/* The real thing: three screens right after the hero */
.product { padding-top: clamp(56px, 8vh, 96px); }
.product-row { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.frame { margin: 0; }
.frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 30px 70px -30px rgba(0, 0, 0, .85); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.frame:hover img { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(232, 194, 122, .5), 0 30px 70px -25px rgba(255, 210, 122, .35); }
.frame:nth-child(2) { transform: translateY(28px); }
.frame figcaption { margin-top: 14px; font-size: 15px; color: var(--muted); }
.frame figcaption b { display: block; color: var(--paper); font-size: 17px; margin-bottom: 2px; }

/* Before / after */
.compare { padding-bottom: 60px; }
.compare-pin { max-width: var(--max); margin: 0 auto; }
.compare .tag { font-weight: 700; }
.compare-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shot { margin: 0; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px var(--line); }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.shot-before figcaption::before { content: "✕ "; color: #d98b74; }
.shot-after figcaption::before { content: "✓ "; color: var(--amber); }
.compare-edge { display: none; }
.js .compare-stage.wipe { display: block; position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100svh - 150px) * 16 / 9)); margin: 0 auto; }
.js .compare-stage.wipe .shot { position: absolute; inset: 0; }
.js .compare-stage.wipe .shot img { height: 100%; }
/* Поверх кадрів — лише коротка мітка в кутку: довгі підписи налазили один на одного. */
.js .compare-stage.wipe .shot figcaption { position: absolute; top: 14px; left: 14px; margin: 0; padding: 7px 12px; border-radius: 999px; background: rgba(19, 17, 14, .8); color: var(--paper); font-size: 13px; line-height: 1.2; }
.js .compare-stage.wipe .shot .long { display: none; }
.js .compare-stage.wipe .shot-after { clip-path: inset(0 0 0 var(--cut, 100%)); }
.js .compare-stage.wipe .shot-after figcaption { left: auto; right: 14px; }
.js .compare-stage.wipe .compare-edge { display: block; position: absolute; top: -10px; bottom: -10px; left: var(--cut, 100%); width: 2px; margin-left: -1px; background: var(--glow); box-shadow: 0 0 24px 6px rgba(255, 210, 122, .55); border-radius: 2px; }

/* Tour: a TV you drive with the arrows */
.tour .section-head { margin-bottom: 30px; }
.tour { background: radial-gradient(60% 50% at 50% 55%, rgba(232, 194, 122, .1), transparent 70%); }
.tv { width: min(1080px, 100%, calc((100svh - 380px) * 16 / 9)); margin: 0 auto; }
.tv-screen { position: relative; padding: 12px; border-radius: 26px; background: linear-gradient(#0c0b09, #191613); box-shadow: 0 0 0 1px var(--line), 0 50px 120px -40px rgba(0, 0, 0, .9), 0 0 120px -30px rgba(232, 194, 122, .25); }
.tv-screen img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; transition: opacity .35s var(--ease), filter .35s var(--ease); }
.tv-screen img.switching { opacity: 0; filter: brightness(2.2) blur(2px); }
.tv-glare { position: absolute; inset: 12px; border-radius: 16px; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .07), transparent 38%); }
.tv-caption { max-width: 640px; margin: 18px auto 0; text-align: center; color: var(--muted); min-height: 3.2em; }
.channels { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 1080px; margin: 0 auto 22px; }
.channels button { font: 600 15px/1 var(--text); color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 13px 18px; cursor: pointer; transition: color .2s, background .2s, transform .2s var(--ease); }
.channels button:hover { color: var(--paper); }
.channels button[aria-selected="true"] { background: var(--paper); color: var(--ink); transform: scale(1.04); box-shadow: 0 10px 30px -10px rgba(255, 210, 122, .6); }

/* AI */
.ai { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 90px); align-items: center; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.ai h2 { margin-bottom: 22px; }
.ai .lead { margin-bottom: 28px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; color: var(--muted); }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px rgba(255, 210, 122, .8); }
.ticks b { color: var(--paper); }
.chat { display: grid; gap: 12px; padding: 28px; border-radius: 26px; background: var(--graphite); box-shadow: 0 0 0 1px var(--line), 0 40px 100px -40px rgba(0, 0, 0, .9); }
.bubble { padding: 14px 18px; border-radius: 18px; max-width: 92%; }
.bubble.you { justify-self: end; background: var(--paper); color: var(--ink); font-weight: 600; border-bottom-right-radius: 6px; }
.bubble.lamp { background: var(--card); border-bottom-left-radius: 6px; color: #e9e1d4; }
.bubble.lamp b { color: var(--amber); }
.bubble.alt { color: var(--muted); font-size: 15px; }
.who { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.chat-note { font-size: 13px; color: var(--dim); margin-top: 6px; }

/* Safe */
.steps { list-style: none; padding: 0; margin: 0 auto; max-width: var(--max); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { padding: 30px; border-radius: var(--radius); background: var(--graphite); box-shadow: inset 0 0 0 1px var(--line); }
.step-n { display: block; font: 800 40px/1 var(--display); letter-spacing: -.03em; color: var(--amber); margin-bottom: 22px; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 16px; }

/* Privacy */
.privacy { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.privacy h2 { margin-bottom: 40px; }
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; border-top: 1px solid var(--line); padding-top: 34px; }
.privacy-grid b { display: block; font-size: 18px; margin-bottom: 8px; }
.privacy-grid p { color: var(--muted); }

/* How it grew */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: var(--max); display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); }
.timeline::after { content: ""; position: absolute; left: 0; top: 9px; height: 2px; width: var(--grow, 100%); background: linear-gradient(90deg, var(--amber), var(--glow)); box-shadow: 0 0 16px rgba(255, 210, 122, .6); }
.timeline li { position: relative; padding: 36px 16px 0 0; }
.timeline li::before { content: ""; position: absolute; top: 2px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--night); box-shadow: inset 0 0 0 2px var(--amber); z-index: 1; }
.timeline li:last-child::before { background: var(--glow); box-shadow: 0 0 18px 4px rgba(255, 210, 122, .7); }
.timeline time { display: block; font: 800 20px/1.1 var(--display); letter-spacing: -.02em; color: var(--paper); margin-bottom: 8px; }
.timeline p { font-size: 15px; color: var(--muted); }
.timeline b { color: var(--paper); }
.grew-note { max-width: var(--max); margin: 46px auto 0; color: var(--muted); }
.grew-note a { color: var(--amber); text-underline-offset: 3px; }
.compare .lead { margin-top: 18px; }

/* Support */
.support { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.support-lantern { width: clamp(110px, 13vw, 170px); filter: drop-shadow(0 0 60px rgba(255, 196, 102, .45)); }
.support h2 { margin-bottom: 18px; }
.support .lead { margin-bottom: 28px; }
.gives { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 760px; }
.give { position: relative; display: grid; gap: 4px; padding: 20px 46px 20px 20px; border-radius: 16px; background: var(--graphite); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; }
.give:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(232, 194, 122, .6), 0 18px 40px -20px rgba(255, 210, 122, .5); }
.give b { font-size: 17px; }
.give small { font-size: 13px; color: var(--muted); }
.give-arrow { position: absolute; right: 18px; top: 18px; color: var(--amber); }

/* Final + footer */
.final { text-align: center; padding-bottom: clamp(100px, 16vh, 180px); background: radial-gradient(50% 60% at 50% 70%, rgba(232, 194, 122, .14), transparent 70%); }
.final h2 { margin: 0 auto 30px; font-size: clamp(42px, 7vw, 100px); }
.final .cta { justify-content: center; margin-bottom: 22px; }
.footer { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; padding: 40px var(--pad) 48px; border-top: 1px solid var(--line); }
.footer .brand { margin-bottom: 8px; }
.footer .brand img { width: auto; height: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--paper); }
.tmdb { flex-basis: 100%; max-width: 900px; }

/* Split headings (motion.js): words rise; the full text stays for screen readers */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; }

/* Small screens */
@media (max-width: 960px) {
  .nav nav { display: none; }
  .ai, .support { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 1fr; gap: 28px; }
  .frame:nth-child(2) { transform: none; }
  .steps, .privacy-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 26px; padding-left: 30px; }
  .timeline::before, .timeline::after { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline::after { height: var(--grow, 100%); bottom: auto; }
  .timeline li { padding: 0; }
  .timeline li::before { left: -30px; top: 4px; }
  .gives { grid-template-columns: 1fr; }
  .support-lantern { width: 96px; }
}
@media (max-width: 640px) {
  /* На телефоні демо — на всю ширину: обмеження за висотою вікна тут лише стискало екран. */
  .tv { width: 100%; }
  .sound { display: none; }
  .btn-small { display: none; }
  .compare-stage { grid-template-columns: 1fr; }
  .hero { align-items: end; }
  .hero-scene img { object-position: 78% 50%; }
  .hero::before { background: linear-gradient(0deg, var(--night) 8%, rgba(19, 17, 14, .7) 55%, rgba(19, 17, 14, .2) 100%); }
  .lantern-hit { display: none; }
  .channels { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .channels button { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-light { animation: none; }
  .btn, .give, .channels button, .tv-screen img { transition: none; }
}

/* Arrow keys mean nothing on a phone. */
@media (hover: none) and (pointer: coarse) { .hint { display: none; } }
