/* =====================================================
   Fell & Form — Store prototype (website-v2)
   Green & gold · Fraunces / Jost · CloudFlare + Stripe
   ===================================================== */

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

:root {
  --cream: #FAF8F5;
  --paper: #F4F2EA;
  --sage-tint: #E7ECDD;
  --forest: #3E4E34;
  --forest-deep: #26321C;
  --moss: #4E6240;
  --sage: #6E7E5B;
  --gold: #C19A3E;
  --gold-bright: #D9B45A;
  --gold-deep: #9C7C2C;
  --ink: #262E1A;
  --text: #3F4636;
  --line: #E0DCCF;
  --danger: #A6442E;

  --font-body: 'Jost', 'Century Gothic', 'Futura', sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --max: 1200px;
  --nav-h: 74px;
  --radius: 14px;
  --shadow-sm: 0 6px 20px rgba(38,50,28,.08);
  --shadow-md: 0 18px 44px rgba(38,50,28,.16);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep);
  margin-bottom: 1rem;
}
.section { padding: 5.5rem 0; }
.section--paper { background: var(--paper); }
.section--sage { background: var(--sage-tint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.8rem; border: none; border-radius: 999px;
  font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--gold); color: #fff; box-shadow: 0 8px 22px rgba(193,154,62,.32); }
.btn--gold:hover { background: var(--gold-deep); }
.btn--forest { background: var(--forest); color: var(--cream); }
.btn--forest:hover { background: var(--forest-deep); }
.btn--outline { background: transparent; border: 1.5px solid var(--forest); color: var(--forest); }
.btn--outline:hover { background: var(--forest); color: var(--cream); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,248,245,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.nav--scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav__inner { max-width: var(--max); margin: 0 auto; height: var(--nav-h); padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; }
.nav__logo { height: 44px; width: auto; }
.nav__links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav__link { font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text); transition: color .2s; }
.nav__link:hover, .nav__link--active { color: var(--gold-deep); }
.nav__right { display: flex; align-items: center; gap: 1.25rem; }

/* Cart button */
.cart-btn { position: relative; background: none; border: none; padding: .35rem; color: var(--forest); display: flex; align-items: center; }
.cart-btn svg { width: 26px; height: 26px; }
.cart-count {
  position: absolute; top: -4px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--gold); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.cart-count[data-empty="true"] { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: 5rem 0 5.5rem; overflow: hidden; background: var(--cream); }
.hero__motif {
  position: absolute; inset: 0; opacity: .14; background-repeat: no-repeat;
  background-position: center 58%; background-size: 130% auto; pointer-events: none;
}
.hero__content { position: relative; z-index: 2; padding: 0 1.5rem; }
.hero__badge {
  width: 220px; height: 220px; margin: 0 auto 1.75rem; border-radius: 50%;
  background: #fff; overflow: hidden; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
}
.hero__badge img { width: 102%; }
.hero h1 { font-size: 3.1rem; max-width: 16ch; margin: 0 auto 1.1rem; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--forest); }
.hero__sub { max-width: 46ch; margin: 0 auto 2rem; font-size: 1.08rem; color: var(--text); }
.hero__cta { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Section heading ---------- */
.sec-head { text-align: center; max-width: 60ch; margin: 0 auto 3rem; }
.sec-head h2 { font-size: 2.3rem; margin-bottom: .75rem; }
.sec-head p { color: var(--text); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__media { position: relative; aspect-ratio: 1/1; background: var(--paper); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.3rem; margin-bottom: .3rem; }
.card__tagline { font-size: .92rem; color: var(--sage); margin-bottom: 1rem; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .4rem; }
.card__price { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.card__price small { font-size: .8rem; color: var(--sage); font-family: var(--font-body); }

/* ---------- Badges ---------- */
.badges { position: absolute; top: .8rem; left: .8rem; display: flex; flex-direction: column; gap: .4rem; z-index: 2; }
.badge {
  font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .32rem .6rem; border-radius: 999px; color: #fff; backdrop-filter: blur(2px);
}
.badge--limited { background: rgba(38,50,28,.82); }
.badge--low { background: var(--gold-deep); }
.badge--sold { background: var(--danger); }
.stock-line { font-size: .8rem; font-weight: 600; letter-spacing: .04em; margin-top: .15rem; }
.stock-line--low { color: var(--gold-deep); }
.stock-line--sold { color: var(--danger); }
.stock-line--ok { color: var(--sage); }

/* ---------- Product detail ---------- */
.pdp { padding: 3rem 0 5rem; }
.pdp__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: start; }
.pdp__media { position: relative; }
.pdp__main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper); aspect-ratio: 1/1; }
.pdp__main img { width: 100%; height: 100%; object-fit: cover; }
.pdp__thumbs { display: flex; gap: .7rem; margin-top: .8rem; }
.pdp__thumbs img { width: 78px; height: 78px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; opacity: .7; transition: opacity .15s; }
.pdp__thumbs img.active, .pdp__thumbs img:hover { opacity: 1; border-color: var(--gold); }
.pdp h1 { font-size: 2.5rem; margin-bottom: .5rem; }
.pdp__tagline { color: var(--sage); font-size: 1.05rem; margin-bottom: 1.3rem; }
.pdp__price { font-family: var(--font-display); font-size: 1.9rem; color: var(--ink); margin-bottom: 1.4rem; }
.pdp__desc { margin-bottom: 1.5rem; }
.pdp__details { list-style: none; margin-bottom: 1.8rem; border-top: 1px solid var(--line); }
.pdp__details li { padding: .65rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; display: flex; gap: .6rem; }
.pdp__details li::before { content: "—"; color: var(--gold); }

