/* CorpDoc.ai homepage v2 — preview. Paper, ink, and one 3D form. */
:root {
  --paper: #f2f4f9;
  --sheet: #ffffff;
  --ink: #0d1a3a;
  --ink-soft: #46526e;
  --blue: #1560ee;
  --blue-deep: #0f46b8;
  --violet: #6a2df0;
  --fill: #e2ecff;
  --rule: #cbd4e6;
  --ok: #0a7d55;
  --night: #0b1430;
  --header-h: 68px;
  --gutter: clamp(18px, 4.5vw, 56px);
  --font: "IBM Plex Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-x: hidden; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 1100; padding: 12px 18px; background: var(--ink); color: #fff; font-weight: 600; border-radius: 8px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Type */
h1 { font-size: clamp(2.5rem, 4.7vw, 4.1rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.032em; text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.lead { font-size: clamp(1.06rem, 1.3vw, 1.22rem); line-height: 1.6; color: var(--ink-soft); max-width: 58ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1.5px solid transparent; border-radius: 10px; font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; text-align: center; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-quiet { background: transparent; border-color: #9aa8c4; color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); background: #fff; }
.btn-large { min-height: 54px; padding: 14px 26px; font-size: 17px; }
.btn-small { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: default; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(242, 244, 249, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 21px; letter-spacing: -0.03em; text-decoration: none; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 10px 14px; border-radius: 8px; font-size: 16px; font-weight: 500; text-decoration: none; color: var(--ink); }
.nav a:hover { background: #e3e8f3; }
.menu-toggle { display: none; width: 46px; height: 46px; padding: 0; border: 1.5px solid #9aa8c4; border-radius: 10px; background: transparent; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding-block: clamp(28px, 5vw, 64px) clamp(48px, 6vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 12fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.beta-badge { display: inline-block; margin-bottom: 22px; padding: 6px 12px; border: 1px solid #a9bdf0; border-radius: 6px; background: var(--fill); color: var(--blue-deep); font-size: 13px; font-weight: 700; letter-spacing: .06em; line-height: 1.5; }
.again { color: var(--blue); white-space: nowrap; }
.echo { display: block; color: var(--blue); opacity: .22; white-space: nowrap; user-select: none; }
.echo-2 { opacity: .09; }
.hero-lead { margin-top: 24px; font-size: clamp(1.1rem, 1.45vw, 1.3rem); line-height: 1.55; color: var(--ink-soft); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.assurance { margin-top: 16px; font-size: 15px; color: var(--ink-soft); }

.hero-model { min-width: 0; }
.model-stage { position: relative; height: clamp(360px, 46vw, 600px); }
.model-stage canvas, .how-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.model-stage canvas.is-dragging, .how-stage canvas.is-dragging { cursor: grabbing; }
.drag-hint { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); display: none; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 100px; background: rgba(255, 255, 255, .85); border: 1px solid var(--rule); color: var(--ink-soft); font-size: 13px; font-weight: 500; white-space: nowrap; pointer-events: none; transition: opacity .4s; }
.webgl .drag-hint { display: inline-flex; }
.drag-hint.is-used { opacity: 0; }
.model-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px 12px 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; }
.model-status { font-size: 15px; font-weight: 500; color: var(--ink); min-width: 0; flex: 1 1 220px; }
.model-buttons { display: flex; gap: 8px; }
.model-note { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }

/* Flat fallback form (no WebGL) */
.flat-form { position: absolute; inset: 12px 6% 12px; padding: 26px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 24px 50px -24px rgba(13, 26, 58, .35); overflow: hidden; }
.flat-form { visibility: hidden; }
.no-webgl .flat-form { visibility: visible; }
.flat-form-title { font-size: 20px; font-weight: 700; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.flat-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 16px; }
.flat-field.wide { grid-column: 1 / -1; }
.flat-label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.flat-value { display: block; min-height: 36px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 3px; font-weight: 500; color: var(--blue-deep); overflow-wrap: anywhere; }
.flat-field.is-filled .flat-value { background: var(--fill); border-color: #a9bdf0; }

/* Bands */
.band { padding-block: clamp(64px, 9vw, 120px); }
.band-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.band-head .lead { margin-top: 16px; }

/* Problem */
.problem { background: var(--sheet); border-block: 1px solid var(--rule); }
.scraps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.scrap { padding: 20px 20px 22px; background: #fbfcfe; border: 1px solid var(--rule); border-radius: 3px; }
.scrap figcaption { font-size: 15px; font-weight: 700; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); }
.scrap-field { margin-top: 12px; }
.scrap-field span { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.scrap-field b { display: block; font-weight: 500; font-size: 17px; color: var(--blue-deep); }
.scrap-field i { font-style: normal; font-weight: 700; color: var(--ink); margin-right: 4px; }
.scrap-boxed .scrap-field b { padding: 7px 10px; border: 1px solid #aab6cf; border-radius: 3px; background: #fff; }
.scrap-lined figcaption { border-bottom-width: 1px; font-weight: 600; font-style: italic; }
.scrap-lined .scrap-field b { padding: 6px 0 5px; border-bottom: 1.5px solid var(--ink); }
.scrap-lined .scrap-field span { margin-bottom: 0; }
.scrap-numbered figcaption { background: var(--ink); color: #fff; border: 0; margin: -20px -20px 14px; padding: 10px 20px; border-radius: 2px 2px 0 0; }
.scrap-numbered .scrap-field b { padding: 7px 10px; background: #eef1f7; border-left: 3px solid var(--ink); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--rule); }
.compare-col { padding: 28px 28px 0 0; }
.compare-with { padding-left: 28px; border-left: 1px solid var(--rule); }
.compare h3 { font-size: 15px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.compare-with h3 { color: var(--blue-deep); }
.compare-sum { margin-top: 6px; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.compare ul { margin-top: 14px; color: var(--ink-soft); }
.compare li { position: relative; padding: 5px 0 5px 22px; }
.compare li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 10px; height: 2px; background: #8d9ab6; }
.compare-with li { color: var(--ink); }
.compare-with li::before { top: 11px; left: 3px; width: 6px; height: 10px; background: none; border: solid var(--blue); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* How it works: sticky model + steps */
.how { padding-bottom: 0; }
.how-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.how-stage-col { position: sticky; top: calc(var(--header-h) + 16px); }
.how-stage { position: relative; height: min(640px, calc(100svh - var(--header-h) - 40px)); background: linear-gradient(180deg, #e9edf6, #e3e8f3); border: 1px solid var(--rule); border-radius: 20px; overflow: hidden; }
.steps { padding-bottom: clamp(64px, 9vw, 120px); }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 20px; align-content: center; min-height: min(560px, 70svh); opacity: .38; transition: opacity .3s; }
.step.is-active { opacity: 1; }
.step-num { grid-row: span 2; display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid var(--ink); border-radius: 4px; font-size: 26px; font-weight: 600; line-height: 1; background: var(--sheet); }
.step.is-active .step-num { background: var(--blue); border-color: var(--blue); color: #fff; }
.step h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.025em; line-height: 1.15; align-self: end; }
.step p { margin-top: 10px; font-size: 1.1rem; color: var(--ink-soft); max-width: 40ch; }
.no-webgl .how-grid { grid-template-columns: minmax(0, 1fr); }
.no-webgl .how-stage-col { display: none; }
.no-webgl .step { min-height: 0; padding-block: 22px; opacity: 1; }

/* Features: one sheet, ticked rows */
.sheet { max-width: 1020px; margin-inline: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 1px 0 #fff inset, 0 40px 70px -48px rgba(13, 26, 58, .4); }
.sheet-head { padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 48px) clamp(20px, 3vw, 30px); border-bottom: 2px solid var(--ink); }
.sheet-head p { margin-top: 12px; color: var(--ink-soft); font-size: 1.08rem; max-width: 56ch; }
.ticks li { display: grid; grid-template-columns: 30px minmax(0, 5fr) minmax(0, 8fr); gap: 4px 22px; align-items: start; padding: 22px clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--rule); }
.ticks li:last-child { border-bottom: 0; }
.tick { position: relative; width: 26px; height: 26px; margin-top: 2px; border: 2px solid var(--ink); border-radius: 3px; background: #fff; }
.tick::after { content: ""; position: absolute; left: 7px; top: 1px; width: 8px; height: 15px; border: solid var(--blue); border-width: 0 3.5px 3.5px 0; transform: rotate(42deg); }
.ticks p { color: var(--ink-soft); }

/* Review band */
.review { background: var(--night); color: #f1f4fb; }
.review .lead { color: #c3cde2; margin-top: 18px; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.review-try { margin-top: 22px; font-weight: 500; color: #9fc0ff; }
.checklist { background: var(--sheet); color: var(--ink); border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); }
.checklist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 22px; border-bottom: 2px solid var(--ink); font-size: 16px; }
.checklist-head strong { font-size: 18px; }
.checklist-head span { color: var(--ink-soft); font-size: 15px; }
.check-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 68px; padding: 10px 22px; border-bottom: 1px solid var(--rule); cursor: pointer; transition: background-color .15s; }
.check-row:hover { background: #f6f8fc; }
.check-row input { width: 24px; height: 24px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.check-text small { display: block; font-size: 13px; color: var(--ink-soft); }
.check-text b { display: block; font-weight: 500; color: var(--blue-deep); overflow-wrap: anywhere; }
.check-state { font-size: 14px; font-weight: 600; color: var(--ok); visibility: hidden; }
.check-row:has(input:checked) { background: #f0f7f3; }
.check-row:has(input:checked) .check-state { visibility: visible; }
.checklist-foot { padding: 16px 22px 18px; font-size: 15px; color: var(--ink-soft); }
.checklist-foot.is-done { color: var(--ok); font-weight: 600; }

/* Beta offer + FAQ */
.offer { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.offer .lead { margin-top: 18px; }
.offer-list { margin-top: 24px; display: grid; gap: 10px; }
.offer-list li { position: relative; padding-left: 30px; }
.offer-list li::before { content: ""; position: absolute; left: 6px; top: 5px; width: 7px; height: 13px; border: solid var(--blue); border-width: 0 3px 3px 0; transform: rotate(42deg); }
.offer-side { padding: clamp(22px, 3vw, 34px); background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; display: grid; gap: 16px; justify-items: start; }
.offer-strong { font-size: 1.35rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.offer-side p { color: var(--ink-soft); }
.offer-side .offer-strong { color: var(--ink); }
.offer-side .btn { width: 100%; }
.offer-signin { font-size: 15px; }
.offer-signin a, .faq a { color: var(--blue-deep); font-weight: 500; text-underline-offset: 3px; }
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 5vw, 72px); margin-top: clamp(56px, 8vw, 104px); padding-top: clamp(32px, 4vw, 48px); border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 2px; font-size: 1.15rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-right: 6px; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding: 0 2px 20px; color: var(--ink-soft); max-width: 62ch; }

/* Footer */
.footer { border-top: 1px solid var(--rule); background: var(--sheet); padding-block: 28px; font-size: 15px; color: var(--ink-soft); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.footer .logo { font-size: 18px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.footer-links a, .footer-links button { padding: 8px 0; color: var(--ink); text-underline-offset: 3px; }

/* Responsive */
@media (max-width: 1020px) {
  .header-cta { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px var(--gutter) 16px; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 20px 30px -20px rgba(13, 26, 58, .3); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 6px; font-size: 18px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
}
@media (max-width: 900px) {
  .hero-grid, .review-grid, .offer, .faq { grid-template-columns: minmax(0, 1fr); }
  .echo { display: none; }
  .model-stage { height: clamp(340px, 78vw, 520px); }
  .scraps { grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 520px; }
  .how-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .how-stage-col { top: var(--header-h); z-index: 5; margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--rule); }
  .how-stage { height: 40svh; min-height: 250px; border-radius: 14px; }
  .step { min-height: 52svh; align-content: start; padding-top: 44px; }
  .ticks li { grid-template-columns: 30px minmax(0, 1fr); }
  .ticks li p { grid-column: 2; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .header-row { gap: 10px; }
  .logo { font-size: 19px; gap: 8px; }
  .header-cta { padding-inline: 13px; font-size: 15px; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
  .model-bar { padding: 14px; }
  .model-buttons { width: 100%; }
  .model-buttons .btn { flex: 1; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .compare-col { padding: 24px 0 0; }
  .compare-with { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 24px; }
  .step { grid-template-columns: 46px minmax(0, 1fr); column-gap: 14px; }
  .step-num { width: 46px; height: 46px; font-size: 22px; }
  .check-row { padding-inline: 16px; gap: 12px; }
  .checklist-head, .checklist-foot { padding-inline: 16px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 360px) {
  .logo span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .model-stage canvas, .how-stage-col { display: none; }
  .flat-form { visibility: visible !important; position: static; }
  .model-stage { height: auto; }
  .step { opacity: 1; min-height: 0; padding-block: 20px; }
}
