/* =====================================================
   Momo Jord — shared design system
   ===================================================== */

/* ---------- Tokens ---------- */
:root{
  /* Moln (default) — warm paper */
  --paper: #f7f4ee;
  --paper-2: #ede7da;
  --paper-3: #e2dac8;
  --ink: #1c2018;
  --ink-soft: #4a4f43;
  --ink-mute: #7d8174;
  --hairline: #d6cfbe;
  --hairline-strong: #c4bca6;
  --brand: #2f6b3a;
  --brand-deep: #234d2a;
  --brand-soft: #e6efe2;
  --ember: #c66a2e;
  --gold: #b89249;
  --warning: #b14b2a;
  --bg: var(--paper);
  --fg: var(--ink);
  --card: #ffffff;
}
[data-theme="mossa"]{
  --paper: #14180f; --paper-2: #1d2218; --paper-3: #262c20;
  --ink: #f3efe4; --ink-soft: #c8c4b3; --ink-mute: #8a8d7e;
  --hairline: #2a3025; --hairline-strong: #3a4234;
  --brand: #7fb285; --brand-deep: #5a8c63; --brand-soft: #1c2618;
  --ember: #e3925a; --card: #1a1f15;
}
[data-theme="bjork"]{
  --paper: #fafaf6; --paper-2: #f0eee4; --paper-3: #e4e1d2;
  --ink: #14160f; --ink-soft: #44473b; --ink-mute: #7a7c6f;
  --hairline: #d8d4c2; --brand: #2f6b3a; --ember: #c66a2e; --card: #ffffff;
}

[data-font="cormorant"]{ --ff-display: "Cormorant Garamond", "Times New Roman", serif; --display-weight: 500; }
[data-font="instrument"]{ --ff-display: "Instrument Serif", "Times New Roman", serif; --display-weight: 400; }
:root{
  --ff-display: "Cormorant Garamond", "Times New Roman", serif;
  --display-weight: 500;
  --ff-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ---------- Base ---------- */
*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ff-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
::selection{ background: var(--brand); color: #fff; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img{ max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6{ margin: 0; }

/* ---------- Util ---------- */
.wrap{ max-width: 1400px; margin: 0 auto; padding: 0 32px; }
.eyebrow{
  font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-mute);
}
.serif{ font-family: var(--ff-display); font-weight: var(--display-weight); letter-spacing: -.005em; }
.italic{ font-style: italic; }
.brand-green{ color: var(--brand); }

/* ---------- Promo bar (under utility) ---------- */
.promo-bar{
  background: #e6efe2;
  color: #234d2a;
  font-size: 13px;
  border-bottom: 1px solid var(--hairline);
}
[data-theme="mossa"] .promo-bar{
  background: color-mix(in oklab, var(--brand) 18%, var(--card));
  color: var(--brand);
}
.promo-inner{
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 32px; gap: 16px;
}
.promo-text{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.4; }
.promo-text code{
  font-family: var(--ff-mono); font-size: 12px;
  background: white; border: 1px dashed #234d2a;
  padding: 2px 8px; border-radius: 4px; font-weight: 600;
  letter-spacing: .05em;
  color: #234d2a;
}
[data-theme="mossa"] .promo-text code{ background: var(--paper); color: var(--brand-deep); border-color: var(--brand); }
.promo-close{
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 16px; line-height: 1; color: currentColor;
  opacity: .65; flex-shrink: 0;
}
.promo-close:hover{ background: rgba(0,0,0,.06); opacity: 1; }
@media (max-width: 720px){ .promo-inner{ padding: 10px 20px; } }

/* ---------- Top utility ---------- */
.utility{
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.utility-inner{
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 32px; gap: 16px;
}
.utility .group{ display: flex; gap: 24px; align-items: center; }
.utility .star{ color: #f3c95c; }
.utility a{ opacity: .85; }
.utility a:hover{ opacity: 1; }

/* ---------- Nav ---------- */
.nav{
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner{
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 16px 32px; gap: 24px;
}
.brand{
  display: flex; align-items: center; gap: 10px;
  font-family: var(--ff-display);
  font-weight: 500; font-size: 24px; letter-spacing: -.01em;
}
.brand-mark{ width: 28px; height: 28px; color: var(--brand); display: inline-flex; }
.brand-mark svg{ width: 100%; height: 100%; display:block; }

.nav-links{ display: flex; gap: 28px; justify-self: center; font-size: 14px; }
.nav-links a{
  position: relative; padding: 6px 0;
  color: var(--ink); font-weight: 500;
}
.nav-links a.on{ color: var(--brand); }
.nav-links a::after{
  content:""; position:absolute; left:0; right:100%; bottom:0;
  height: 2px; background: var(--brand); transition: right .3s ease;
}
.nav-links a:hover::after, .nav-links a.on::after{ right: 0; }

.nav-utils{ display:flex; gap: 8px; justify-self: end; align-items: center; font-size: 13px; }
.icon-btn{
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: var(--ink);
}
.icon-btn:hover{ background: var(--paper-2); }
.icon-btn svg{ width: 18px; height: 18px; }
.cart-btn{
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px; font-size: 13px; margin-left: 4px;
}
.cart-btn .count{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--brand); color: white;
  font-size: 10px; font-weight: 600; padding: 0 6px;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  cursor: pointer; white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--brand); color: white; }
.btn-primary:hover{ background: var(--brand-deep); }
.btn-dark{ background: var(--ink); color: var(--paper); }
.btn-dark:hover{ background: #000; }
.btn-ghost{ background: transparent; color: var(--ink); border: 1px solid var(--hairline-strong); }
.btn-ghost:hover{ border-color: var(--ink); }
.btn-block{ width: 100%; justify-content: center; padding: 14px 20px; }
.btn:disabled{ opacity: .5; cursor: not-allowed; transform: none; }
.btn .arr{ width: 14px; height: 14px; }

/* ---------- Sections ---------- */
section.block{ padding: 80px 0; }
.section-head{
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 36px; gap: 20px;
}
.section-head h2{
  font-family: var(--ff-display);
  font-weight: var(--display-weight);
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.05; letter-spacing: -.015em;
}
.section-head h2 em{ font-style: italic; color: var(--brand); }
.section-head .right{ display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--ink-soft); }
.section-head .right a{
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px; font-weight: 500;
}

/* ---------- Stars ---------- */
.stars{ color: #d29a2a; letter-spacing: 2px; font-size: 14px; }
.stars-sm{ font-size: 12px; letter-spacing: 1px; }

/* ---------- Cards / common ---------- */
.in-stock{
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--brand); font-weight: 500;
}
.in-stock .dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent);
}
.low-stock{ color: var(--ember); }
.low-stock .dot{ background: var(--ember); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ember) 18%, transparent); }
.oos{ color: var(--ink-mute); }
.oos .dot{ background: var(--ink-mute); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ink-mute) 18%, transparent); }

