@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* Landing page register: the whole page is the cutting mat, content is paper pinned to it.
   Hard offset shadows are a marketing-page treatment only; the app keeps its soft shadows. */
:root {
  --mat-green: #1D5940;
  --mat-deep: #0E2E21;
  --accent: #7FDDC7;
  --accent-ink: #123D2C;
  --accent-strong: #1E8A6E;
  --paper: #FFFFFF;
  --ink: #1D2019;
  --ink-soft: #4A4F46;
  --on-mat: #F2FBF7;
  --on-mat-soft: #C6E4D9;
  --grid-minor: rgba(127, 221, 199, 0.10);
  --grid-major: rgba(127, 221, 199, 0.20);
  --hard: 6px 6px 0 var(--mat-deep);
  --hard-lg: 8px 8px 0 var(--mat-deep);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background-color: var(--mat-green);
  /* Printed mat grid: fine lines every 24px, a heavier line every 120px */
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  color: var(--on-mat-soft);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Ruler ticks down the left edge, like the mat's own margin */
body::before, body::after {
  content: '';
  position: fixed; left: 0; top: 0; bottom: 0;
  pointer-events: none; z-index: 5;
}
body::before { width: 10px; background: repeating-linear-gradient(to bottom, var(--accent) 0 1px, transparent 1px 12px); opacity: 0.35; }
body::after  { width: 18px; background: repeating-linear-gradient(to bottom, var(--accent) 0 1px, transparent 1px 60px); opacity: 0.5; }

a { color: var(--accent-strong); text-underline-offset: 3px; }
main a:not(.btn):not(.link-arrow), .site-footer a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; color: var(--on-mat); }
p { margin: 0 0 16px; }
strong { font-weight: 700; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 760px; }

/* Paper pinned to the mat */
.sheet {
  background: var(--paper);
  color: var(--ink-soft);
  border: 2px solid var(--mat-deep);
  border-radius: 6px;
  box-shadow: var(--hard);
}
.sheet h1, .sheet h2, .sheet h3 { color: var(--ink); }
.sheet a { color: var(--accent-strong); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(29, 89, 64, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--mat-deep);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--on-mat); text-decoration: none; font-weight: 700; font-size: 18px; }
.wordmark .mark { flex: none; border-radius: 6px; }
.wordmark span[lang] { font-weight: 500; color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a:not(.btn) { color: var(--on-mat-soft); text-decoration: none; font-size: 15px; }
.site-nav a:not(.btn):hover { color: var(--accent); }

/* Buttons: hard shadow, press down into it */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 24px;
  border: 2px solid var(--mat-deep);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--mat-deep);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--mat-deep); color: var(--accent-ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--mat-deep); }
