/* Vellum Studio — public site.
   Editorial paper-and-ink system for the landing page, the template library,
   template detail pages and shared designs. */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2');
}

:root {
  --paper: #f7f3ec;
  --paper-2: #fffdf8;
  --ink: #14110f;
  --ink-2: #3b342e;
  --ink-3: #6b6058;
  --muted: #8b8078;
  --line: #e2d9cc;
  --line-strong: #cbbfae;
  --accent: #e4572e;
  --accent-soft: #fbe9e2;
  --good: #1f7a4d;
  --chrome: #efe8dc;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 2px rgba(20, 17, 15, 0.06);
  --shadow-md: 0 6px 20px rgba(20, 17, 15, 0.09);
  --shadow-lg: 0 24px 60px rgba(20, 17, 15, 0.16);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.site {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.site::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 18% 8%, rgba(228, 87, 46, 0.055), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(31, 122, 77, 0.045), transparent 38%);
}

.site a { color: inherit; }
.site img { max-width: 100%; display: block; }

.muted { color: var(--muted); }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

/* ── navigation ─────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px clamp(18px, 4vw, 44px);
  background: rgba(247, 243, 236, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-nav .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.site-nav .brand span:last-child {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.site-nav .brand em, .site-footer .brand em { font-style: normal; color: var(--muted); font-weight: 500; }

.site-nav nav { display: flex; gap: 4px; }
.site-nav nav a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}
.site-nav nav a:hover { background: var(--chrome); color: var(--ink); }

.site-nav .nav-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ── buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  white-space: nowrap;
}
.btn:hover { background: var(--chrome); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }

.btn-solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-solid:hover { background: #2a2420; border-color: #2a2420; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--chrome); border-color: transparent; }

.btn-invert { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-invert:hover { background: #fff; border-color: #fff; }

.btn-lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 11px; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.chip:hover { border-color: var(--ink-3); }
.chip-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ── hero ───────────────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 68px);
  align-items: center;
  padding: clamp(44px, 7vw, 96px) clamp(18px, 4vw, 44px) clamp(30px, 5vw, 60px);
  max-width: 1320px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.14);
}

.hero h1, .page-head h1, .detail-copy h1, .share-head h1 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.98;
  margin: 0 0 18px;
}
.hero h1 { font-size: clamp(40px, 6.2vw, 78px); max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--accent); }

.lede {
  font-size: clamp(15.5px, 1.35vw, 17.5px);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero-art {
  position: relative;
  aspect-ratio: 1 / 0.92;
  min-height: 320px;
}
.stack {
  position: absolute;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.stack img { width: 100%; height: 100%; object-fit: cover; }
.stack-a { width: 52%; left: 0; top: 6%; transform: rotate(-4.2deg); z-index: 2; }
.stack-b { width: 46%; right: 2%; top: 0; transform: rotate(3.4deg); z-index: 3; }
.stack-c { width: 62%; left: 15%; bottom: 0; transform: rotate(-1.4deg); z-index: 4; }
.hero-art:hover .stack-a { transform: rotate(-6deg) translateY(-6px); }
.hero-art:hover .stack-b { transform: rotate(5deg) translateY(-4px); }
.hero-art:hover .stack-c { transform: rotate(-2deg) translateY(-8px); }

.hero-tag {
  position: absolute;
  z-index: 5;
  right: 4%;
  bottom: 6%;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: var(--shadow-md);
}

/* ── stats ──────────────────────────────────────────────────── */

.stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats > div {
  background: var(--paper);
  padding: 22px clamp(16px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stats strong { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.03em; }
.stats span { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }

/* ── sections ───────────────────────────────────────────────── */

.section {
  position: relative;
  z-index: 1;
  padding: clamp(46px, 6vw, 88px) clamp(18px, 4vw, 44px);
  max-width: 1320px;
  margin: 0 auto;
}
.section.tight { padding-top: 26px; }

.section-head { margin-bottom: clamp(24px, 3vw, 40px); max-width: 720px; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; max-width: none; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-weight: 700;
  margin: 0 0 12px;
  max-width: 20ch;
}

.section-dark {
  background: var(--ink);
  color: var(--paper);
  border-radius: 22px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-dark .eyebrow { color: rgba(247, 243, 236, 0.55); }
.section-dark .lede { color: rgba(247, 243, 236, 0.72); }
.section-dark h2 { color: var(--paper); }

/* ── features ───────────────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 18px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.feature > div:last-child { padding: 16px 18px 20px; }
.feature h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 6px; letter-spacing: -0.015em; }
.feature p { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.6; }

.feature-art {
  position: relative;
  height: 150px;
  background: linear-gradient(160deg, #f3ece0, #e9dfd0);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.art-snap .guide { position: absolute; background: var(--accent); }
.art-snap .guide.v { left: 50%; top: 0; bottom: 0; width: 1px; opacity: 0.65; }
.art-snap .guide.h { top: 50%; left: 0; right: 0; height: 1px; opacity: 0.65; }
.art-snap .box { position: absolute; border: 1.5px solid var(--ink); background: rgba(255, 255, 255, 0.6); border-radius: 4px; }
.art-snap .box-1 { width: 74px; height: 54px; left: calc(50% - 96px); top: calc(50% - 46px); }
.art-snap .box-2 { width: 88px; height: 66px; left: calc(50% + 6px); top: calc(50% - 12px); border-color: var(--accent); }

.art-type { display: grid; place-items: center; }
.art-type .aa { font-family: var(--serif); font-size: 66px; font-weight: 700; letter-spacing: -0.05em; color: var(--ink); line-height: 1; }
.art-type .type-lines {
  position: absolute;
  right: 18px;
  top: 26px;
  width: 62px;
  height: 78px;
  background: repeating-linear-gradient(to bottom, rgba(20, 17, 15, 0.42) 0 2px, transparent 2px 8px);
  border-radius: 2px;
}

.art-mask { display: grid; place-items: center; }
.art-mask .mask-photo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #d9cbb6, #b7a894, #e4572e);
  filter: saturate(0.9);
}
.art-mask .mask-ring {
  position: absolute;
  width: 116px;
  height: 116px;
  border: 1.5px dashed rgba(20, 17, 15, 0.45);
  border-radius: 50%;
}

.art-layers { padding: 22px 26px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.art-layers .layer {
  height: 20px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line-strong);
}
.art-layers .layer:nth-child(1) { width: 82%; margin-left: 18%; background: #14110f; border-color: #14110f; }
.art-layers .layer:nth-child(2) { width: 70%; margin-left: 30%; border-color: var(--accent); }
.art-layers .layer:nth-child(3) { width: 88%; margin-left: 12%; }
.art-layers .layer:nth-child(4) { width: 60%; margin-left: 40%; }

/* ── export ─────────────────────────────────────────────────── */

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.export-card {
  border: 1px solid rgba(247, 243, 236, 0.16);
  border-radius: 12px;
  padding: 18px 18px 20px;
  background: rgba(247, 243, 236, 0.035);
}
.export-card h3 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 8px; color: #ffb9a3; }
.export-card p { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(247, 243, 236, 0.66); }

/* ── templates ──────────────────────────────────────────────── */

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 18px;
}
.tpl-grid.showcase { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.tpl-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.tpl-card > a { display: block; text-decoration: none; }

.tpl-frame {
  position: relative;
  background: var(--chrome);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.tpl-frame img { width: 100%; height: 100%; object-fit: contain; }
.tpl-frame.tpl-social { aspect-ratio: 1; }
.tpl-frame.tpl-story { aspect-ratio: 9 / 14; }
.tpl-frame.tpl-presentation { aspect-ratio: 16 / 9; }
.tpl-frame.tpl-banner { aspect-ratio: 16 / 7; }
.tpl-frame.tpl-print { aspect-ratio: 3 / 4; }
.tpl-frame.tpl-flyer { aspect-ratio: 3 / 4; }

.tpl-meta { padding: 11px 13px 13px; display: flex; align-items: flex-start; gap: 8px; }
.tpl-meta h3, .tpl-meta strong { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.tpl-meta p, .tpl-meta span { display: block; font-size: 11.5px; color: var(--muted); margin: 2px 0 0; }
.tpl-meta .arrow { margin-left: auto; color: var(--muted); font-size: 15px; line-height: 1.2; }

.page-head {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(38px, 5vw, 68px) clamp(18px, 4vw, 44px) 8px;
}
.page-head h1 { font-size: clamp(34px, 5vw, 62px); max-width: 18ch; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }

.detail {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 54px) clamp(18px, 4vw, 44px) clamp(40px, 5vw, 70px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
}
.detail-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--chrome);
  padding: 22px;
  box-shadow: var(--shadow-md);
}
.detail-preview img { width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow-sm); }
.detail-copy h1 { font-size: clamp(30px, 3.8vw, 46px); }
.spec-list { list-style: none; padding: 0; margin: 24px 0; border-top: 1px solid var(--line); }
.spec-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.spec-list span { width: 104px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.spec-list strong { font-weight: 600; }
.spec-list .swatches { display: flex; gap: 5px; }
.spec-list .swatches i { width: 18px; height: 18px; border-radius: 5px; display: inline-block; border: 1px solid rgba(20, 17, 15, 0.08); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tag {
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--chrome);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── cta band ───────────────────────────────────────────────── */

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
  background:
    radial-gradient(circle at 12% 30%, rgba(228, 87, 46, 0.09), transparent 46%),
    var(--chrome);
}
.cta-band h2 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.03em; margin: 0 0 8px; }
.cta-band .lede { max-width: 52ch; }

/* ── footer ─────────────────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: clamp(34px, 4vw, 54px) clamp(18px, 4vw, 44px) 26px;
  background: var(--paper);
}
.footer-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.7fr));
  gap: clamp(20px, 3vw, 44px);
}
.footer-grid .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 12px; }
.footer-grid p { max-width: 34ch; font-size: 13px; color: var(--ink-3); margin: 0; }
.footer-grid h3, .footer-grid h4 {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 700;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-grid a { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-base {
  max-width: 1320px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

/* ── shared designs ─────────────────────────────────────────── */

body.share { background: #efeae1; }
.share-head {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 64px) clamp(16px, 4vw, 40px) 10px;
  text-align: center;
}
.share-head h1 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 10px; }
.share-head .fine { margin-top: 12px; }
.share-head .fine a { color: var(--accent); }

.share-pages {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 40px) 90px;
  display: grid;
  gap: 26px;
}
.share-page {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.share-page svg { display: block; width: 100%; height: auto; }
.share-page figcaption {
  padding: 9px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.share-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(20, 17, 15, 0.88);
  color: var(--paper);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  font-size: 12px;
  z-index: 30;
}
.share-controls .btn { color: var(--paper); border-color: rgba(247, 243, 236, 0.2); background: rgba(247, 243, 236, 0.06); }
.share-controls span { padding: 0 8px; font-variant-numeric: tabular-nums; color: rgba(247, 243, 236, 0.66); }

/* ── responsive ─────────────────────────────────────────────── */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: 280px; max-width: 520px; }
  .detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav nav { display: none; }
}

@media (max-width: 620px) {
  .site-nav { gap: 12px; padding: 10px 16px; }
  .hero h1 { font-size: clamp(34px, 10vw, 48px); }
  .section-head.row { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
