/* ═══════════════════════════════════════════════════════════
   BASE — reset · custom-properties · layout · animation
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Colors */
  --bg:        #f5f2ed;
  --surface:   #edeae4;
  --surface2:  #e3dfd6;
  --border:    rgba(100,80,40,.12);
  --text:      #1a1814;
  --muted:     #5c5650;
  --accent:    #8a6a38;
  --accent-bg: rgba(138,106,56,.09);
  --gold:      #f0d9aa;

  /* Typography */
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;

  /* Layout */
  --header-h: 64px;
  --max-w:    1200px;
  --max-w-lg: 1440px;
  --max-w-sm:  860px;

  /* Motion */
  --ease:     cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(0,0,.2,1);
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a       { color: inherit; text-decoration: none; }
img     { max-width: 100%; display: block; }
button  { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ── Layout ─────────────────────────────────────────────────── */
.wrap      { max-width: var(--max-w);    margin: 0 auto; padding: 0 clamp(1.25rem,5vw,4rem); }
.wrap--wide{ max-width: var(--max-w-lg); margin: 0 auto; padding: 0 clamp(1.25rem,5vw,4rem); }
.wrap--sm  { max-width: var(--max-w-sm); margin: 0 auto; padding: 0 clamp(1.25rem,5vw,4rem); }

.sec            { padding: clamp(4.5rem,9vw,8rem) 0; }
.sec--surface   { background: var(--surface); }
.sec--surface2  { background: var(--surface2); }

/* ── Section header ─────────────────────────────────────────── */
.slbl {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem;
}
.slbl::before {
  content: ''; width: 20px; height: 1px;
  background: var(--accent); flex-shrink: 0;
}

.sh {
  font-family: var(--serif);
  font-size: clamp(2rem,4.5vw,3.5rem);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -.01em; color: var(--text);
  margin-bottom: 2.5rem;
}

/* ── Callout box ─────────────────────────────────────────────── */
.callout {
  border-left: 2px solid var(--accent);
  padding: 1rem 1.5rem;
  background: var(--accent-bg);
  font-size: .925rem; line-height: 2;
  color: rgba(26,24,20,.75);
}
.callout strong { color: var(--text); font-weight: 500; }

/* ── Reveal (IntersectionObserver driven) ───────────────────── */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.rv.visible { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .1s; }
.rv.d2 { transition-delay: .2s; }
.rv.d3 { transition-delay: .3s; }
.rv.d4 { transition-delay: .4s; }

/* ── Progress bar ────────────────────────────────────────────── */
#bar {
  position: fixed; top: 0; left: 0; z-index: 400;
  height: 2px; background: var(--accent);
  width: 0; pointer-events: none;
  transition: width .1s linear;
}
