/* =========================================================
   Harness Starter Kit — Western / ochre-brown redesign
   Toss-style scroll storytelling
   ========================================================= */

:root {
  /* Ochre & brown leather palette */
  --cream:      #f4ead7;
  --cream-2:    #efe1c8;
  --paper:      #f7f0e2;
  --ochre:      #c8853f;
  --ochre-deep: #a8682b;
  --tan:        #b9763f;
  --leather:    #7c4a22;
  --leather-2:  #5a3415;
  --bark:       #3a2414;
  --espresso:   #2a1a0e;
  --brass:      #d8a24a;
  --ink:        #2e1c0f;
  --muted:      #715438;
  --line:       rgba(124, 74, 34, 0.16);
  --line-2:     rgba(124, 74, 34, 0.28);

  --font-display: "Zilla Slab", "Nanum Myeongjo", serif;
  --font-body: "Noto Sans KR", system-ui, sans-serif;
  --font-rye: "Rye", "Zilla Slab", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream)
    url("assets/background.png") center top / cover no-repeat fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* cream wash so content stays legible over the parchment image */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(244,234,215,.55) 0%, rgba(244,234,215,.74) 60%, rgba(239,225,200,.86) 100%);
}

.wrap { width: min(var(--maxw), calc(100% - 48px)); margin: 0 auto; }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: transparent;
}
#scroll-bar {
  display: block; height: 100%; width: 0%;
  background: var(--leather);
}

/* ---------- floating controls (no top bar) ---------- */
.floating-controls {
  position: fixed; top: 16px; right: clamp(16px, 4vw, 32px); z-index: 90;
  display: flex; align-items: center; gap: 8px;
}

.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--tan), var(--leather));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 2px 6px rgba(58,36,20,.3);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px; border-radius: 3px;
  border: 1.5px solid var(--brass);
}

.lang-toggle {
  display: inline-flex; align-items: stretch; gap: 0; padding: 0;
  border: 1.5px solid var(--leather-2); border-radius: 3px; overflow: hidden;
  cursor: pointer; background: rgba(247, 240, 226, .9); color: var(--leather-2);
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600; letter-spacing: .08em;
  line-height: 1;
}
.lang-toggle span {
  padding: 6px 11px;
  transition: background .15s ease, color .15s ease;
}
.lang-toggle span + span { border-left: 1.5px solid var(--leather-2); }
.lang-on { background: var(--leather-2); color: var(--cream); }
body[data-lang="en"] .lang-on { background: transparent; color: var(--leather-2); }
body[data-lang="en"] .lang-off { background: var(--leather-2); color: var(--cream); }

.ghost-btn {
  text-decoration: none; color: var(--leather-2); font-family: var(--font-display);
  font-weight: 600; font-size: 13px; letter-spacing: .06em;
  padding: 7px 15px; border-radius: 3px; border: 1.5px solid var(--leather-2);
  background: rgba(247, 240, 226, .9);
  transition: background .15s ease, color .15s ease;
}
.ghost-btn:hover { background: var(--leather-2); color: var(--cream); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- shared section typography ---------- */
section { padding: clamp(80px, 12vh, 150px) 0; }
.section-eyebrow {
  color: var(--ochre-deep); font-size: clamp(13px, 1.4vw, 15px); letter-spacing: .14em;
  margin: 0 0 18px; text-transform: uppercase;
}
.rye { font-family: var(--font-rye); }

h2.big {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 6vw, 66px); line-height: 1.08; letter-spacing: 0;
  margin: 0 0 26px; color: var(--espresso);
}
h2.mid {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4.4vw, 46px); line-height: 1.12; letter-spacing: 0;
  margin: 0 0 22px; color: var(--espresso);
}
.lead { font-size: clamp(16px, 2vw, 21px); color: var(--muted); max-width: 760px; margin: 0 0 8px; }
.lead.narrow { max-width: 620px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding-top: 80px; padding-bottom: 80px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(45% 40% at 50% 32%, rgba(200,133,63,.12), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; width: min(960px, calc(100% - 40px)); }
.eyebrow {
  display: inline-block; color: var(--ochre-deep); letter-spacing: .2em;
  font-size: clamp(12px, 1.4vw, 14px); margin-bottom: 26px;
}

/* ---------- western logo ---------- */
.logo {
  margin: 0 0 34px; display: flex; flex-direction: column; align-items: center;
  user-select: none;
}
.logo-flourish {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
  color: var(--ochre-deep);
}
.logo-flourish i {
  display: block; width: clamp(40px, 12vw, 110px); height: 2px;
  background: linear-gradient(90deg, transparent, var(--ochre-deep));
}
.logo-flourish i:last-child { background: linear-gradient(90deg, var(--ochre-deep), transparent); }
.logo-flourish b { font-size: 16px; line-height: 1; }

/* wood-type 3D extruded name */
.logo-name {
  position: relative;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(58px, 14vw, 150px); line-height: .9; letter-spacing: .015em;
  color: var(--leather-2);
  text-shadow:
    1px 1px 0 var(--ochre-deep),
    2px 2px 0 var(--ochre-deep),
    3px 3px 0 #8a5a2c,
    4px 4px 0 #6b3f1d,
    6px 7px 12px rgba(42,26,14,.35);
}

/* STARTER KIT band with rules + western type */
.logo-band {
  display: flex; align-items: center; gap: clamp(12px, 2.5vw, 22px);
  margin-top: clamp(8px, 1.6vw, 16px); width: 100%;
}
.band-rule {
  flex: 1; height: 0; position: relative;
  border-top: 2px solid var(--leather-2);
}
.band-rule::before, .band-rule::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 8px; height: 8px; background: var(--ochre-deep);
}
.band-rule::before { left: 0; }
.band-rule::after { right: 0; }
.band-text {
  font-family: var(--font-rye); color: var(--ochre-deep);
  font-size: clamp(20px, 4.4vw, 46px); letter-spacing: .04em; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}

