/* ═══════════════════════════════════════════════════════
   HAMATO FORWARD DEPLOYMENT — Shared Stylesheet
   Brand System v1.0 · Treatment A LOCKED
   ═══════════════════════════════════════════════════════ */

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --paper:      #F1EFE8;
  --ink:        #16181C;
  --ink-2:      #3A3C44;
  --yellow:     #BEDD00;
  --yellow-hover: #c8db00;  /* 5% darker, hover state only */
  --line:       #cfccc2;

  --ff-display: 'Barlow Condensed', sans-serif;
  --ff-jp:      'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --ff-mono:    'JetBrains Mono', 'Courier New', monospace;
}

/* ─── BASE ───────────────────────────────────────────────── */
html { background: #E8E6DF; }   /* outer bleed: slightly darker than paper */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-mono);
  max-width: 1040px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── FOCUS ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ─── ICON — yellow square with 本 ──────────────────────── */
.icon {
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */
header {
  padding: 20px 48px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Lockup is a link on inner pages */
.lockup-h {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.wordmark-group {
  display: flex;
  flex-direction: column;
}

.hamato {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 40px;
  letter-spacing: -0.005em;
  line-height: 0.82;
  color: var(--ink);
}

.subline {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 5px;
}

.fd {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.katakana {
  font-family: var(--ff-jp);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--ink-2);
}

/* ─── NAV ────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}


/* ═══════════════════════════════════════════════════════
   LAYOUT — MAIN
   ═══════════════════════════════════════════════════════ */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── HERO SECTION ───────────────────────────────────────── */
.hero-section {
  padding: 80px 48px 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

/* ─── INTERIOR SECTIONS ──────────────────────────────────── */
.section {
  padding: 64px 48px;
  border-bottom: 1px solid var(--line);
}

.section:last-of-type {
  border-bottom: none;
}

/* Small uppercase label above section content */
.section-label {
  display: block;
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 36px;
}


/* ═══════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════ */
h1 {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(52px, 7.5vw, 88px);
  letter-spacing: -0.005em;
  line-height: 0.92;
  color: var(--ink);
  margin-bottom: 28px;
  max-width: 820px;
}

h2 {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(30px, 4.5vw, 52px);
  letter-spacing: -0.005em;
  line-height: 0.92;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 760px;
}

/* Yellow as SOLID BLOCK — ink on yellow = 14.1:1 AAA */
/* Never yellow text on light: 1.31:1 fails WCAG */
mark {
  background: var(--yellow);
  color: var(--ink);
  padding: 0 7px 4px;
  font-style: normal;
}

.subhead {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  max-width: 580px;
  margin-bottom: 40px;
}

.body-text {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
  max-width: 640px;
}

/* Rule statement — the "one rule" on method page */
.rule-statement {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.005em;
  line-height: 0.95;
  color: var(--ink);
  padding-left: 20px;
  border-left: 4px solid var(--yellow);
  margin-bottom: 20px;
}


/* ═══════════════════════════════════════════════════════
   CTA BUTTON
   ═══════════════════════════════════════════════════════ */
.cta {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  align-self: flex-start;
  /* Swiss: rectangular blocks, no radius */
  transition: background 0.12s ease;
}

.cta:hover {
  background: var(--yellow-hover);
}

.cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  background: var(--yellow-hover);
}


/* ═══════════════════════════════════════════════════════
   HOME PAGE — WHAT WE BUILD GRID
   ═══════════════════════════════════════════════════════ */
.build-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.build-item {
  padding: 32px 32px 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.build-item:nth-child(odd) {
  padding-right: 40px;
  border-right: 1px solid var(--line);
}

.build-item:nth-child(even) {
  padding-left: 40px;
}

/* Remove bottom border from last row */
.build-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.build-num {
  display: block;
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--line);
  margin-bottom: 8px;
}

.build-name {
  display: block;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}

.build-desc {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-2);
}


/* ═══════════════════════════════════════════════════════
   HOME PAGE — METHOD STRIP
   ═══════════════════════════════════════════════════════ */
.method-strip {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 32px;
  border-right: 1px solid var(--line);
}

.step:last-child {
  border-right: none;
}

.step-num {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--line);
  margin-bottom: 2px;
}

.step-name {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}

.step-desc {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-top: 2px;
}

/* "See the full method" row below strip */
.method-link-row {
  border-top: 1px solid var(--line);
  padding: 16px 32px;
}

.method-link-row a {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.12s ease;
}

.method-link-row a::after {
  content: '\2192';  /* → */
  font-style: normal;
}

.method-link-row a:hover {
  color: var(--ink);
}


/* ═══════════════════════════════════════════════════════
   METHOD PAGE — ARC STAGES
   ═══════════════════════════════════════════════════════ */
.arc {
  display: flex;
  flex-direction: column;
}

.stage {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 28px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.stage:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stage-num {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--line);
  padding-top: 3px;
}

.stage-name {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 10px;
}

.stage-desc {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 580px;
}


/* ═══════════════════════════════════════════════════════
   METHOD PAGE — GATES
   ═══════════════════════════════════════════════════════ */
.gate-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  margin-top: 36px;
}

.gate {
  padding: 36px 32px;
}

.gate:first-child {
  border-right: 1px solid var(--line);
}

.gate-arrow {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--line);
  margin-bottom: 12px;
  display: block;
}