.variant-label { font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: .6rem; display: block; }
.variants { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.4rem; }
.variant {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
  padding: .6rem .9rem; font-size: .9rem; font-weight: 500; color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; min-width: 92px; transition: border-color .15s, background .15s;
}
.variant small { font-size: .72rem; color: var(--sage); font-weight: 600; }
.variant:hover:not(:disabled) { border-color: var(--sage); }
.variant.active { border-color: var(--gold); background: #FCF7EA; }
.variant:disabled { opacity: .5; cursor: not-allowed; text-decoration: line-through; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 1.4rem; }
.qty button { width: 42px; height: 42px; background: #fff; border: none; font-size: 1.2rem; color: var(--forest); }
.qty button:hover { background: var(--paper); }
.qty span { width: 46px; text-align: center; font-weight: 600; }

.add-row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }

/* ---------- Cart drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(38,50,28,.4); opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 50; }
.overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
  background: var(--cream); z-index: 60; transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(38,50,28,.2);
}
.drawer.open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--line); }
.drawer__head h3 { font-size: 1.4rem; }
.drawer__close { background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--text); }
.drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.drawer__foot { padding: 1.3rem 1.5rem; border-top: 1px solid var(--line); background: #fff; }
.ship-opts { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.ship-opt {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem;
  border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s;
}
.ship-opt.active { border-color: var(--gold); background: #FCF7EA; }
.ship-opt input { accent-color: var(--gold-deep); }
.ship-opt__text { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.ship-opt__label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.ship-opt__sub { font-size: .76rem; color: var(--sage); }
.ship-opt__amt { font-size: .9rem; font-weight: 600; color: var(--ink); }
.drawer__row { display: flex; justify-content: space-between; font-size: .9rem; color: var(--text); padding: .15rem 0; }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; margin: .5rem 0 1rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.drawer__total .lbl { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); }
.drawer__total .amt { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.drawer__note { font-size: .76rem; color: var(--sage); text-align: center; margin-top: .8rem; }

.cart-empty { text-align: center; color: var(--sage); padding: 3rem 1rem; }

.line {
  display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: center;
}
.line__img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--paper); border: 1px solid var(--line); }
.line__name { font-weight: 600; color: var(--ink); font-size: .95rem; }
.line__variant { font-size: .8rem; color: var(--sage); }
.line__price { font-size: .85rem; color: var(--text); margin-top: .15rem; }
.line__qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: .4rem; }
.line__qty button { width: 26px; height: 26px; border: none; background: #fff; color: var(--forest); font-size: .95rem; }
.line__qty span { width: 28px; text-align: center; font-size: .85rem; font-weight: 600; }
.line__remove { background: none; border: none; color: var(--sage); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; margin-top: .4rem; }
.line__remove:hover { color: var(--danger); }
.line__right { text-align: right; }

/* demo banner */
.demo-bar {
  background: var(--forest-deep); color: var(--sage-tint); text-align: center;
  font-size: .76rem; letter-spacing: .04em; padding: .5rem 1rem;
}
.demo-bar b { color: var(--gold-bright); }

/* ---------- Featured strip ---------- */
.featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.featured__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4/3; }
.featured__media img { width: 100%; height: 100%; object-fit: cover; }
.featured h2 { font-size: 2.3rem; margin: .4rem 0 .8rem; }