.hero-sub {
  font-size: clamp(16px, 2.1vw, 22px); color: var(--muted);
  max-width: 680px; margin: 0 auto 34px; line-height: 1.55;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  text-decoration: none; font-weight: 600; font-size: 16px; padding: 14px 28px;
  border-radius: 999px; transition: transform .15s ease, box-shadow .25s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--ochre), var(--ochre-deep));
  color: #fff5e6; box-shadow: 0 10px 26px rgba(168, 104, 43, .4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(168, 104, 43, .5); }
.btn-secondary {
  background: transparent; color: var(--leather-2); border: 1.5px solid var(--line-2);
}
.btn-secondary:hover { background: rgba(124,74,34,.08); transform: translateY(-2px); }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 26px; height: 42px; border: 2px solid var(--line-2); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 2px; background: var(--ochre);
  animation: cue 1.6s infinite;
}
@keyframes cue { 0%{opacity:0;top:8px} 40%{opacity:1} 80%{opacity:0;top:22px} 100%{opacity:0} }

/* =========================================================
   STATEMENT / theory
   ========================================================= */
.statement { background: linear-gradient(180deg, transparent, rgba(124,74,34,.04)); }
.equation {
  margin-top: 46px; padding: 28px 32px; border-radius: 18px;
  background: var(--espresso);
  color: var(--cream); display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  box-shadow: 0 18px 44px rgba(42,26,14,.3); font-family: var(--font-display);
}
.eq-lhs { font-size: clamp(22px, 3vw, 34px); font-weight: 700; color: var(--brass); }
.eq-eq { font-size: clamp(22px, 3vw, 34px); color: var(--ochre); }
.eq-terms { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.eq-terms em { font-style: normal; font-weight: 600; font-size: clamp(14px, 1.8vw, 20px); }
.eq-terms i { font-style: normal; color: var(--ochre); font-weight: 700; padding: 0 2px; }

/* =========================================================
   PILLARS
   ========================================================= */
.card-grid {
  margin-top: 48px; display: grid; gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}
.p-card {
  position: relative; padding: 30px 26px 26px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 10px 30px rgba(58,36,20,.06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.p-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(58,36,20,.14); border-color: var(--line-2); }
.p-no {
  font-family: var(--font-rye); color: var(--ochre); font-size: 22px; letter-spacing: .04em;
}
.p-card h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: .01em;
  margin: 6px 0 12px; color: var(--leather-2);
}
.p-purpose { color: var(--muted); font-size: 15.5px; margin: 0 0 18px; min-height: 70px; }
.p-artifacts { display: flex; flex-wrap: wrap; gap: 7px; }
.p-artifacts span {
  font-family: var(--font-mono); font-size: 12px; color: var(--leather-2);
  padding: 4px 9px; border-radius: 7px; background: rgba(124,74,34,.08);
  border: 1px solid var(--line);
}

/* =========================================================
   DECISION TABLE
   ========================================================= */
.decide { background: linear-gradient(180deg, rgba(124,74,34,.04), transparent); }
.d-table {
  margin-top: 40px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--paper);
  box-shadow: 0 14px 40px rgba(58,36,20,.08);
}
.d-row {
  display: grid; grid-template-columns: 1.3fr .7fr 1.3fr; gap: 18px;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  align-items: center; font-size: 15px;
}
.d-row:last-child { border-bottom: none; }
.d-head {
  background: var(--espresso); color: var(--brass);
  font-family: var(--font-display); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; font-size: 13px;
}
.d-row:not(.d-head):nth-child(odd) { background: rgba(124,74,34,.035); }
.d-row span:first-child { color: var(--ink); font-weight: 500; }
.d-row span:last-child { color: var(--muted); }
.d-tag {
  justify-self: start; font-family: var(--font-display); font-weight: 600; font-size: 13px;
  color: var(--cream); background: linear-gradient(135deg, var(--tan), var(--leather));
  padding: 5px 12px; border-radius: 999px; letter-spacing: .03em;
}

