/* ============================================================
   AiCutting — cinematic dark UI (Midnight Dark design system)
   ============================================================ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-var.woff2") format("woff2");
}

:root {
  --base: #060e20;
  --base-2: #0b1326;
  --sc-low: #131b2e;
  --sc: #171f33;
  --sc-high: #222a3d;
  --ink: #dae2fd;
  --ink-dim: #c1c6d7;
  --ink-soft: #a7afc6;
  --blue: #4b8eff;
  --peri: #adc6ff;
  --peri-lo: #d8e2ff;
  --cyan: #68d3ff;
  --error: #ffb4ab;
  --line: #414755;

  --glass-1: rgba(23, 31, 51, 0.58);
  --glass-2: rgba(34, 42, 61, 0.72);
  --hair: rgba(139, 144, 160, 0.20);
  --edge: rgba(218, 226, 253, 0.10);
  --shadow: 0 24px 60px -30px rgba(75, 142, 255, 0.28), 0 4px 16px -10px rgba(0, 0, 0, 0.55);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r: 0.75rem;
  --r-md: 1rem;
  --r-xl: 1.5rem;
  --pill: 9999px;
  --gutter: 24px;
  --container: 1200px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--base);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.aura {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 45% at 15% 0%, rgba(75, 142, 255, 0.14), transparent 60%),
    radial-gradient(50% 45% at 100% 40%, rgba(104, 211, 255, 0.10), transparent 62%),
    linear-gradient(180deg, var(--base-2), var(--base) 55%);
}

a { color: var(--peri); text-decoration: none; }
a:hover { color: #cdd9ff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ---- type ---- */
.display { font-size: clamp(38px, 6.2vw, 68px); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; margin: 0; text-wrap: balance; }
h1, .h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h2, .h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
h3 { font-size: 18px; font-weight: 600; margin: 0; }
p { margin: 0; color: var(--ink-dim); }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink); }
.dim { color: var(--ink-dim); }
.soft { color: var(--ink-soft); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--peri); margin: 0; }
.grad { background: linear-gradient(92deg, #bcd0ff, #6fd4ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* ---- layout ---- */
main { }
.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.view { padding-block: clamp(28px, 5vw, 52px) 96px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.between { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 780px) { .g3, .g2 { grid-template-columns: 1fr; } }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 30; height: var(--nav-h);
  display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter);
  background: rgba(6, 14, 32, 0.55);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--hair);
}
.brand { flex: none; font-weight: 800; letter-spacing: -0.02em; font-size: 19px; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; }
.brand .mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--peri), var(--cyan)); position: relative; box-shadow: 0 0 16px -2px rgba(104, 211, 255, 0.5); }
.brand .mark::after { content: ""; position: absolute; inset: 6px; border: 1.5px solid rgba(6, 14, 32, 0.85); border-radius: 3px; }
.navlinks { flex: 1; display: flex; justify-content: center; gap: 8px; }
.navlinks a { color: var(--ink-dim); font-size: 15px; padding: 7px 14px; border-radius: var(--pill); transition: background 0.18s, color 0.18s; }
.navlinks a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.nav .grow { flex: 1; }
.nav .actions { flex: none; display: flex; align-items: center; gap: 16px; }
.nav .actions a, .nav .actions .credits { font-size: 15px; }
.nav .linkbtn { background: none; border: none; color: var(--ink-dim); font: inherit; cursor: pointer; padding: 0; }
.nav .linkbtn:hover { color: var(--ink); }
.credits { font-variant-numeric: tabular-nums; color: var(--peri); border: 1px solid var(--hair); background: rgba(75, 142, 255, 0.08); padding: 6px 13px; border-radius: var(--pill); font-size: 13.5px; font-weight: 600; }

/* ---- buttons (pill; primary = soft periwinkle, dark text) ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  padding: 12px 22px; border-radius: var(--pill); border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, filter 0.2s;
  text-decoration: none;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, #c8d6ff, #a9c3ff); color: #00204d; box-shadow: 0 12px 34px -12px rgba(169, 195, 255, 0.6); }
.btn-primary:hover { color: #00204d; filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 16px 40px -12px rgba(169, 195, 255, 0.72); }
.btn-ghost { background: rgba(18, 26, 46, 0.5); color: var(--ink); border-color: var(--hair); backdrop-filter: blur(10px); }
.btn-ghost:hover { color: var(--ink); border-color: rgba(173, 198, 255, 0.45); background: rgba(30, 40, 66, 0.6); transform: translateY(-1px); }
.btn.big { padding: 15px 28px; font-size: 16px; }
.btn.sm { padding: 9px 18px; font-size: 14px; }
.btn.block { width: 100%; }

/* ---- badge ---- */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--pill); font-size: 13.5px; font-weight: 600; color: var(--peri); background: rgba(11, 19, 38, 0.5); border: 1px solid rgba(173, 198, 255, 0.28); backdrop-filter: blur(8px); }
.badge svg { width: 15px; height: 15px; }