.price{
  font-family: var(--ff-display); font-weight: var(--display-weight);
  font-size: 22px; letter-spacing: -.01em;
}
.price .was{
  font-size: 13px; color: var(--ink-mute);
  text-decoration: line-through; margin-right: 6px;
  font-family: var(--ff-sans); font-weight: 400;
}

.qty{
  display: flex; align-items: center;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px; overflow: hidden;
}
.qty button{ width: 38px; height: 38px; font-size: 16px; color: var(--ink); }
.qty input{
  width: 36px; border: 0; background: transparent;
  text-align: center; font: inherit; font-weight: 500;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }

/* ---------- Newsletter / Footer (shared) ---------- */
.newsletter-band{
  padding: 64px 0;
  border-top: 1px solid var(--hairline);
  background: var(--paper-2);
}
.newsletter{ display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.newsletter h3{
  font-family: var(--ff-display); font-weight: var(--display-weight);
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.05; letter-spacing: -.015em;
}
.newsletter h3 em{ font-style: italic; color: var(--brand); }
.newsletter p{ color: var(--ink-soft); margin-top: 10px; max-width: 44ch; font-size: 15px; }
.subscribe{
  display: flex; gap: 8px; padding: 6px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 999px;
}
.subscribe input{
  flex: 1; background: transparent; border: 0; outline: 0;
  padding: 10px 16px; font: inherit; color: var(--fg);
}
.subscribe input::placeholder{ color: var(--ink-mute); }

footer.footer{
  padding: 56px 0 32px;
  border-top: 1px solid var(--hairline);
  background: var(--bg);
}
.foot-grid{
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px;
}
.foot-col h6{
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 500; margin: 0 0 14px;
}
.foot-col a{ display: block; padding: 4px 0; font-size: 14px; color: var(--ink-soft); }
.foot-col a:hover{ color: var(--fg); }
.foot-brand{
  font-family: var(--ff-display); font-weight: var(--display-weight);
  font-size: 36px; line-height: 1; letter-spacing: -.015em;
}
.foot-brand-body p{ color: var(--ink-soft); font-size: 14px; max-width: 32ch; margin: 14px 0 16px; }
.payment-icons{ display: flex; gap: 10px; align-items: center; height: 24px; }
.payment-icons span{
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; padding: 0 8px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 4px;
  font-family: var(--ff-mono); font-size: 9px; letter-spacing: .08em;
  color: var(--ink-soft); text-transform: uppercase; font-weight: 600;
}
.legal{
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- Tweaks ---------- */
.tweaks{
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  width: 280px; background: var(--card);
  border: 1px solid var(--hairline); border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
  display: none;
}
.tweaks.open{ display: block; }
.tweaks-head{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--hairline);
}
.tweaks-head .t{ font-family: var(--ff-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.tweaks-body{ padding: 16px; display: grid; gap: 16px; }
.tw-group .lbl{
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 8px;
}
.seg{ display: flex; border: 1px solid var(--hairline); border-radius: 999px; overflow: hidden; }
.seg button{ flex: 1; padding: 8px 6px; font-size: 12px; border-right: 1px solid var(--hairline); }
.seg button:last-child{ border-right: 0; }
.seg button.on{ background: var(--ink); color: var(--paper); }

/* ---------- Page header (subpage) ---------- */
.page-head{
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--hairline);
}
.breadcrumbs{
  font-family: var(--ff-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute);
  display: flex; gap: 8px; align-items: center;
}
.breadcrumbs a{ color: var(--ink-soft); }
.breadcrumbs a:hover{ color: var(--ink); }
.breadcrumbs .sep{ opacity: .5; }
.page-head h1{
  margin-top: 18px;
  font-family: var(--ff-display); font-weight: var(--display-weight);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1; letter-spacing: -.02em;
}
.page-head h1 em{ font-style: italic; color: var(--brand); }
.page-head .sub{ margin-top: 16px; color: var(--ink-soft); max-width: 56ch; font-size: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .wrap{ padding: 0 20px; }
  .nav-links{ display: none; }
  .newsletter{ grid-template-columns: 1fr; gap: 28px; }
  .foot-grid{ grid-template-columns: 1fr 1fr; }
  .section-head{ flex-direction: column; align-items: start; }
}