/* =========================================================
   HEALTH VS EFFECTIVENESS
   ========================================================= */
.vs-grid {
  margin-top: 44px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px;
  align-items: stretch;
}
.vs-card {
  padding: 34px 30px; border-radius: 20px; background: var(--paper);
  border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(58,36,20,.07);
}
.vs-card:last-of-type { background: var(--espresso); color: var(--cream); border-color: transparent; }
.vs-card h3 { font-family: var(--font-display); font-size: 26px; margin: 0 0 14px; color: var(--leather-2); }
.vs-card:last-of-type h3 { color: var(--brass); }
.vs-card p { font-size: 16px; margin: 0 0 20px; color: var(--muted); }
.vs-card:last-of-type p { color: rgba(244,234,215,.82); }
.vs-foot {
  display: inline-block; font-family: var(--font-rye); font-size: 14px; color: var(--ochre-deep);
  border-top: 1px dashed var(--line-2); padding-top: 12px;
}
.vs-card:last-of-type .vs-foot { color: var(--brass); border-color: rgba(216,162,74,.4); }
.vs-sep {
  align-self: center; font-family: var(--font-rye); font-size: 26px; color: var(--ochre);
}
.vs-note { margin-top: 26px; font-size: 15.5px; color: var(--muted); max-width: 820px; }

/* =========================================================
   IMPROVEMENT LOOP
   ========================================================= */
.loop { background: linear-gradient(180deg, transparent, rgba(124,74,34,.04)); }
.loop-list { list-style: none; margin: 44px 0 0; padding: 0; max-width: 760px; }
.loop-list li {
  display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.loop-list li:last-child { border-bottom: none; }
.l-no {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
  font-size: 20px; color: var(--cream);
  background: linear-gradient(135deg, var(--ochre), var(--ochre-deep));
  box-shadow: 0 6px 16px rgba(168,104,43,.35);
}
.loop-list strong { display: block; font-family: var(--font-display); font-size: 20px; color: var(--leather-2); margin-bottom: 4px; }
.loop-list p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* =========================================================
   HOW TO USE
   ========================================================= */
.how { background: linear-gradient(180deg, rgba(124,74,34,.05), transparent); }
.prompt-card {
  margin-top: 40px; border-radius: 18px; overflow: hidden;
  background: var(--espresso); box-shadow: 0 24px 60px rgba(42,26,14,.35);
  border: 1px solid rgba(216,162,74,.25);
}
.prompt-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: rgba(0,0,0,.22); border-bottom: 1px solid rgba(216,162,74,.18);
}
.prompt-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--brass); }
.prompt-title { font-family: var(--font-display); color: var(--cream); letter-spacing: .06em; font-size: 14px; font-weight: 600; }
.copy-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: transparent; color: var(--brass); border: 1.5px solid rgba(216,162,74,.5);
  border-radius: 3px; padding: 7px 14px; font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: .05em;
  transition: background .15s ease, color .15s ease;
}
.copy-btn:hover { background: var(--brass); color: var(--espresso); }
.copy-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.copy-btn.copied { background: #6f9e4f; color: #fff; border-color: #6f9e4f; }

.prompt-card pre {
  margin: 0; padding: 24px 26px; overflow-x: auto; max-height: 460px;
}
.prompt-card code {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.65;
  color: #ecd9b6; white-space: pre; display: block;
}

.cmd-grid { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cmd-card {
  padding: 24px; border-radius: 16px; background: var(--paper);
  border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(58,36,20,.06);
}
.cmd-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--leather-2); }
.cmd-card p { color: var(--muted); font-size: 14.5px; margin: 8px 0 14px; }
.cmd-card code {
  display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--leather-2);
  background: rgba(124,74,34,.08); border: 1px solid var(--line);
  padding: 10px 12px; border-radius: 9px; overflow-x: auto; white-space: pre;
}
.how-note { margin-top: 22px; font-size: 14.5px; color: var(--muted); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--espresso); color: var(--cream); padding: 56px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; }
.footer-tag { color: rgba(244,234,215,.7); max-width: 720px; margin: 0; font-size: 15px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.footer-links a { color: var(--brass); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-links span { color: rgba(244,234,215,.5); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--leather-2); color: var(--cream); padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500; z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; box-shadow: 0 12px 30px rgba(42,26,14,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .vs-grid { grid-template-columns: 1fr; }
  .vs-sep { transform: rotate(90deg); justify-self: center; }
  .cmd-grid { grid-template-columns: 1fr; }
  .d-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
  .d-head { display: none; }
  .d-row:not(.d-head) span:first-child { font-weight: 600; }
  .d-tag { margin: 4px 0; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .p-purpose { min-height: 0; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-secondary { text-align: center; }
}

@media (max-width: 820px) {
  body { background-attachment: scroll; background-position: center top; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .scroll-cue span { animation: none; }
}
