/* ============================================================
   Preenway InkEdition marketing site
   Palette: paper #F6F7F4 · ink #182420 · emerald #106B4F · amber #E4B32A
   Type: serif display / system sans body / mono for labels & statuses
   ============================================================ */

:root {
  --paper: #f6f7f4;
  --paper-deep: #edf0ea;
  --card: #ffffff;
  --ink: #182420;
  --ink-soft: #4d5c54;
  --emerald: #106b4f;
  --emerald-deep: #0a4a37;
  --emerald-tint: #e3efe9;
  --amber: #e4b32a;
  --amber-soft: rgba(228, 179, 42, 0.14);
  --rule: #d7ddd4;
  --dark: #10251e;
  --dark-soft: #1a332a;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --fs-hero: clamp(2.5rem, 5.5vw, 4.1rem);
  --fs-h2: clamp(1.75rem, 3.2vw, 2.5rem);
  --fs-h3: 1.3rem;

  --container: 1120px;
  --radius: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; }

.lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 38em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--amber);
  border-radius: 2px;
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  padding: 15px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--emerald);
  background: var(--emerald);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--emerald-deep);
  border-color: var(--emerald-deep);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink);
}

.btn-ghost:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.btn-light:hover {
  background: #fff;
  border-color: #fff;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand:hover { text-decoration: none; }

.brand svg { width: 26px; height: 26px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.site-nav a:hover { color: var(--ink); text-decoration: none; }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: 0 2px 0 0 var(--amber);
}

.site-nav .btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  color: #fff;
}

.site-nav .btn:hover { color: #fff; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 9px 11px;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark);
  color: #b8c6bf;
  padding: 56px 0 40px;
  font-size: 0.95rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--dark-soft);
}

.site-footer .brand { color: var(--paper); }

.footer-tag { margin-top: 10px; max-width: 26em; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer-nav a { color: #b8c6bf; }
.footer-nav a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #7d8f86;
}

.footer-bottom a { color: #7d8f86; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-deep { background: var(--paper-deep); }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head .lede { margin-top: 16px; }

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 104px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: center;
}

.hero-copy .lede { margin: 24px 0 36px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-note {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Signature: zoned e-paper page ---------- */

.epage-wrap {
  position: relative;
  padding: 12px 36px 44px 0;
}

.epage {
  position: relative;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 24px 48px -24px rgba(24, 36, 32, 0.35);
  padding: 22px 20px 26px;
}

.epage-masthead {
  text-align: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 6px;
}

.epage-masthead strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.epage-dateline {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding: 5px 2px 7px;
  margin-bottom: 14px;
}

.epage-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
}

.epage-col { display: flex; flex-direction: column; gap: 6px; }

.ep-headline {
  height: 12px;
  background: var(--ink);
  border-radius: 2px;
  margin-bottom: 4px;
}

.ep-headline.short { width: 70%; }

.ep-line {
  height: 5px;
  background: #dde2db;
  border-radius: 2px;
}

.ep-line.short { width: 82%; }

.ep-photo {
  height: 74px;
  border-radius: 2px;
  margin: 4px 0;
  background:
    linear-gradient(145deg, #c9d4cc 0%, #aebfb4 55%, #93a89c 100%);
}

.ep-gap { height: 8px; }

/* zone markers drawn over the page */
.zone {
  position: absolute;
  border: 2px dashed var(--amber);
  border-radius: 3px;
  background: var(--amber-soft);
  opacity: 0;
  animation: zone-in 0.5s ease forwards;
}

.zone-a { top: 25%; left: 5%; width: 42%; height: 34%; animation-delay: 0.5s; }
.zone-b { top: 66%; left: 53%; width: 41%; height: 26%; animation-delay: 0.9s; }

.zone-tag {
  position: absolute;
  top: -11px;
  left: 8px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--amber);
  color: var(--ink);
  padding: 3px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

/* the extracted article card */
.zone-card {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(62%, 250px);
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius);
  box-shadow: 0 18px 36px -18px rgba(24, 36, 32, 0.4);
  padding: 16px 18px;
  opacity: 0;
  animation: card-in 0.55s ease forwards;
  animation-delay: 1.5s;
}

.zone-card-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--emerald);
  margin-bottom: 6px;
}

