@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;1,9..144,400&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #F6F1E4;
  --paper-bright: #FFFDF7;
  --ink: #22283A;
  --ink-soft: #4A5064;
  --leather: #6E3B2C;
  --leather-dark: #55291D;
  --brass: #B08D57;
  --sage: #4C7A6B;
  --rule: #D9CFB8;
  --shadow: rgba(34, 40, 58, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--leather); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--leather); outline-offset: 3px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px; height: 30px;
  border-radius: 4px 8px 8px 4px;
  background: linear-gradient(135deg, var(--leather), var(--leather-dark));
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: '';
  position: absolute;
  left: 6px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--brass);
}

.lang-toggle {
  display: flex;
  gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}
.lang-toggle a {
  padding: 5px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid transparent;
}
.lang-toggle a.active {
  color: var(--ink);
  border-color: var(--rule);
  background: var(--paper-bright);
}

/* Hero */
.hero {
  padding: 64px 0 40px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--leather);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--leather);
}

.hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper-bright);
}
.btn-primary:hover { background: var(--leather-dark); }
.btn-ghost {
  border-color: var(--rule);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--leather); }

/* Notebook illustration */
.notebook-stage {
  position: relative;
  display: flex;
  justify-content: center;
}

.ribbon {
  position: absolute;
  top: -14px;
  right: 26%;
  width: 34px;
  height: 190px;
  background: linear-gradient(180deg, var(--brass), #8f6f3d);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
  box-shadow: 0 8px 18px var(--shadow);
  z-index: 3;
}
.ribbon-ticker {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: center;
  width: 130px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #2a2013;
  text-align: center;
  letter-spacing: 0.02em;
}
.ribbon-ticker span {
  display: block;
  animation: tick 9s steps(1) infinite;
  opacity: 0;
}
.ribbon-ticker span:nth-child(1) { animation-delay: 0s; }
.ribbon-ticker span:nth-child(2) { animation-delay: 3s; }
.ribbon-ticker span:nth-child(3) { animation-delay: 6s; }
@keyframes tick {
  0%, 2% { opacity: 0; }
  6%, 30% { opacity: 1; }
  34%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon-ticker span { animation: none; opacity: 1; position: static; }
  .ribbon-ticker span:not(:first-child) { display: none; }
}

.notebook {
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  background: var(--paper-bright);
  border-radius: 10px;
  box-shadow: 0 30px 60px -20px var(--shadow), 0 2px 0 var(--rule);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.notebook::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 10px;
  margin-left: -5px;
  background: linear-gradient(90deg, transparent, var(--shadow), transparent);
}
.notebook-spine {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 22px;
  margin-left: -11px;
  background: linear-gradient(180deg, var(--leather), var(--leather-dark));
}
.notebook-lines {
  position: absolute;
  inset: 44px 26px 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}
.notebook-lines .col { display: flex; flex-direction: column; gap: 16px; }
.notebook-lines .rule { height: 1px; background: var(--rule); }
.notebook-lines .rule.short { width: 60%; }
.notebook-date {
  position: absolute;
  top: 18px; left: 26px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
}
.notebook-date.right { left: auto; right: 26px; }

/* Section: features as journal entries */
.entries {
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}
.entries h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 36px;
}
.entry-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.entry {
  background: var(--paper-bright);
  padding: 28px 26px;
}
.entry-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--leather);
  margin: 0 0 10px;
}
.entry h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 8px;
}
.entry p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* Generic content pages (privacy/support) */
.doc {
  padding: 48px 0 80px;
  max-width: 760px;
}
.doc h1 {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 600;
  margin: 0 0 8px;
}
.doc .updated {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 36px;
}
.doc h2 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 12px;
}
.doc p, .doc li { color: var(--ink-soft); font-size: 16px; }
.doc ul { padding-left: 20px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--leather); }
.site-footer .copy { font-size: 13px; color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .entry-list { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
