/* ============================================================
   The Cozy Nook  -  Warm Artisan design system
   Canvas oat-cream · sage-olive accent · clay reserved for CTAs
   Display: Fraunces (italic) · Body: DM Sans
   ============================================================ */

:root {
  --canvas:   #F7F1E8;  /* warm oat-cream page base */
  --canvas-2: #FBF6EE;  /* lighter cream (cards on dark, hero text) */
  --ink:      #2B2622;  /* soft near-black text */
  --ink-soft: #5A5048;  /* muted body text */
  --sage:     #8A9A5B;  /* single accent: dividers, links, quiet detail */
  --sage-dk:  #6E7C46;  /* sage on hover */
  --clay:     #C9824F;  /* warm CTA  -  primary buttons only, sparingly */
  --clay-dk:  #B36F3D;  /* clay hover */
  --dark:     #8A847D;  /* warm taupe  -  contact/footer/announce band */
  --line:     #E4D9C8;  /* hairline borders on cream */

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: clip; /* stop inner-element sideways scroll (not just html) */
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.06; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* ---------- type scale (Fraunces italic display) ---------- */
.display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-dk);
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, 110px); }
.section-head { max-width: 640px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head h2 { font-style: italic; font-size: clamp(30px, 4.6vw, 48px); }
.section-head p { margin-top: 12px; color: var(--ink-soft); font-size: 17px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--clay); color: var(--canvas-2); }
.btn-primary:hover { background: var(--clay-dk); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--canvas-2); }
.btn-ghost-light { background: transparent; color: var(--canvas-2); border-color: rgba(251,246,238,.5); }
.btn-ghost-light:hover { background: var(--canvas-2); color: var(--dark); border-color: var(--canvas-2); }

/* ---------- image slots (real photos drop into public/images/) ---------- */
.imgslot {
  background: linear-gradient(135deg, #EBE2D2 0%, #DED2BD 100%);
  background-size: cover; background-position: center;
  position: relative; overflow: hidden;
}
.imgslot::after {
  content: attr(data-label);
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-body); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: #A6967C; padding: 12px; text-align: center;
}
.imgslot.filled::after { display: none; }

/* logo <img>s are rendered via the Img component; size them globally so a
   parent's scoped selector can't fail to reach them (Astro scope gotcha) */
.brand-logo { height: 54px; width: auto; object-fit: contain; }
.foot-logo  { width: 116px; height: auto; object-fit: contain; }
.story-logo, .about-logo { width: min(340px, 78%); height: auto; object-fit: contain; margin-inline: auto; }
@media (max-width: 560px) { .brand-logo { height: 44px; } }

/* ---------- image-element layout (GLOBAL) ----------
   These target <img>/<div> rendered by the Img component. A parent component's
   SCOPED selector cannot reach them (Img's conditional render blocks Astro's
   scope-hash forwarding), so the layout for image elements lives here. Gradient
   overrides use .imgslot.<x> (specificity 0,2,0) to beat the .imgslot base. */

/* hero + quote-band full-bleed backgrounds */
.hero-bg, .band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imgslot.hero-bg { background: linear-gradient(135deg,#C9A876 0%,#8C7355 60%,#5E4B38 100%); }
.imgslot.band-bg { background: linear-gradient(135deg,#8E5C52 0%,#5C4038 100%); }

/* product cards (home grid + shop index) */
.card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.imgslot.card-img { aspect-ratio: 4/3; }

/* soap zigzag rows */
.row-img { width: 100%; aspect-ratio: 5/4; object-fit: cover; border-radius: 20px; }
.imgslot.row-img { aspect-ratio: 5/4; border-radius: 20px; }

/* gift block collage */
.gp { width: 100%; border-radius: 16px; object-fit: cover; }
.imgslot.gp { border-radius: 16px; }
.gp-1 { aspect-ratio: 3/4; grid-row: span 2; align-self: stretch; }
.imgslot.gp-1 { height: 100%; min-height: 320px; }
.gp-2, .gp-3 { aspect-ratio: 4/3; }

/* product detail */
.p-img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 20px; }
.imgslot.p-img { aspect-ratio: 4/5; border-radius: 20px; }
.rel-img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; }
.imgslot.rel-img { width: 84px; height: 84px; border-radius: 10px; }

/* full-bleed image band (ImageBand component) */
.ib-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imgslot.ib-bg { background: linear-gradient(135deg,#8C9A6B 0%,#5E6E4A 100%); }

/* about-page countryside strip */
.grass-img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 16px; }
.imgslot.grass-img { aspect-ratio: 3/2; border-radius: 16px; }

/* logo placeholders (shown only until logo.png exists) */
.imgslot.brand-logo { width: 150px; height: 54px; border-radius: 6px; }
.imgslot.foot-logo { width: 116px; height: 56px; border-radius: 6px; }
.imgslot.story-logo, .imgslot.about-logo { aspect-ratio: 1; border-radius: 999px; }

@media (max-width: 820px) { .gp-1 { aspect-ratio: 4/3; grid-row: auto; } .imgslot.gp-1 { min-height: 0; } }

/* ---------- screenshot-safe reveal: transform-only slide-up, never invisible ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { animation: cnRise .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0s); }
  @keyframes cnRise { from { transform: translateY(22px); } to { transform: translateY(0); } }
}

/* ---------- helpers ---------- */
.center { text-align: center; }
.mt-cta { margin-top: clamp(28px, 4vw, 44px); }
