/* ============================================================
   小胖毛工作室 — 暖光手作 Design System
   Shared stylesheet for the hub redesign.
   Warm paper · ink brown · ember accent · editorial scale.
   ============================================================ */

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

/* ---- Tokens ---- */
:root {
  /* warm paper + ink */
  --paper:      #F4EBDC;
  --paper-2:    #FBF5EA;   /* card / raised */
  --paper-3:    #FCF9F2;   /* lightest */
  --ink:        #2A1B11;
  --ink-soft:   #6E5340;
  --ink-mute:   #9A8268;
  --line:       #E2D4BF;
  --line-soft:  #ECE1CF;

  /* accent family (driven by Tweaks — default ember) */
  --accent:      #D97A2B;
  --accent-deep: #B05E1B;
  --accent-wash: #F6E2C8;
  --accent-ink:  #7A3E12;

  /* sparing secondaries */
  --clay: #C2562E;
  --sky:  #6E97B8;
  --sage: #84996F;

  /* type */
  --serif: 'DM Serif Display', 'Songti TC', Georgia, serif;
  --sans:  'Nunito', system-ui, sans-serif;
  --mono:  'Space Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* shape + depth */
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --shadow-sm: 0 2px 14px rgba(42,27,17,0.06);
  --shadow:    0 10px 38px rgba(42,27,17,0.10);
  --shadow-lg: 0 26px 70px rgba(42,27,17,0.16);

  --maxw: 1180px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* warm paper grain — toggleable via [data-grain="off"] */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
  transition: opacity .3s;
}
body[data-grain="off"]::after { opacity: 0; }

::selection { background: var(--accent-wash); color: var(--accent-ink); }

/* ---- Reusable bits ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; width: 100%; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: '';
  width: 16px; height: 1.5px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow.is-light { color: rgba(247,232,210,0.78); }
.eyebrow.is-light::before { background: var(--accent); }

.display {
  font-family: var(--serif);
  font-style: italic;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.ink-accent { color: var(--accent); }

/* hand-drawn underline accent */
.underline-mark { position: relative; white-space: nowrap; }
.underline-mark svg {
  position: absolute;
  left: -2%; bottom: -0.32em;
  width: 104%; height: 0.42em;
  overflow: visible;
}
.underline-mark svg path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.85;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, color .2s;
}
.btn .ico { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary {
  background: var(--ink);
  color: var(--paper-3);
  box-shadow: 0 6px 22px rgba(42,27,17,0.22);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(42,27,17,0.28); }
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 22px rgba(217,122,43,0.34);
}
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(217,122,43,0.42); }
.btn-ghost {
  color: var(--ink-soft);
  border-color: var(--line);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: 14px; color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: gap .2s;
}
.btn-link:hover { gap: 12px; }

/* tag / chip */
.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-wash);
  border-radius: 999px;
  padding: 4px 11px;
}

/* ============================================================
   NAV / MASTHEAD
   ============================================================ */
.masthead {
  position: sticky; top: 0; z-index: 500;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  max-width: var(--maxw); margin: 0 auto;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 40px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b {
  font-family: var(--serif); font-style: italic; font-size: 21px;
  color: var(--ink); font-weight: 400;
}
.brand-name span {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em;
  color: var(--ink-mute); text-transform: uppercase; margin-top: 3px;
}
.nav-row { display: flex; align-items: center; gap: clamp(6px, 1.6vw, 22px); }
.nav-link {
  font-size: 14px; font-weight: 700; color: var(--ink-soft);
  text-decoration: none; letter-spacing: 0.01em;
  transition: color .2s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 2px; background: var(--accent); transition: width .25s;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 100%; }
.nav-cta {
  font-size: 13px; font-weight: 800; color: var(--ink);
  text-decoration: none; padding: 9px 18px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--ink); color: var(--paper-3); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.site-footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 34px clamp(18px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 18px;
}
.foot-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-style: italic; font-size: 17px;
  color: var(--ink-soft); text-decoration: none;
}
.foot-brand img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.foot-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot-links a {
  font-size: 12.5px; color: var(--ink-soft); text-decoration: none; opacity: 0.7;
  transition: opacity .2s;
}
.foot-links a:hover { opacity: 1; color: var(--accent-deep); }
.foot-copy { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); letter-spacing: 0.04em; }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
.rd1 { transition-delay: .08s; } .rd2 { transition-delay: .16s; }
.rd3 { transition-delay: .24s; } .rd4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
