/* House of Joy: shared look.
   Colors and fonts come from the Made for More 2027 brand deck. */

@font-face {
  font-family: 'Greenth';
  src: url('../fonts/greenth.otf') format('opentype');
  font-display: swap;
}

:root {
  /* Brand palette (deck page 3) */
  --mustard: #E6CB18;
  --olive: #5D4F0B;
  --pink: #F668E1;
  --blush: #EFC9E9;
  --red: #FF4C2C;
  --berry: #AB2A45;

  /* Supporting tones */
  --ink: #3A3107;          /* body text on light grounds */
  --olive-deep: #463B06;
  --cream: #FBF4DA;        /* reading surfaces */
  --paper: #FFFBEC;
  --mustard-soft: #F3E27A;
  --blush-soft: #F8E6F4;

  /* Season: which offer the house is dressed for. Overridden by [data-season]. */
  --season-bg: var(--mustard);
  --season-ink: var(--olive);
  --season-accent: var(--red);
  --season-spark: var(--pink);

  /* Type */
  --font-display: 'Greenth', 'Righteous', 'Poppins', sans-serif; /* Righteous fills Greenth's missing numbers and punctuation */
  --font-script: 'Kurale', Georgia, serif;                     /* stand-in for JP Millie June */
  --font-body: 'Poppins', system-ui, sans-serif;

  --radius: 28px;
  --radius-sm: 16px;
  --shadow: 0 1px 0 rgba(93, 79, 11, .08), 0 18px 40px -18px rgba(70, 59, 6, .45);
  --shadow-soft: 0 12px 30px -16px rgba(70, 59, 6, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;

  /* Textures */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.23 0 0 0 0 0.19 0 0 0 0 0.03 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --knit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='16' viewBox='0 0 14 16'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M2.2 1.5 Q4.6 8.5 7 14.5' stroke='rgba(0,0,0,.16)' stroke-width='3.6'/%3E%3Cpath d='M11.8 1.5 Q9.4 8.5 7 14.5' stroke='rgba(0,0,0,.16)' stroke-width='3.6'/%3E%3Cpath d='M2.4 1.8 Q4.4 7.6 6.4 12.8' stroke='rgba(255,255,255,.22)' stroke-width='1.4'/%3E%3Cpath d='M11.6 1.8 Q9.6 7.6 7.6 12.8' stroke='rgba(255,255,255,.14)' stroke-width='1.4'/%3E%3C/g%3E%3C/svg%3E");
}

[data-season='more'] {
  --season-bg: var(--olive);
  --season-ink: var(--blush);
  --season-accent: var(--mustard);
  --season-spark: var(--pink);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; font-weight: 400; }

/* Baseline UI (web-ui-baseline) */
button:not(:disabled),
label[role='button'],
[role='button']:not([aria-disabled='true']) { cursor: pointer; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; border-radius: 6px; }
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea, select { font-size: max(16px, 1rem); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: .92;
}
.script { font-family: var(--font-script); letter-spacing: .005em; }
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .82rem;
  line-height: 1.2;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.6; }

/* ---------- Layout ---------- */
.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
section { position: relative; }

/* Paper grain over any surface */
.grain { position: relative; isolation: isolate; }
.grain::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); opacity: .18; mix-blend-mode: multiply;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: .85em 1.6em;
  border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-body); font-weight: 700; font-size: 1.2rem; line-height: 1.1;
  text-decoration: none; text-align: center;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .22), 0 14px 26px -14px rgba(70, 20, 0, .7);
  transition: transform .25s var(--bounce), box-shadow .25s var(--ease), background .2s;
  position: relative;
}
.btn:hover { transform: translateY(-2px) rotate(-.5deg); box-shadow: 0 5px 0 rgba(0, 0, 0, .22), 0 20px 30px -14px rgba(70, 20, 0, .7); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0, 0, 0, .22); }
.btn .price {
  font-family: var(--font-display); font-weight: 400; font-size: 1.15em; letter-spacing: .02em;
  background: rgba(255, 255, 255, .2); border-radius: 999px; padding: .12em .55em .06em;
}
.btn--olive { --btn-bg: var(--olive); --btn-fg: var(--mustard); }
.btn--berry { --btn-bg: var(--berry); --btn-fg: #fff; }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: currentColor;
  box-shadow: inset 0 0 0 2px currentColor;
}
.btn--ghost:hover { box-shadow: inset 0 0 0 2px currentColor; }
.btn--sm { min-height: 44px; font-size: 1rem; padding: .6em 1.15em; }
.btn--block { width: 100%; }

.link-arrow {
  font-weight: 600; text-decoration: none; display: inline-flex; gap: .4em; align-items: center;
  border-bottom: 2px solid currentColor; padding-bottom: 1px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
/* Hand-stitched edge */
.stitched::after {
  content: ''; position: absolute; inset: 9px; border-radius: calc(var(--radius) - 9px);
  border: 2px dashed currentColor; opacity: .28; pointer-events: none;
}
.chip {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .35em .8em; border-radius: 999px;
  background: rgba(93, 79, 11, .1); color: var(--olive);
}

/* ---------- Stripes (deck pages 5–7) ---------- */
.stripes {
  background-image:
    var(--knit),
    linear-gradient(90deg,
      var(--red) 0 3.5%, var(--olive) 0 11%, var(--blush) 0 14.5%, var(--mustard) 0 18.5%,
      var(--olive) 0 24.5%, var(--pink) 0 30%, var(--red) 0 41%, var(--mustard) 0 45%,
      var(--blush) 0 49.5%, var(--olive) 0 60.5%, var(--red) 0 64.5%, var(--mustard) 0 68.5%,
      var(--pink) 0 78%, var(--red) 0 86.5%, var(--olive) 0 90%, var(--pink) 0 94%, var(--blush) 0 100%);
  background-size: 14px 16px, 100% 100%;
}
.stripes--tight {
  background-image:
    var(--knit),
    repeating-linear-gradient(90deg,
      var(--red) 0 22px, var(--olive) 0 44px, var(--red) 0 66px, var(--olive) 0 88px,
      var(--pink) 0 110px, var(--olive) 0 132px, var(--pink) 0 154px, var(--olive) 0 176px,
      var(--blush) 0 198px, var(--olive) 0 220px);
  background-size: 14px 16px, auto;
}
.stripe-band { height: clamp(46px, 7vw, 84px); }

/* ---------- Starbursts ---------- */
.burst { color: var(--pink); }
.burst--spin { animation: spin 60s linear infinite; }
.burst--spin-rev { animation: spin 80s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay='1'] { transition-delay: .1s; }
.reveal[data-delay='2'] { transition-delay: .2s; }
.reveal[data-delay='3'] { transition-delay: .3s; }
.reveal[data-delay='4'] { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; }
.input {
  width: 100%; min-height: 54px; padding: .8em 1em;
  border-radius: 14px; border: 2px solid rgba(93, 79, 11, .22);
  background: #fff; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 4px rgba(230, 203, 24, .5); }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.6; }

/* ---------- Preview mode (the team's view) ----------
   .ph-tag   "Placeholder" tags: only in preview.
   .ph-only  anything still waiting for real words or photos, or notes about which file to edit:
             only in preview.
   .ph-hide  what members see in its place: hidden in preview.
   Preview is on in local dev and review builds, or with ?preview=1 (see Base.astro). */
html:not(.is-preview) .ph-tag,
html:not(.is-preview) .ph-only { display: none !important; }
html.is-preview .ph-hide { display: none !important; }