.btn-small { padding: 5px 14px; font-size: 14px; box-shadow: 3px 3px 0 var(--mat-deep); }
.btn-small:active { transform: translate(3px, 3px); }
.btn-dark { background: var(--mat-green); color: var(--on-mat); }
.btn-dark:hover, .sheet .btn-dark, .sheet .btn-dark:hover { color: var(--on-mat); }
.link-arrow { color: var(--accent); font-weight: 500; text-decoration: none; }
.link-arrow::after { content: ' →'; }
.link-arrow:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.eyebrow, .section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.badge {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--mat-deep); border-radius: 4px;
  box-shadow: 2px 2px 0 var(--mat-deep);
  padding: 0 8px; margin-right: 8px;
  font-weight: 500;
}
h1 { font-size: 46px; font-weight: 700; margin-bottom: 24px; }
h1 mark {
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--mat-deep); border-radius: 4px;
  box-shadow: var(--hard);
  padding: 0 10px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  line-height: 1.5;
}
.lede { font-size: 19px; color: var(--on-mat); margin-bottom: 32px; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.fine { font-size: 14px; color: var(--on-mat-soft); }

.hero-demo { margin: 0; }
.demo-sheet { box-shadow: var(--hard-lg); padding: 0 0 8px; overflow: hidden; }
.demo-sheet svg { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.demo-readout {
  margin: 0; padding: 0 16px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}
.hero-demo figcaption {
  margin-top: 20px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.04em;
  color: var(--on-mat-soft);
}

/* Sections */
.section { padding: 72px 0; }
.section-title { font-size: 32px; margin-bottom: 24px; }
.three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card { padding: 24px; }
.card h2 { font-size: 20px; margin-bottom: 8px; }
.card p { margin: 0; }
.intro { color: var(--on-mat); margin-bottom: 40px; }

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 0 0 40px; padding: 0; display: grid; gap: 24px; }
.steps li { counter-increment: step; position: relative; padding: 20px 24px 20px 84px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 20px; top: 20px;
  width: 44px; height: 44px; border-radius: 6px;
  background: var(--mat-green); color: var(--accent);
  border: 2px solid var(--mat-deep);
  font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { font-size: 19px; margin-bottom: 4px; }
.steps p { margin: 0; }
.steps strong, .notes strong { color: var(--ink); }

.callout { background: var(--accent); color: var(--accent-ink); padding: 20px 24px; margin-bottom: 56px; }
.callout p { margin: 0; }
.callout strong { color: var(--accent-ink); }

.subhead { font-size: 22px; margin-bottom: 16px; }
.notes-sheet { padding: 24px 24px 12px 24px; margin-bottom: 40px; }
.notes { margin: 0; padding-left: 20px; }
.notes li { margin-bottom: 12px; }
.cta-row { padding-top: 8px; }

/* The name */
.name-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.name-sheet { padding: 40px 24px; text-align: center; box-shadow: var(--hard-lg); }
.kanji { font-family: 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', 'DM Sans', sans-serif; font-size: 104px; font-weight: 700; line-height: 1.1; letter-spacing: 0.04em; color: var(--mat-green); margin: 0 0 16px; }
.reading { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--ink-soft); }
.reading span { color: var(--accent-strong); font-weight: 500; }
.name-copy p { color: var(--on-mat); }
.chars { display: grid; gap: 16px; margin: 24px 0 28px; }
.char { display: flex; align-items: center; gap: 16px; padding: 12px 16px; box-shadow: 4px 4px 0 var(--mat-deep); font-size: 15px; }
.char strong { display: block; color: var(--ink); font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
.char-glyph { flex: none; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--mat-green); color: var(--accent); font-size: 30px; font-weight: 700; font-family: 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', sans-serif; }

/* Footer */
.site-footer { background: var(--mat-deep); color: var(--on-mat-soft); padding: 20px 0; margin-top: 24px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-line { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.03em; }
.footer-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.03em;
  color: var(--on-mat-soft);
}
.footer-toggle:hover, .footer-toggle:focus-visible { color: var(--accent); }
.footer-panel { overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.4s ease, opacity 0.4s ease; }
.footer-panel.open { opacity: 1; }
.footer-panel-inner {
  display: flex; gap: 40px; justify-content: space-between; flex-wrap: wrap;
  margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(127, 221, 199, 0.25);
}
.footer-note { max-width: 560px; font-size: 14px; }
.footer-note p { margin: 0 0 12px; }
.footer-note .footer-fine { font-size: 12px; opacity: 0.8; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.email-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--accent);
  border: 1px solid rgba(127, 221, 199, 0.6); border-radius: 4px;
  padding: 8px 12px; cursor: pointer;
  font-family: inherit; font-size: 13px; letter-spacing: 0.04em;
  transition: background 0.15s, color 0.15s;
}
.email-btn:hover, .email-btn:focus-visible { background: rgba(127, 221, 199, 0.12); }
.email-btn .icon-check { display: none; }
.email-btn.copied { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.email-btn.copied .icon-copy { display: none; }
.email-btn.copied .icon-check { display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.footer-links a { color: var(--accent); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

@media (max-width: 800px) {
  body { font-size: 16px; }
  body::before, body::after { display: none; }
  .container { padding: 0 20px; }
  .hero { padding: 40px 0 56px; }
  .hero-grid, .name-grid { grid-template-columns: 1fr; gap: 40px; }
  h1 { font-size: 34px; }
  .three-up { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 48px 0; }
  .site-nav { gap: 16px; }
  .site-nav a:not(.btn) { display: none; }
  .steps li { padding: 20px 20px 20px 20px; }
  .steps li::before { position: static; margin-bottom: 12px; }
  .kanji { font-size: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .footer-panel { transition: none; }
}
