/* Light hero = the IG hook (off-white, flat diagonal colour blocks, tilted slabs).
   Dark body = the Komcut app (../komcut/frontend/src/style.css tokens). */
:root {
  --paper: #FAF8F3;
  --red: #FF3B30; --yellow: #FFD400; --green: #2ED573; --purple: #7248FC;
  --bg: #0b0b0e; --panel: #16161b; --panel-alt: #1b1b21; --hairline: #24242c; --hover: #25252d;
  --ink: #ececf1; --ink-dim: #a1a1ad; --ink-faint: #63636f;
  --accent: #7c5cff; --accent-hover: #8f74ff; --focus: #a594ff; --danger: #ef5b5b;
  --sans: Inter, -apple-system, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hp { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; min-height: 100svh; background: var(--paper); color: #111;
  display: grid; place-items: center; align-content: center; gap: 48px; padding: 96px 16px 64px;
}
/* flat blocks from top-left, bottom, top-right; diagonal edges swing between two poses */
.block { position: absolute; inset: 0; animation: 9s ease-in-out infinite alternate; }
.b-red    { background: var(--red);    clip-path: polygon(0 0, 46% 0, 0 38%); animation-name: red; }
.b-yellow { background: var(--yellow); clip-path: polygon(0 88%, 100% 70%, 100% 100%, 0 100%); animation-name: yellow; animation-delay: -3s; }
.b-green  { background: var(--green);  clip-path: polygon(72% 0, 100% 0, 100% 34%); animation-name: green; animation-delay: -6s; }
@keyframes red    { to { clip-path: polygon(0 0, 40% 0, 0 46%); } }
@keyframes yellow { to { clip-path: polygon(0 76%, 100% 86%, 100% 100%, 0 100%); } }
@keyframes green  { to { clip-path: polygon(80% 0, 100% 0, 100% 46%); } }

.hero-copy { position: relative; display: grid; justify-items: center; gap: 44px; }
.shot { position: relative; margin: 0; width: min(100%, 720px); rotate: 2deg; animation: pop .6s cubic-bezier(.34, 1.4, .5, 1) .35s both; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 14px; border: 2px solid #111;
  box-shadow: 10px 10px 0 var(--purple), 0 40px 80px -30px rgba(0,0,0,.55);
}
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; padding-inline: max(48px, 5vw); }
  .hero-copy, .stack { justify-items: start; }
  .hero .slab { font-size: clamp(44px, 4.4vw, 92px); }
  .shot { width: 100%; justify-self: end; }
}

.logo {
  position: absolute; top: 20px; left: 50%; translate: -50% 0; z-index: 1;
  display: flex; align-items: center; gap: 10px; padding: 10px 28px 10px 20px; border-radius: 999px;
  background: var(--purple); color: #fff; text-decoration: none; font: 700 20px var(--display); letter-spacing: -.02em;
}
.logo img { border-radius: 10px; }

