/* Paper Crane Dev studio home. Same paper/ink tokens as theme/styles/tokens.css.
   Seal red is reserved for "Add to Chrome", as on the Better Sidebar site. */
:root {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-text: 'Literata', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --paper-0: #fffdfa;
  --paper-1: #fdfbf7;
  --paper-2: #f4f1eb;
  --paper-3: #eae5dc;
  --ink-1: #4a4238;
  --ink-2: #857b71;
  --ink-3: #b8afa4;
  --seal: #c1272d;
  --crease: #e3ded8;
  --radius: 2px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-1);
  background: var(--paper-1);
}
/* Paper grain, above content, darken-only. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-size: 160px 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
kbd {
  font-family: var(--font-mono);
  font-size: 0.8em;
  padding: 0 5px;
  background: var(--paper-3);
  border-radius: var(--radius);
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 112px 0; }
.band { background: var(--paper-2); }
.muted { color: var(--ink-2); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper-0); padding: 8px 12px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--ink-1); outline-offset: 3px; }

/* Mono UI chrome */
.kicker, .tag, .facts, .proof span, .n, .review figcaption, .hero-mark figcaption,
.nav-links a, .brand, .btn, .text-link, .footer h3, .legal {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker { font-size: 0.7rem; color: var(--ink-2); margin-bottom: 20px; }

h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h1 em { font-style: italic; font-weight: 500; color: var(--ink-2); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; line-height: 1.3; }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head .muted { margin-top: 20px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--crease);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.76rem; font-weight: 500; color: var(--ink-1); text-decoration: none;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 0.68rem; color: var(--ink-2); text-decoration: none; transition: color 0.3s var(--ease); }
.nav-links a:hover { color: var(--ink-1); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  font-size: 0.7rem; font-weight: 500;
  color: var(--paper-0); background: var(--ink-1);
  border: 1px solid var(--ink-1); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-1); }
.btn-ghost:hover { background: var(--paper-3); }
.btn-seal { background: var(--seal); border-color: var(--seal); }
.btn-seal:hover { box-shadow: 0 10px 30px -10px rgba(193, 39, 45, 0.5); }
.btn-disabled { background: transparent; color: var(--ink-3); border-color: var(--crease); cursor: default; }
.btn-disabled:hover { transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.text-link { font-size: 0.66rem; color: var(--ink-2); text-decoration: none; }
.text-link:hover { color: var(--ink-1); }

/* Hero */
.hero { padding: 96px 0 112px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 64px; align-items: center; }
.lead { margin-top: 28px; max-width: 560px; font-size: 1.1rem; font-weight: 300; color: var(--ink-1); }
.proof { list-style: none; padding: 32px 0 0; margin: 48px 0 0; display: flex; gap: 48px; border-top: 1px solid var(--crease); }
.proof li { display: flex; flex-direction: column; gap: 4px; }
.proof b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1; }
.proof span { font-size: 0.62rem; color: var(--ink-2); }
.hero-mark { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.hero-mark img { width: min(100%, 320px); opacity: 0.88; }
.hero-mark figcaption { font-size: 0.6rem; color: var(--ink-3); }

/* Products */
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product {
  display: flex; flex-direction: column;
  padding: 32px; background: var(--paper-0);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--crease), 0 18px 40px -28px rgba(74, 66, 56, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.product:hover { transform: translateY(-3px); box-shadow: 0 1px 0 var(--crease), 0 26px 50px -28px rgba(74, 66, 56, 0.45); }
.product-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.product-top img { width: 48px; height: 48px; border-radius: 10px; }
.glyph {
  display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 10px; background: var(--paper-3); color: var(--ink-2);
}
.tag { font-size: 0.58rem; color: var(--ink-2); padding: 4px 8px; background: var(--paper-2); border-radius: var(--radius); }
.tag-new { color: var(--ink-1); background: var(--paper-3); }
.product h3 { margin-bottom: 12px; }
.product p { font-size: 0.93rem; color: var(--ink-1); font-weight: 300; }
.facts { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.58rem; color: var(--ink-2); }
.facts li::before { content: '· '; color: var(--ink-3); }
.product-cta { margin-top: auto; padding-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.product-soon { background: transparent; box-shadow: inset 0 0 0 1px var(--crease); }
.product-soon:hover { transform: none; box-shadow: inset 0 0 0 1px var(--crease); }

/* Principles */
.craft { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.craft .section-head { position: sticky; top: 112px; margin-bottom: 0; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
.principles li { border-top: 1px solid var(--crease); padding-top: 20px; }
.n { display: block; font-size: 0.62rem; color: var(--ink-3); margin-bottom: 12px; }
.principles h3 { font-size: 1.15rem; margin-bottom: 8px; }
.principles p { font-size: 0.92rem; color: var(--ink-2); }

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review { margin: 0; padding: 32px; background: var(--paper-0); border-radius: var(--radius); display: flex; flex-direction: column; gap: 20px; }
.stars { color: var(--ink-1); letter-spacing: 0.2em; font-size: 0.85rem; }
.review blockquote { margin: 0; font-size: 0.98rem; line-height: 1.75; font-style: italic; }
.review figcaption { margin-top: auto; font-size: 0.58rem; color: var(--ink-3); }

/* Final */
.final { display: flex; flex-direction: column; align-items: center; text-align: center; }
.final img { opacity: 0.8; margin-bottom: 28px; }
.final .muted { margin-top: 16px; }
.final .cta-row { justify-content: center; }

/* Footer */
.footer { background: var(--paper-2); padding: 64px 0 40px; font-size: 0.88rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)); gap: 32px; }
.footer-grid p { margin-top: 14px; max-width: 34ch; color: var(--ink-2); font-size: 0.86rem; }
.footer h3 { font-size: 0.62rem; font-weight: 500; color: var(--ink-3); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--ink-2); text-decoration: none; }
.footer ul a:hover { color: var(--ink-1); }
.legal {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--crease);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: 0.56rem; line-height: 1.8; color: var(--ink-3); letter-spacing: 0.06em;
}

@media (max-width: 960px) {
  .hero-grid, .craft { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { display: none; }
  .craft .section-head { position: static; }
  .products, .reviews { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  section { padding: 80px 0; }
  .hide-sm { display: none; }
  .nav-links { gap: 18px; }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .proof { gap: 28px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
