:root {
  --paper: #f4f0e6;
  --paper-light: #fffdf7;
  --ink: #1d211d;
  --muted: #747a6f;
  --line: rgba(29, 33, 29, 0.17);
  --blue: #2245d4;
  --blue-deep: #17349f;
  --coral: #e66b4f;
  --shadow: rgba(27, 30, 23, 0.15);
  --display: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
  --sans: "Avenir Next", "Helvetica Neue", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
*[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button, label, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.10'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.page-width { width: min(1160px, calc(100% - 64px)); margin: 0 auto; }

.topbar {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  letter-spacing: .07em;
  font-size: 10px;
  font-weight: 700;
}

.wordmark { display: flex; gap: 11px; align-items: center; letter-spacing: -.02em; }
.wordmark-mark { display: grid; place-items: center; width: 31px; height: 31px; color: var(--paper-light); background: var(--ink); font-family: var(--display); font-size: 21px; font-style: italic; font-weight: 400; }
.wordmark strong { display: block; font-size: 14px; line-height: 13px; }
.wordmark em { display: block; color: var(--coral); font-family: var(--display); font-size: 12px; font-style: italic; font-weight: 400; line-height: 13px; }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(230,107,79,.12); }
.slash { color: rgba(29,33,29,.3); }
.topbar-link { color: var(--blue-deep); transition: color .2s ease; }
.topbar-link:hover { color: var(--coral); }
.topbar-link span { display: inline-block; margin-left: 5px; font-size: 14px; transition: transform .2s ease; }
.topbar-link:hover span { transform: translate(2px, 2px); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-back { padding: 6px 10px; border: 1px solid var(--line); color: var(--ink); transition: border-color .2s ease, color .2s ease, background .2s ease; }
.topbar-back:hover { border-color: var(--blue); color: var(--blue); background: rgba(34,69,212,.04); }

.hero { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(330px, .94fr); gap: clamp(45px, 8vw, 130px); align-items: center; min-height: 560px; padding: 86px 0 94px; }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 9px; margin: 0 0 27px; color: var(--coral); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.eyebrow-line { width: 29px; height: 1px; background: var(--coral); }
.hero h1 { max-width: 640px; margin: 0; font-family: var(--display); font-size: clamp(49px, 7.1vw, 87px); font-weight: 400; letter-spacing: -.065em; line-height: .89; }
.hero h1 i, .how-title h2 i { color: var(--blue); font-weight: 400; }
.hero-intro { max-width: 485px; margin: 37px 0 0 5px; color: #52584d; font-size: 16px; line-height: 1.75; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 18px; margin: 39px 0 0 5px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.hero-notes span { display: inline-flex; gap: 7px; align-items: center; }
.hero-notes b { color: var(--blue); font-size: 9px; }

.folio-wrap { position: relative; width: min(100%, 420px); margin: 0 auto; }
.folio-caption, .folio-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.folio-caption { padding: 0 3px 14px; border-bottom: 1px solid var(--line); }
.folio-caption span { color: var(--blue); }
.folio-footer { padding: 14px 3px 0; }
.folio-scene { position: relative; height: 355px; margin: 22px 13px 0; }
.folio-shadow { position: absolute; right: 21px; bottom: 8px; width: 80%; height: 30px; border-radius: 50%; background: rgba(23, 29, 19, .24); filter: blur(18px); transform: rotate(-3deg); }
.folio-sheet { position: absolute; top: 22px; width: 53%; height: 306px; padding: 19px; background: #fffefa; border: 1px solid rgba(22,29,25,.32); box-shadow: 0 18px 25px var(--shadow); }
.folio-back { left: 2%; transform: rotate(-7deg); background: #ebe8de; color: var(--muted); }
.folio-front { right: 2%; z-index: 2; transform: rotate(5deg); color: var(--blue-deep); background: #fffef8; }
.folio-page-number { display: block; font-family: var(--display); font-size: 21px; font-style: italic; }
.folio-rule { display: block; width: 70%; height: 1px; margin: 32px 0 12px; background: var(--line); }
.folio-word { font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.folio-kicker { display: block; margin-top: 28px; color: var(--coral); font-size: 7px; font-weight: 800; letter-spacing: .17em; }
.folio-front strong { display: block; margin-top: 23px; font-family: var(--display); font-size: 39px; font-weight: 400; letter-spacing: -.09em; line-height: .79; }
.folio-front strong i { color: var(--coral); font-weight: 400; }
.folio-stamp { position: absolute; right: 17px; bottom: 19px; display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--coral); border-radius: 50%; color: var(--coral); font-size: 7px; font-weight: 800; letter-spacing: .08em; line-height: 1.2; text-align: center; transform: rotate(-12deg); }
.folio-fold { position: absolute; top: 8px; left: 50%; z-index: 3; height: 328px; border-left: 1px dashed rgba(230,107,79,.72); color: var(--coral); font-size: 8px; font-weight: 800; letter-spacing: .15em; writing-mode: vertical-rl; transform: translateX(-50%); }

.workbench { padding: 44px 48px 50px; background: var(--paper-light); border: 1px solid var(--line); box-shadow: 0 23px 55px rgba(40,42,30,.08); }
.workbench-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.section-kicker { margin-bottom: 12px; font-size: 9px; letter-spacing: .18em; }
.workbench h2, .how-title h2 { margin: 0; font-family: var(--display); font-size: clamp(30px, 3.2vw, 45px); font-weight: 400; letter-spacing: -.05em; line-height: 1; }
.head-index { color: var(--blue); font-family: var(--display); font-size: 18px; font-style: italic; }
.head-index span { margin: 0 5px; color: var(--line); font-family: var(--sans); font-size: 10px; }
.workbench-body { display: grid; grid-template-columns: minmax(300px, 1.02fr) minmax(360px, .98fr); gap: 49px; padding-top: 39px; }
.dropzone { position: relative; min-height: 297px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; border: 1px dashed rgba(34,69,212,.55); background: linear-gradient(135deg, rgba(34,69,212,.035), rgba(230,107,79,.035)); transition: background .22s ease, border-color .22s ease, transform .22s ease; }
.dropzone:hover, .dropzone.is-dragging, .dropzone:focus-visible { border-color: var(--coral); background: rgba(230,107,79,.06); outline: none; transform: translateY(-2px); }
.dropzone-topline { position: absolute; top: 14px; left: 17px; right: 17px; display: flex; justify-content: space-between; color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.dropzone-arrow { font-size: 17px; font-weight: 400; line-height: 8px; }
.dropzone-icon { position: relative; width: 80px; height: 67px; margin-bottom: 20px; }
.icon-sheet { position: absolute; width: 45px; height: 59px; border: 1px solid var(--blue); background: var(--paper-light); }
.icon-sheet::after { content: ""; position: absolute; left: 8px; right: 8px; top: 17px; height: 1px; background: var(--blue); box-shadow: 0 9px 0 rgba(34,69,212,.42), 0 18px 0 rgba(34,69,212,.42); }
.icon-sheet-one { left: 7px; top: 3px; transform: rotate(-8deg); }
.icon-sheet-two { right: 7px; bottom: 0; transform: rotate(8deg); }
.icon-fold { position: absolute; left: 39px; top: -2px; height: 65px; border-left: 1px dashed var(--coral); transform: rotate(1deg); }
.dropzone-title { margin: 0; font-family: var(--display); font-size: 26px; letter-spacing: -.04em; }
.dropzone-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.file-summary { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 390px; margin-top: 20px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); }
.file-type { padding: 3px 5px; color: var(--paper-light); background: var(--coral); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.file-name { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.file-size { color: var(--muted); font-size: 10px; white-space: nowrap; }
.clear-file { padding: 0 2px; border: 0; color: var(--muted); background: none; font-size: 18px; line-height: 1; }
.clear-file:hover { color: var(--coral); }
.form-message { min-height: 19px; margin: 10px 0 0; color: var(--coral); font-size: 11px; }

.settings-column { display: flex; flex-direction: column; gap: 27px; }
.setting-group { padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.setting-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 11px; font-size: 13px; font-weight: 800; }
.setting-label small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; background: var(--paper); border: 1px solid var(--line); }
.segment-option { position: relative; }
.segment-option input { position: absolute; opacity: 0; }
.segment-option span { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; transition: color .2s, background .2s; }
.segment-option em { font-size: 9px; font-style: normal; font-weight: 500; }
.segment-option input:checked + span { color: var(--paper-light); background: var(--blue); }
.segment-option input:focus-visible + span { outline: 2px solid var(--coral); outline-offset: 2px; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compact-group { min-width: 0; }
.select-control { width: 100%; padding: 10px 9px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: var(--paper-light); font-size: 11px; }
.range-wrap { display: flex; align-items: center; gap: 10px; }
.range-wrap input { width: 100%; accent-color: var(--blue); }
.range-wrap output { min-width: 34px; color: var(--blue); font-family: var(--display); font-size: 16px; font-style: italic; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 25px; border-bottom: 1px solid var(--line); }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 13px; }
.toggle-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-ui { position: relative; width: 42px; height: 23px; flex: 0 0 auto; border: 1px solid var(--line); background: var(--paper); transition: background .2s; }
.toggle-ui::after { content: ""; position: absolute; top: 4px; left: 4px; width: 13px; height: 13px; background: var(--muted); transition: transform .2s, background .2s; }
.toggle-row input:checked + .toggle-ui { background: var(--blue); border-color: var(--blue); }
.toggle-row input:checked + .toggle-ui::after { background: var(--paper-light); transform: translateX(18px); }
.toggle-row input:focus-visible + .toggle-ui { outline: 2px solid var(--coral); outline-offset: 3px; }
.action-row { display: flex; align-items: center; gap: 18px; }
.primary-button, .download-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 29px; min-width: 183px; padding: 14px 16px 14px 19px; border: 1px solid var(--blue); color: var(--paper-light); background: var(--blue); font-size: 12px; font-weight: 800; transition: background .2s, transform .2s, box-shadow .2s; }
.primary-button:hover, .download-button:hover { background: var(--blue-deep); box-shadow: 4px 4px 0 rgba(230,107,79,.55); transform: translate(-2px, -2px); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; box-shadow: none; }
.button-arrow, .download-button span { font-size: 19px; font-weight: 400; line-height: 10px; }
.action-row p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.result-panel { display: flex; align-items: center; gap: 20px; margin-top: 36px; padding: 19px 21px; border: 1px solid rgba(34,69,212,.35); background: rgba(34,69,212,.055); }
.result-mark { display: grid; place-items: center; width: 35px; height: 35px; color: var(--paper-light); background: var(--coral); font-size: 20px; }
.result-copy { flex: 1; }
.result-copy .section-kicker { margin-bottom: 4px; }
.result-copy h3 { margin: 0; font-family: var(--display); font-size: 23px; font-weight: 400; letter-spacing: -.04em; }
.result-copy p:last-child { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.download-button { min-width: 145px; }

.how-it-works { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; padding: 126px 0 130px; }
.how-title h2 { font-size: clamp(34px, 4.3vw, 58px); line-height: .91; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; padding-top: 20px; }
.how-steps article { min-height: 150px; padding-top: 14px; border-top: 1px solid var(--ink); }
.how-steps article span { color: var(--coral); font-family: var(--display); font-size: 14px; font-style: italic; }
.how-steps h3 { margin: 17px 0 8px; font-size: 14px; }
.how-steps p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.footer { display: flex; justify-content: space-between; padding: 21px 0 27px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.footer a { color: var(--blue); letter-spacing: .02em; transition: color .2s; }
.footer a:hover { color: var(--coral); }

.reveal { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.reveal-two { animation-delay: .12s; }
.reveal-three { animation-delay: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 830px) {
  .page-width, .topbar { width: min(100% - 36px, 640px); }
  .topbar-meta { display: none; }
  .hero { grid-template-columns: 1fr; gap: 65px; padding: 72px 0 78px; }
  .folio-wrap { max-width: 430px; margin-left: 8%; }
  .workbench { padding: 33px 24px 36px; }
  .workbench-body { grid-template-columns: 1fr; gap: 38px; }
  .how-it-works { grid-template-columns: 1fr; gap: 44px; padding: 93px 0 96px; }
}

@media (max-width: 540px) {
  .page-width, .topbar { width: calc(100% - 30px); }
  .topbar { min-height: 65px; }
  .topbar-link { font-size: 9px; }
  .topbar-actions { gap: 6px; }
  .topbar-back { padding: 5px 7px; }
  .hero { padding-top: 58px; }
  .hero h1 { font-size: clamp(45px, 14vw, 70px); }
  .hero-intro { font-size: 14px; }
  .hero-notes { gap: 9px 14px; }
  .folio-wrap { margin-left: 0; }
  .folio-scene { height: 300px; }
  .folio-sheet { height: 260px; }
  .folio-front strong { font-size: 31px; }
  .folio-fold { height: 280px; }
  .workbench { padding: 28px 17px 27px; }
  .workbench-head { gap: 14px; }
  .workbench h2 { font-size: 32px; }
  .head-index { white-space: nowrap; }
  .settings-row, .how-steps { grid-template-columns: 1fr; gap: 26px; }
  .action-row { align-items: flex-start; flex-direction: column; }
  .primary-button { width: 100%; }
  .result-panel { align-items: flex-start; flex-wrap: wrap; }
  .download-button { width: 100%; }
  .footer { align-items: flex-start; flex-direction: column; gap: 10px; line-height: 1.4; }
}
