/* ── Vertimo — classical-editorial type specimen ───────────────────────── */

:root {
  --paper: #f5efe3;
  --paper-deep: #ede4d2;
  --ink: #211b14;
  --ink-soft: #5d5444;
  --rubric: #bc3508;
  --rule: #c9bda5;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "Azeret Mono", "SF Mono", ui-monospace, monospace;
  --measure: 38rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 380;
  font-optical-sizing: auto;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--rubric); color: var(--paper); }

/* grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* vertical conjugation in the margin */
.marginalia {
  position: fixed; top: 50%; right: 1.1rem; z-index: 5;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .35em;
  color: var(--ink-soft); opacity: .55;
}
@media (max-width: 900px) { .marginalia { display: none; } }

/* ── masthead ── */
.masthead {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem clamp(1.4rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: 1.25rem; letter-spacing: .01em;
}
.mark { display: block; }
.mark-arc { transform-origin: 24px 24px; animation: arc-turn 14s linear infinite; }
@keyframes arc-turn { to { transform: rotate(360deg); } }
.masthead nav { display: flex; gap: 1.8rem; }
.masthead nav a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.masthead nav a:hover { color: var(--rubric); border-color: var(--rubric); }

/* ── sections / folio rules ── */
main { padding: 0 clamp(1.4rem, 6vw, 5rem); max-width: 72rem; margin: 0 auto; }
section { padding: clamp(3.5rem, 9vh, 6.5rem) 0 1rem; }

.folio { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.2rem; }
.folio-num {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .2em;
  color: var(--rubric);
}
.folio-rule { flex: 1; height: 1px; background: var(--rule); }

h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 480;
  letter-spacing: -.015em; line-height: 1.12; margin-bottom: .8rem;
}
.dropcap { color: var(--rubric); font-style: italic; font-weight: 560; }
.section-note {
  font-style: italic; color: var(--ink-soft); max-width: var(--measure);
  margin-bottom: 2.4rem;
}
.rubric { color: var(--rubric); }

/* ── hero ── */
.hero { padding-top: clamp(4rem, 12vh, 8rem); text-align: left; }
.etymology {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .12em;
  color: var(--ink-soft); margin-bottom: 1.6rem;
}
.etymology em { font-family: var(--serif); font-style: italic; font-size: 1rem; letter-spacing: 0; }
.hero h1 {
  font-size: clamp(3rem, 9.5vw, 7.2rem); font-weight: 530;
  letter-spacing: -.03em; line-height: 1.02;
}
.hero h1 span { display: block; }
.rubric-line { color: var(--rubric); font-style: italic; font-weight: 470; }

.ticker-row {
  display: flex; align-items: center; gap: 1.1rem;
  margin: 2.6rem 0 2.2rem;
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(1.3rem, 3.4vw, 2.1rem);
}
.ticker-frame {
  display: inline-block; perspective: 400px;
  border: 1.5px solid var(--ink); border-radius: .35em;
  padding: .18em .55em; background: var(--paper-deep);
  box-shadow: 0 2px 0 var(--rule);
  min-width: 4.2em; text-align: center;
}
.ticker { display: inline-block; transform-origin: 50% 50%; }
.ticker.flip-out { transition: transform .22s ease-in, opacity .22s; transform: rotateX(-88deg); opacity: 0; }
.ticker.flip-in  { transition: transform .26s cubic-bezier(.2,.9,.3,1.2), opacity .26s; transform: rotateX(0); opacity: 1; }
.ticker.flip-pre { transition: none; transform: rotateX(88deg); opacity: 0; }
.turn-arrow { color: var(--rubric); flex-shrink: 0; }

.lede { max-width: var(--measure); font-size: 1.13rem; color: var(--ink); }

.cta { display: flex; align-items: center; gap: 1.6rem; margin-top: 2.4rem; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: .55em;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  padding: .8em 1.3em; border-radius: 2em;
}
.store-badge-mark {
  width: .9em; height: .9em; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--paper) 18%, transparent 19%), var(--rubric);
}
.ghost-link {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .1em;
  color: var(--ink); text-decoration: none;
  border-bottom: 1.5px solid var(--rubric); padding-bottom: 3px;
  transition: color .2s;
}
.ghost-link:hover { color: var(--rubric); }