.stack { position: relative; margin: 0; display: grid; justify-items: center; gap: 14px; }
.slab {
  display: inline-block; padding: .12em .45em; color: #111; rotate: var(--r, 0deg); white-space: nowrap;
  font: 800 clamp(40px, 11vw, 120px)/1 var(--display); letter-spacing: -.03em;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.35);
  animation: pop .5s cubic-bezier(.34, 1.7, .5, 1) var(--d, 0s) both;
}
.s-yellow { background: var(--yellow); }
.s-purple { background: var(--purple); color: #fff; }
.s-red    { background: var(--red); color: #fff; }
.s-green  { background: var(--green); }
@keyframes pop { from { scale: 0; } }

.cta {
  position: relative; padding: 16px 28px; border-radius: 14px; background: #111; color: #fff;
  font-weight: 700; text-decoration: none; box-shadow: 6px 6px 0 var(--purple); transition: translate .15s, box-shadow .15s;
}
.cta:hover { translate: -2px -2px; box-shadow: 8px 8px 0 var(--purple); background: #111; }

.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 20px; }
.cta-off, .cta-off:hover { background: #e7e5df; color: #8d8b86; box-shadow: 6px 6px 0 #cfccc4; translate: none; cursor: not-allowed; opacity: 1; }
.soon {
  position: absolute; top: -12px; right: -10px; padding: 3px 8px; rotate: 4deg; border-radius: 6px;
  background: var(--yellow); color: #111; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
}
.stats { margin: -12px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; font-size: 15px; color: #555; }
.stats > span { display: inline-flex; align-items: center; gap: 6px; }
.stats > span + span::before { content: ""; width: 5px; height: 5px; margin-right: 12px; background: #111; rotate: 45deg; }
.stats b { color: #111; font-weight: 800; }
/* five stars filled to --p (rating / 5) */
.mini-stars { font-size: 17px; letter-spacing: 1px; line-height: 1;
  background: linear-gradient(90deg, #f5b400 var(--p), #d6d3cc var(--p)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (min-width: 960px) { .ctas, .stats { justify-content: start; } }

/* download modal: native <dialog> styled like the hero (paper, flat corner wedges, slab title) */
dialog {
  width: min(460px, calc(100% - 32px)); padding: 44px 32px 28px; border: 0; border-radius: 24px; overflow: hidden;
  background: var(--paper); color: #111; text-align: center; box-shadow: 0 40px 100px -30px rgba(0,0,0,.6);
}
dialog::before, dialog::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
dialog::before { background: var(--red); clip-path: polygon(0 0, 24% 0, 0 34%); }
dialog::after { background: var(--green); clip-path: polygon(100% 74%, 100% 100%, 76% 100%); }
dialog > * { position: relative; z-index: 1; }
dialog::backdrop { background: rgba(11,11,14,.5); backdrop-filter: blur(6px); }
dialog[open] { animation: rise .35s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes rise { from { opacity: 0; translate: 0 24px; scale: .96; } }

.close-form { position: absolute; top: 12px; right: 12px; z-index: 2; }
.close { padding: 8px 11px; line-height: 1; background: transparent; color: #111; font-weight: 400; border-radius: 999px; }
.close:hover { background: rgba(0,0,0,.07); }
.dl-icon { display: block; margin: 0 auto 18px; border-radius: 16px; box-shadow: 0 12px 28px -10px rgba(114,72,252,.6); }
dialog h2 { margin: 0 0 10px; }
dialog h2 .slab { font-size: 38px; --r: -3deg; }
.sub { margin: 0 0 22px; color: #555; font-size: 15px; }

/* email + button as one bar, like the hero CTA (black outline, purple offset shadow) */
dialog .row {
  align-items: center; gap: 6px; padding: 6px 6px 6px 44px; border: 2px solid #111; border-radius: 16px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") no-repeat 14px center / 20px;
  box-shadow: 5px 5px 0 var(--purple); transition: border-color .15s, box-shadow .15s;
}
dialog .row:focus-within { border-color: var(--purple); box-shadow: 5px 5px 0 var(--purple), 0 0 0 5px rgba(114,72,252,.18); }
dialog form:has(.err) .row { border-color: #d42a20; }
dialog .row input {
  padding: 10px 4px; border: 0; background: transparent; color: #111; font-size: 16px; text-align: left; outline: none;
}
dialog .row input::placeholder { color: #9a9a9a; }
dialog .row button { padding: 12px 18px; border-radius: 11px; background: #111; white-space: nowrap; transition: background .15s; }
dialog .row button:hover { background: var(--purple); }
dialog .row button:disabled { background: #b9b6ae; box-shadow: none; opacity: 1; cursor: not-allowed; }
/* consent: custom square checkbox in the hero's black-and-purple style */
.agree { display: flex; align-items: flex-start; gap: 10px; text-align: left; font-size: 14px; color: #444; cursor: pointer; }
.agree input {
  appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0; border: 2px solid #111; border-radius: 5px;
  background: #fff; display: grid; place-items: center; cursor: pointer;
}
.agree input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; rotate: -45deg; translate: 0 -1px; scale: 0; transition: scale .12s; }
.agree input:checked { background: var(--purple); border-color: var(--purple); }
.agree input:checked::after { scale: 1; }
.agree input:focus-visible { outline: 3px solid rgba(114,72,252,.35); outline-offset: 2px; }
.agree a { color: #111; font-weight: 600; text-decoration-color: var(--purple); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.agree a:hover { color: var(--purple); }
dialog .hint { margin-top: 6px; color: #888; }
dialog .err { color: #d42a20; }
dialog .done { justify-items: center; }
dialog .done p { color: #555; }

/* ---------- app-style body ---------- */
/* feature details: screenshots of the real editor (komcut: task shots), on the hero's paper */
.feats { background: var(--paper); color: #111; padding: 88px 16px 40px; }
.feats-title { text-align: center; margin: 0 0 64px; }
.feats-title .slab { font-size: clamp(34px, 6vw, 64px); }
.feat { max-width: 1180px; margin: 0 auto 96px; display: grid; gap: 28px; align-items: center; }
.feat figure { margin: 0; }
.feat img {
  display: block; width: 100%; height: auto; border: 2px solid #111; border-radius: 12px; background: #16161b;
  box-shadow: 8px 8px 0 var(--c), 0 30px 60px -30px rgba(0,0,0,.45); rotate: -1deg;
}
.feat:nth-of-type(even) img { rotate: 1deg; }
.feat .tag { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--c); color: #fff; font-size: 13px; font-weight: 700; rotate: -2deg; }
.feat h3 { margin: 14px 0 12px; font: 800 clamp(26px, 3.2vw, 38px)/1.1 var(--display); letter-spacing: -.02em; }
.feat p { margin: 0 0 18px; font-size: 17px; line-height: 1.6; color: #444; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: #222; }
.facts li::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--c); rotate: 45deg; }
@media (min-width: 960px) {
  .feat { grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: 64px; }
  .feat:nth-of-type(even) { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); }
  .feat:nth-of-type(even) figure { order: 2; }
}

/* feedback form ringed by feature clips, as on Komcut's start window (StartWindow.tsx FeatureClips) */
main { --c-video: #4f6bed; --c-audio: #1fa67a; --c-image: #d9822b; --c-title: #9d5bd2;
  position: relative; max-width: 1180px; margin: 0 auto; padding: 72px 16px; display: grid; justify-items: center; gap: 28px; }
#feedback { width: min(480px, 100%); position: relative; z-index: 1; }
.features { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; }
.fclip { animation: pop .45s cubic-bezier(.34, 1.7, .5, 1) var(--d) both; }
.fclip > div {
  display: flex; flex-direction: column; min-width: 150px; border-radius: 6px; overflow: hidden; color: #fff; white-space: nowrap;
  background: var(--c); rotate: var(--r); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--c) 55%, white), 0 16px 30px -14px rgba(0,0,0,.9);
  animation: float var(--fd) ease-in-out var(--f) infinite alternate;
}
.fclip span { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; font-size: 13px; font-weight: 600; background: rgba(0,0,0,.2); }
.fclip svg { width: 13px; height: 13px; opacity: .85; }
.fclip i { display: flex; height: 22px; }
.b-video { opacity: .4; background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 22px); }
.b-image { background: linear-gradient(90deg, rgba(255,255,255,.28), transparent 70%); }
.b-title { align-items: center; padding: 0 9px; }
.b-title b { height: 4px; width: 50%; border-radius: 9px; background: rgba(255,255,255,.5); }
.b-audio { align-items: center; gap: 2px; padding: 0 6px; }
.b-audio b { flex: 1; border-radius: 9px; background: rgba(255,255,255,.5); }
@keyframes float { to { translate: 0 -6px; } }
@media (min-width: 1100px) {
  main { min-height: 860px; align-content: center; }
  .features { position: absolute; inset: 0; display: block; }
  .fclip { position: absolute; left: calc(50% + var(--x)); top: calc(50% + var(--y)); translate: -50% -50%; }
}

.panel { background: var(--panel); border: 1px solid var(--hairline); border-radius: 16px; padding: 28px; }
h2 { margin: 0 0 16px; font: 800 28px var(--display); letter-spacing: -.02em; }
form { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; }
input:not([type=radio], [type=checkbox]), textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 12px 14px; width: 100%;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
button {
  font: inherit; font-weight: 700; color: #fff; background: var(--accent); border: 0; border-radius: 10px;
  padding: 12px 20px; cursor: pointer;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .5; cursor: progress; }
.hint { margin: 0; color: var(--ink-faint); font-size: 13px; }
.msg { margin: 0; font-size: 14px; }
.err { color: var(--danger); }

.seg { display: flex; gap: 4px; margin: 0; padding: 4px; border: 0; border-radius: 12px; background: var(--bg); width: fit-content; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 6px 16px; border-radius: 8px; color: var(--ink-dim); cursor: pointer; }
.seg input:checked + span { background: var(--hover); color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); }

/* stars: reversed DOM order so ~ highlights the lower ones */
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin: 0; padding: 0; border: 0; }
.stars input { position: absolute; opacity: 0; }
.stars label { font-size: 30px; line-height: 1; color: var(--ink-faint); cursor: pointer; transition: color .1s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--yellow); }
.stars input:focus-visible + label { outline: 2px solid var(--focus); border-radius: 4px; }
form:has(.seg input[value="rating"]:not(:checked)) .stars { display: none; }

.done { display: grid; justify-items: start; gap: 12px; }
.done .slab { font-size: clamp(28px, 7vw, 44px); rotate: -3deg; }
.done p { margin: 0; color: var(--ink-dim); }

footer { text-align: center; padding: 32px 16px 48px; color: var(--ink-faint); font-size: 13px; }

@media (max-width: 560px) {
  .panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .block, .slab, .shot, .fclip, .fclip > div, dialog[open] { animation: none; }
}

dialog .done .slab { font-size: 32px; }
dialog:has(.done) .sub { display: none; }

footer a { color: inherit; }

/* /terms: a readable page in the hero's paper look */
body.doc { background: var(--paper); color: #222; }
.doc-head { position: relative; height: 84px; }
.doc-body { max-width: 680px; margin: 0 auto; padding: 24px 16px 56px; display: block; }
.doc-body h1 { margin: 12px 0 18px; }
.doc-body h1 .slab { font-size: clamp(32px, 7vw, 52px); }
.doc-meta { color: #666; font-size: 14px; margin: 0 0 20px; }
.doc-toc { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.doc-toc a { padding: 6px 14px; border: 2px solid #111; border-radius: 999px; color: #111; font-weight: 700; font-size: 14px; text-decoration: none; }
.doc-toc a:hover { background: #111; color: #fff; }
.doc-body section { scroll-margin-top: 24px; margin-bottom: 44px; }
.doc-body h2 { font-size: 30px; margin: 0 0 6px; padding-bottom: 10px; border-bottom: 3px solid #111; }
.doc-body h3 { font: 700 17px var(--sans); margin: 26px 0 6px; }
.doc-body p, .doc-body li { font-size: 16px; line-height: 1.65; color: #333; margin: 0 0 8px; }
.doc-body ul { padding-left: 20px; margin: 0; }
.doc-body a { color: var(--purple); }
body.doc footer { color: #888; }