/* ---- hero (full-bleed cinematic photo) ---- */
.hero {
  position: relative; margin-top: calc(-1 * var(--nav-h));
  min-height: min(90vh, 880px); display: flex; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--nav-h) + 56px) 24px 92px; overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; background: url("/static/img/hero.jpg") center 42% / cover no-repeat; transform: scale(1.03); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 14, 32, 0.82) 0%, rgba(8, 14, 30, 0.40) 32%, rgba(8, 14, 30, 0.52) 60%, rgba(6, 14, 32, 0.97) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 840px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.hero-sub { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: #c8cfe2; max-width: 58ch; margin: 0; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* ---- glass surfaces ---- */
.glass, .glass-2 {
  position: relative; background: var(--glass-1);
  backdrop-filter: blur(20px) saturate(1.15); -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border: 1px solid var(--hair); border-radius: var(--r-xl); box-shadow: var(--shadow);
}
.glass-2 { background: var(--glass-2); }
.glass::before, .glass-2::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, var(--edge), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.pad { padding: clamp(20px, 3vw, 30px); }

/* ---- sections ---- */
.section { padding-block: clamp(56px, 8vw, 100px); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(32px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; align-items: center; }

.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(75, 142, 255, 0.14); border: 1px solid rgba(173, 198, 255, 0.25); color: var(--peri); margin-bottom: 16px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: 14.5px; line-height: 1.6; }

/* pricing */
.price-card { display: flex; flex-direction: column; gap: 6px; }
.price-card.hot { border-color: rgba(173, 198, 255, 0.45); box-shadow: var(--shadow), inset 0 0 0 1px rgba(173, 198, 255, 0.25); }
.price-card .tier { font-size: 14px; letter-spacing: 0.02em; color: var(--peri); font-weight: 600; }
.price-card .price { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.price-card .price span { font-size: 15px; font-weight: 500; color: var(--ink-dim); letter-spacing: 0; }
.price-card ul { list-style: none; padding: 0; margin: 14px 0 20px; display: flex; flex-direction: column; gap: 9px; }
.price-card li { font-size: 14.5px; color: var(--ink-dim); display: flex; gap: 9px; align-items: flex-start; }
.price-card li svg { width: 16px; height: 16px; color: var(--cyan); flex: none; margin-top: 3px; }

/* showcase */
.showcase-frame { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--hair); box-shadow: var(--shadow); position: relative; }
.showcase-frame img { width: 100%; display: block; aspect-ratio: 21 / 9; object-fit: cover; }

/* ---- forms ---- */
label { display: block; font-size: 14px; color: var(--ink-dim); margin: 0 0 7px; }
.field { margin-top: 18px; }
input[type="email"], input[type="password"], input[type="text"], select, input[type="file"] {
  width: 100%; font: inherit; color: var(--ink);
  background: rgba(6, 14, 32, 0.55); border: 1px solid var(--hair);
  border-radius: var(--r); padding: 12px 14px; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input::placeholder { color: #6b7391; }
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(75, 142, 255, 0.22); background: rgba(6, 14, 32, 0.75); }
input[type="file"] { padding: 11px 14px; color: var(--ink-dim); cursor: pointer; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; cursor: pointer; background: rgba(75, 142, 255, 0.14); color: var(--peri); border: 1px solid var(--hair); border-radius: 8px; padding: 7px 13px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--peri) 50%), linear-gradient(135deg, var(--peri) 50%, transparent 50%); background-position: calc(100% - 20px) center, calc(100% - 15px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.check { display: flex; align-items: flex-start; gap: 11px; margin-top: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.check label { margin: 0; color: var(--ink-dim); font-size: 14px; }
.segment { display: flex; gap: 10px; flex-wrap: wrap; }
.segment label { flex: 1 1 160px; margin: 0; cursor: pointer; position: relative; border: 1px solid var(--hair); border-radius: var(--r); padding: 14px 16px; background: rgba(6, 14, 32, 0.4); transition: border-color 0.2s, background 0.2s; display: flex; flex-direction: column; gap: 3px; }
.segment input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segment label:has(input:checked) { border-color: var(--peri); background: rgba(173, 198, 255, 0.12); }
.segment .t { color: var(--ink); font-weight: 600; }
.segment .p { color: var(--peri); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---- chips + pills ---- */
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: var(--pill); background: rgba(75, 142, 255, 0.12); color: var(--peri); border: 1px solid rgba(75, 142, 255, 0.26); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: var(--pill); border: 1px solid var(--hair); color: var(--ink-dim); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pill.done { color: var(--cyan); border-color: rgba(104, 211, 255, 0.4); }
.pill.failed { color: var(--error); border-color: rgba(255, 180, 171, 0.4); }
.pill.running, .pill.queued { color: var(--peri); border-color: rgba(173, 198, 255, 0.4); }
.pill.running .dot { animation: pulse 1.3s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- progress ---- */
.telemetry { margin-top: 2px; }
.track { height: 10px; border-radius: var(--pill); background: rgba(6, 14, 32, 0.6); border: 1px solid var(--hair); overflow: hidden; }
.track .fill { height: 100%; border-radius: var(--pill); background: linear-gradient(90deg, var(--peri), var(--cyan)); width: 0; position: relative; overflow: hidden; transition: width 0.6s var(--ease); }
.track .fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: translateX(-100%); }
.telemetry.live .fill::after { animation: scan 1.6s linear infinite; }
@keyframes scan { to { transform: translateX(220%); } }
.phase { margin-top: 11px; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.phase b { color: var(--peri); font-weight: 600; }

/* ---- table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--hair); font-size: 14.5px; }
thead th { color: var(--ink-dim); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(75, 142, 255, 0.05); }
tbody tr:last-child td { border-bottom: none; }

video { width: 100%; border-radius: var(--r-md); background: #000; display: block; border: 1px solid var(--hair); }

/* ---- flashes ---- */
.flashes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.flash { padding: 13px 16px; border-radius: var(--r); font-size: 14.5px; background: var(--glass-2); backdrop-filter: blur(16px); border: 1px solid var(--hair); border-left: 3px solid var(--peri); }
.flash.success { border-left-color: var(--cyan); }
.flash.error { border-left-color: var(--error); }

/* ---- legal / prose ---- */
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 6px; }
.prose h2 { font-size: 20px; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--ink-dim); font-size: 15px; line-height: 1.75; }
.prose p { margin: 0 0 12px; }
.prose ul { padding-left: 20px; margin: 0 0 12px; }
.prose li { margin-bottom: 6px; }
.prose address { font-style: normal; color: var(--ink); line-height: 1.8; }
.notice { border: 1px solid rgba(255, 180, 171, 0.35); background: rgba(255, 180, 171, 0.07); border-radius: var(--r); padding: 14px 16px; color: var(--ink-dim); font-size: 14px; margin: 0 0 26px; }
.notice b { color: var(--error); }
.footlinks { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footlinks a { color: var(--ink-dim); font-size: 13.5px; }
.footlinks a:hover { color: var(--ink); }

/* ---- upload progress overlay ---- */
.uploading { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: rgba(6, 14, 32, 0.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.up-card { width: min(460px, 92vw); text-align: center; }
.up-card .phase { text-align: center; font-size: 14px; }

footer { border-top: 1px solid var(--hair); color: var(--ink-dim); font-size: 13.5px; padding: 30px var(--gutter); text-align: center; }

/* ---- motion ---- */
[data-rise] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-rise].in { opacity: 1; transform: none; }
.seq > * { opacity: 0; transform: translateY(14px); animation: rise 0.6s var(--ease) forwards; }
.seq > *:nth-child(1) { animation-delay: 0.06s; }
.seq > *:nth-child(2) { animation-delay: 0.16s; }
.seq > *:nth-child(3) { animation-delay: 0.26s; }
.seq > *:nth-child(4) { animation-delay: 0.36s; }
.seq > *:nth-child(5) { animation-delay: 0.46s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .seq > *, [data-rise] { animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero::before { transform: none; }
  .telemetry.live .fill::after { animation: none; }
  .pill.running .dot { animation: none; }
}