.zone-card-title {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.zone-card-meta {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

@keyframes zone-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Dual model split ---------- */

.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.dual-panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 36px;
}

.dual-panel h3 { margin-bottom: 12px; }

.dual-panel p { color: var(--ink-soft); }

.dual-panel ul {
  margin-top: 18px;
  list-style: none;
}

.dual-panel li {
  padding: 8px 0 8px 26px;
  position: relative;
  border-top: 1px solid var(--rule);
  font-size: 0.98rem;
}

.dual-panel li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--emerald);
}

.dual-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

/* ---------- Feature cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
}

.card svg {
  width: 30px;
  height: 30px;
  stroke: var(--emerald);
  margin-bottom: 18px;
}

.card h3 { margin-bottom: 10px; font-size: 1.15rem; }

.card p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Themes strip ---------- */

.themes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.theme {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.theme-preview {
  height: 120px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tp-bar { height: 8px; border-radius: 2px; }
.tp-line { height: 5px; border-radius: 2px; width: 85%; }
.tp-line.short { width: 60%; }

/* Classic: centered broadsheet masthead */
.theme-classic .theme-preview { background: #fdfcf8; align-items: center; }
.theme-classic .tp-bar { width: 70%; background: #23211c; height: 11px; }
.theme-classic .tp-line { background: #d9d5c8; }

/* Modern: compact sticky bar */
.theme-modern .theme-preview { background: #f4f6f8; }
.theme-modern .tp-bar { width: 100%; background: #1c2733; }
.theme-modern .tp-line { background: #c8d2dc; }

/* Dark: newsstand */
.theme-dark .theme-preview { background: #161a1e; }
.theme-dark .tp-bar { width: 55%; background: #e8b931; }
.theme-dark .tp-line { background: #39424b; }

/* Emerald: editorial */
.theme-emerald .theme-preview { background: #f2f7f4; }
.theme-emerald .tp-bar { width: 55%; background: var(--emerald); }
.theme-emerald .tp-line { background: #ccdfd5; }

.theme-name {
  border-top: 1px solid var(--rule);
  padding: 14px 16px;
}

.theme-name strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
}

.theme-name span {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--dark);
  color: var(--paper);
  padding: 88px 0;
}

.cta-band .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-band h2 { max-width: 15em; }

.cta-band p {
  margin-top: 14px;
  color: #b8c6bf;
  max-width: 32em;
}

/* ---------- Feature page sections ---------- */

.feature-block {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  padding: 72px 0;
  border-top: 1px solid var(--rule);
}

.feature-block:first-of-type { border-top: 0; }

.feature-block > div:first-child p {
  margin-top: 16px;
  color: var(--ink-soft);
}

.feature-list { list-style: none; }

.feature-list li {
  padding: 18px 0 18px 34px;
  position: relative;
  border-top: 1px solid var(--rule);
}

.feature-list li:first-child { border-top: 0; padding-top: 0; }

.feature-list li:first-child::before { top: 6px; }

.feature-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 24px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--emerald);
}

.feature-list strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.feature-list span { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Status badges ---------- */

.status-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink-soft);
}

.badge-processing { border-color: var(--amber); color: #8a6a10; background: var(--amber-soft); }
.badge-ready { border-color: var(--emerald); color: var(--emerald); background: var(--emerald-tint); }
.badge-published { border-color: var(--emerald); background: var(--emerald); color: #fff; }
.badge-failed { border-color: #c05b4d; color: #a03d30; background: #f8e9e6; }

.status-flow .arrow {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.9rem;
}

/* ---------- Roles ---------- */

.roles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.role {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--emerald);
  border-radius: var(--radius);
  padding: 22px 20px;
}

.role h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.role .role-scope {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 12px;
}

.role ul { list-style: none; }

.role li {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 5px 0 5px 16px;
  position: relative;
}

.role li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--amber);
}

/* ---------- How it works: timeline ---------- */

.timeline { list-style: none; max-width: 760px; }

.timeline li {
  position: relative;
  padding: 0 0 44px 84px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 10px;
  bottom: -10px;
  width: 1px;
  background: var(--rule);
}

.timeline li:last-child::before { display: none; }

.step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 54px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--emerald);
}

.timeline h3 { margin-bottom: 8px; }

.timeline p { color: var(--ink-soft); max-width: 34em; }

/* ---------- Pipeline diagram ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: stage;
}

.stage {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px 22px;
  margin-right: 34px;
}

.stage:last-child { margin-right: 0; }

.stage::after {
  content: "→";
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.stage:last-child::after { display: none; }

.stage h3 { font-size: 1.05rem; margin-bottom: 8px; }

.stage p { font-size: 0.9rem; color: var(--ink-soft); }

.stage .stage-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  display: block;
  margin-bottom: 10px;
}

.stage:nth-child(1) .stage-tag,
.stage:nth-child(3) .stage-tag { color: var(--emerald); }

/* ---------- Contact ---------- */

.contact-hero {
  padding: 96px 0 72px;
  text-align: center;
}

.contact-hero .lede {
  margin: 20px auto 0;
}

.email-card {
  max-width: 620px;
  margin: 48px auto 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 44px 32px;
  box-shadow: 0 24px 48px -32px rgba(24, 36, 32, 0.3);
}

.email-card .eyebrow { margin-bottom: 10px; }

.email-address {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  word-break: break-all;
}

.copy-btn {
  margin-top: 22px;
}

.copy-btn.copied {
  background: var(--emerald-deep);
  border-color: var(--emerald-deep);
}

.contact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 860px;
  margin-inline: auto;
}

.contact-panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  text-align: left;
}

.contact-panel h3 { margin-bottom: 16px; }

.contact-panel ol,
.contact-panel ul {
  list-style: none;
}

.contact-panel li {
  padding: 10px 0 10px 30px;
  position: relative;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.contact-panel li:first-child { border-top: 0; }

.contact-panel ol { counter-reset: item; }

.contact-panel ol li::before {
  counter-increment: item;
  content: counter(item);
  position: absolute;
  left: 0;
  top: 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--emerald);
}

.contact-panel ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--emerald);
}

/* ---------- Reveal on scroll ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .zone, .zone-card { animation: none; opacity: 1; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .section { padding: 72px 0; }

  .hero .container { grid-template-columns: 1fr; gap: 56px; }
  .epage-wrap { max-width: 520px; }

  .cards { grid-template-columns: 1fr 1fr; }
  .themes { grid-template-columns: 1fr 1fr; }
  .roles { grid-template-columns: 1fr 1fr; }

  .feature-block { grid-template-columns: 1fr; gap: 28px; padding: 56px 0; }

  .pipeline { grid-template-columns: 1fr; }
  .stage { margin-right: 0; margin-bottom: 34px; }
  .stage:last-child { margin-bottom: 0; }
  .stage::after {
    right: auto;
    top: auto;
    left: 26px;
    bottom: -30px;
    transform: rotate(90deg);
  }
}

@media (max-width: 700px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px 24px 20px;
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }

  .site-nav a[aria-current="page"] { box-shadow: none; color: var(--emerald); }

  .site-nav .btn {
    margin-top: 16px;
    justify-content: center;
    padding: 14px;
    border-bottom: 0;
  }

  .dual, .cards, .themes, .roles, .contact-cols { grid-template-columns: 1fr; }

  .timeline li { padding-left: 66px; }
  .step-num { width: 44px; height: 44px; }
  .timeline li::before { left: 22px; }
}