/* ---------- Values ---------- */
.values { display: grid; grid-template-columns: repeat(3,1fr); gap: 2.5rem; text-align: center; }
.values h3 { font-size: 1.25rem; margin: .8rem 0 .4rem; }
.values p { font-size: .92rem; color: var(--text); }

/* ---------- Result pages ---------- */
.result { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4rem 1.5rem; }
.result__inner { max-width: 34rem; }
.result h1 { font-size: 2.6rem; margin-bottom: 1rem; }
.result__mark { width: 84px; height: 84px; margin: 0 auto 1.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--sage-tint); color: var(--forest); }
.result__mark svg { width: 42px; height: 42px; }

/* ---------- Policy / prose pages ---------- */
.policy { padding: 3.5rem 0 5rem; }
.policy__wrap { max-width: 760px; margin: 0 auto; }
.policy__head { text-align: center; margin-bottom: 2.5rem; }
.policy__head h1 { font-size: 2.6rem; margin-bottom: .6rem; }
.policy__meta { font-size: .9rem; color: var(--sage); font-style: italic; line-height: 1.7; }
.policy__lead { font-size: 1.12rem; color: var(--text); margin-bottom: 2rem; }
.policy h2 {
  font-size: 1.45rem; margin: 2.2rem 0 .8rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.policy h2:first-of-type { border-top: none; padding-top: 0; }
.policy p { margin-bottom: 1rem; }
.policy ul, .policy ol { margin: 0 0 1rem 1.25rem; }
.policy li { margin-bottom: .5rem; padding-left: .25rem; }
.policy a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 2px; }
.policy strong { color: var(--ink); }
.policy__cta { margin-top: 2.5rem; text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--forest-deep); color: rgba(245,242,235,.82); padding: 3rem 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer__logo { height: 38px; }
.footer__copy { font-size: .8rem; }
.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__links a {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(245,242,235,.82); transition: color .2s;
}
.footer__links a:hover { color: var(--gold-bright); }

/* ---------- Mobile nav toggle ---------- */
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: .4rem; }
.nav__toggle span { width: 24px; height: 2px; background: var(--forest); border-radius: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2,1fr); }
  .pdp__grid, .featured { grid-template-columns: 1fr; gap: 2rem; }
  .values { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 760px) {
  .nav__links { position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--cream);
    flex-direction: column; gap: 0; padding: .5rem 1.5rem 1rem; border-bottom: 1px solid var(--line);
    display: none; }
  .nav__links.open { display: flex; }
  .nav__link { padding: .7rem 0; width: 100%; }
  .nav__toggle { display: flex; }
  .hero h1 { font-size: 2.3rem; }
  .sec-head h2 { font-size: 1.8rem; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}