.gate-name {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 12px;
}

.gate-proves {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 10px;
  display: block;
}

.gate-desc {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.75;
  color: var(--ink-2);
}


/* ═══════════════════════════════════════════════════════
   LAYOUT HELPERS
   ═══════════════════════════════════════════════════════ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.two-col-lean {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 64px;
  align-items: start;
}

/* Inline text link */
.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.12s ease;
}

.text-link:hover {
  color: var(--ink-2);
}


/* ═══════════════════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════════════════ */
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-email-link {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(22px, 3.5vw, 40px);
  letter-spacing: -0.005em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--ink);
  transition: color 0.12s ease, border-color 0.12s ease;
}

.contact-email-link:hover {
  color: var(--ink-2);
  border-bottom-color: var(--line);
}

.how-it-starts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.how-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.how-item:first-child {
  border-top: 1px solid var(--line);
}

.how-num {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--line);
  padding-top: 2px;
}

.how-text {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
}


/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
footer {
  border-top: 2px solid var(--ink);
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-name {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-tagline {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 760px breakpoint
   ═══════════════════════════════════════════════════════ */
@media (max-width: 760px) {

  header {
    padding: 16px 24px;
    gap: 16px;
  }

  .hamato { font-size: 28px; }
  .fd, .katakana { font-size: 8.5px; }
  .subline { flex-direction: column; gap: 3px; margin-top: 4px; }

  nav { gap: 20px; }
  nav a { font-size: 9.5px; letter-spacing: 0.16em; }

  .hero-section { padding: 56px 24px 48px; }
  .section { padding: 48px 24px; }

  /* Build grid: collapse to 1-col */
  .build-grid { grid-template-columns: 1fr; }
  .build-item { padding: 24px 0; border-right: none !important; padding-right: 0 !important; padding-left: 0 !important; }
  .build-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .build-item:last-child { border-bottom: none; }

  /* Method strip: collapse to 1-col */
  .method-strip { grid-template-columns: 1fr; }
  .step { padding: 18px 24px; border-right: none; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: none; }
  .method-link-row { padding: 14px 24px; }

  /* Arc stages */
  .stage { grid-template-columns: 36px 1fr; gap: 0 14px; padding: 28px 0; }

  /* Gate pair */
  .gate-pair { grid-template-columns: 1fr; }
  .gate:first-child { border-right: none; border-bottom: 1px solid var(--line); }
  .gate { padding: 28px 24px; }

  /* Layout helpers */
  .two-col, .two-col-lean { grid-template-columns: 1fr; gap: 36px; }

  /* How-it-starts grid */
  .how-item { grid-template-columns: 22px 1fr; gap: 0 12px; }

  footer {
    padding: 18px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

}

/* ─── REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