/* ── demo ── */
.demo-stage {
  border: 1.5px solid var(--ink); border-radius: 14px;
  background: var(--paper-deep);
  box-shadow: 6px 6px 0 rgba(33,27,20,.12);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  max-width: 46rem;
}
.demo-files { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.2rem; }
.file-chip {
  font-family: var(--mono); font-size: .78rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: .5em;
  padding: .55em .8em; cursor: pointer;
  display: inline-flex; gap: .45em; align-items: baseline;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.file-chip b { color: var(--rubric); font-weight: 600; }
.file-chip i { font-style: normal; color: var(--ink-soft); font-size: .85em; }
.file-chip:hover { transform: rotate(-1.2deg) translateY(-2px); box-shadow: 3px 3px 0 rgba(33,27,20,.18); }
.file-chip.active { border-color: var(--rubric); box-shadow: 3px 3px 0 rgba(188,53,8,.35); }

.dropzone {
  border: 2px dashed var(--ink-soft); border-radius: 10px;
  min-height: 9.5rem; padding: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.dropzone.has-file { border-style: solid; border-color: var(--ink); background: var(--paper); display: block; }
.dz-hint { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); letter-spacing: .08em; }
.dz-file { font-family: var(--mono); font-size: .95rem; font-weight: 600; margin-bottom: .9rem; }
.dz-targets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.target-pill {
  font-family: var(--mono); font-size: .75rem;
  border: 1.5px solid var(--ink-soft); border-radius: 2em; background: transparent;
  color: var(--ink); padding: .4em .95em; cursor: pointer;
  transition: all .15s;
}
.target-pill:hover { border-color: var(--rubric); color: var(--rubric); }
.target-pill.selected { background: var(--rubric); border-color: var(--rubric); color: var(--paper); }
.convert-btn {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: none; border-radius: .5em;
  padding: .75em 1.6em; cursor: pointer; transition: background .2s, opacity .2s;
}
.convert-btn:disabled { opacity: .35; cursor: not-allowed; }
.convert-btn:not(:disabled):hover { background: var(--rubric); }
.dz-progress {
  margin-top: 1rem; height: 8px; border-radius: 4px;
  background: var(--rule); overflow: hidden;
}
.dz-progress span {
  display: block; height: 100%; width: 0%;
  background: repeating-linear-gradient(-45deg, var(--rubric) 0 8px, #d4571f 8px 16px);
  transition: width .12s linear;
}
.dz-result { margin-top: 1.1rem; animation: rise .45s cubic-bezier(.2,.9,.3,1.1); }
.dz-result-name { font-family: var(--mono); font-weight: 600; font-size: 1rem; }
.dz-result-name::before { content: "→ "; color: var(--rubric); }
.dz-result-note { font-size: .9rem; color: var(--ink-soft); font-style: italic; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ── formats ── */
.domain-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0; border: 1px solid var(--rule);
}
.domain-grid article { padding: 1.6rem 1.5rem 1.8rem; border: 1px solid var(--rule); }
.domain-grid h3 {
  font-size: 1.25rem; font-weight: 560; font-style: italic; margin-bottom: .5rem;
}
.domain-grid .chips {
  font-family: var(--mono); font-size: .72rem; color: var(--rubric);
  letter-spacing: .05em; margin-bottom: .8rem;
}
.domain-grid p:last-child { font-size: .95rem; color: var(--ink-soft); }
.aside-note {
  margin-top: 1.8rem; font-style: italic; color: var(--ink-soft);
  max-width: var(--measure);
}

/* ── privacy ── */
.privacy-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2.4rem; max-width: 62rem;
}
.privacy-cols p { font-size: 1.05rem; }
.footnote-ref { color: var(--rubric); font-weight: 600; }
.footnote {
  margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  font-size: .88rem; color: var(--ink-soft); max-width: var(--measure);
}

/* ── pricing ── */
.price-card {
  border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper-deep);
  box-shadow: 6px 6px 0 rgba(188,53,8,.25);
  padding: 2.2rem 2.4rem; max-width: 30rem;
}
.price { display: flex; align-items: baseline; gap: .7rem; margin-bottom: .2rem; }
.price-alt { font-style: italic; color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.2rem; }
.price-num { font-size: 3.4rem; font-weight: 560; letter-spacing: -.02em; }
.price-once {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--rubric);
}
.price-card ul { list-style: none; }
.price-card li { padding: .45rem 0; border-bottom: 1px dashed var(--rule); }
.price-card li::before { content: "✓ "; color: var(--rubric); font-weight: 600; }
.price-note { margin-top: 1.2rem; font-style: italic; font-size: .92rem; color: var(--ink-soft); }

/* ── footer ── */
footer {
  margin-top: 5rem; border-top: 1px solid var(--rule);
  padding: 2.4rem clamp(1.4rem, 6vw, 5rem) 3rem;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap;
}
.wordmark.small { font-size: 1rem; }
.colophon {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  color: var(--ink-soft); text-align: right; line-height: 1.9;
}

/* ── load reveals ── */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .7s cubic-bezier(.2,.8,.3,1) forwards; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; }
.d3 { animation-delay: .3s; }  .d4 { animation-delay: .42s; }
.d5 { animation-delay: .54s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .mark-arc { animation: none; }
  html { scroll-behavior: auto; }
}
