/* Joyceful Grace storefront — "Modernist" redesign (design: Joyceful Grace Home v2).
   Flat, square-cornered, Archivo throughout, strong 2px ink rules and a seven-color stripe.
   Tokens are prefixed --jg-* and classes jg-* so they never collide with the legacy page CSS. */

:root {
  --jg-bg: #f3f2f2;
  --jg-surface: #eae9e9;
  --jg-ink: #2c2760;
  --jg-ink-70: color-mix(in srgb, #2c2760 70%, transparent);
  --jg-ink-78: color-mix(in srgb, #2c2760 78%, transparent);
  --jg-rule: #2c2760;
  --jg-accent: #d9008d;
  --jg-accent-600: #b80078;
  --jg-accent-700: #9a0065;
  --jg-accent-100: #ffe3f4;
  --jg-on-accent: #ffffff;

  /* Stripe palette. --jg-teal-deep carries white text (the bright teal is too light for it). */
  --jg-teal: #25a2a1;
  --jg-teal-deep: #1b7b7a;
  --jg-mint: #63c0b4;
  --jg-lilac: #af9afb;
  --jg-violet: #c755f0;
  --jg-magenta: #ff00aa;
  --jg-coral: #ec6157;
  --jg-yellow: #fcce2e;

  --jg-font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --jg-gutter: clamp(20px, 5vw, 72px);
  --jg-max: 1200px;
}

/* ── Base (homepage only; legacy pages keep their own base via jg-theme.css) ── */
body.jg-page {
  margin: 0;
  background: var(--jg-bg);
  color: var(--jg-ink);
  font-family: var(--jg-font);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
.jg-page *, .jg-page *::before, .jg-page *::after { box-sizing: border-box; }
.jg-page img { display: block; max-width: 100%; }
.jg-page figure { margin: 0; }
.jg-page h1, .jg-page h2, .jg-page h3 { margin: 0; font-family: var(--jg-font); }
.jg-page p { margin: 0; }
.jg-page a { color: var(--jg-ink); text-decoration: none; }
.jg-page a:hover { color: var(--jg-accent-700); }
.jg-page :focus { outline: none; }
.jg-page :focus-visible { outline: 2px solid var(--jg-accent); outline-offset: 2px; }
.jg-page ::selection { background: color-mix(in srgb, var(--jg-accent) 30%, transparent); }
[hidden] { display: none !important; }

.jg-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.jg-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; }
.jg-skip:focus { left: 8px; background: var(--jg-bg); color: var(--jg-ink); padding: 8px 14px; border: 2px solid var(--jg-rule); }

.jg-wrap { max-width: var(--jg-max); margin: 0 auto; padding: 0 var(--jg-gutter); }

/* ── Shared pieces ── */
.jg-kicker {
  display: block; margin: 0 0 14px;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--jg-accent-700);
}
.jg-h2 {
  font-family: var(--jg-font); font-weight: 800;
  font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -0.015em;
}
.jg-lede { font-size: 17px; line-height: 28px; max-width: 46ch; }
.jg-muted { color: var(--jg-ink-70); }
.jg-hr { height: 2px; border: 0; margin: 0; background: var(--jg-rule); }

.jg-btn {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 6px;
  min-height: 44px; padding: 10px 16px;
  font-family: var(--jg-font); font-weight: 800; font-size: 14px; line-height: 1.2;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  color: var(--jg-ink); background: transparent;
  border: 1px solid transparent; border-radius: 0;
}
.jg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.jg-btn--primary, .jg-page a.jg-btn--primary { background: var(--jg-accent); color: var(--jg-on-accent); }
.jg-btn--primary:hover, .jg-page a.jg-btn--primary:hover { background: var(--jg-accent-600); color: var(--jg-on-accent); }
.jg-btn--primary:active { background: var(--jg-accent-700); }
.jg-btn--ghost, .jg-page a.jg-btn--ghost { color: var(--jg-accent-700); padding-inline: 6px; }
.jg-btn--ghost:hover, .jg-page a.jg-btn--ghost:hover { background: color-mix(in srgb, var(--jg-accent) 10%, transparent); color: var(--jg-accent-700); }
.jg-btn--poster, .jg-page a.jg-btn--poster {
  background: var(--jg-yellow); color: var(--jg-ink); border-color: var(--jg-ink);
  box-shadow: 4px 4px 0 var(--jg-ink);
}
.jg-btn--poster:hover, .jg-page a.jg-btn--poster:hover { color: var(--jg-ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--jg-ink); }
.jg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.jg-stripe { display: grid; grid-template-columns: repeat(7, 1fr); height: 6px; }
.jg-stripe span:nth-child(1) { background: var(--jg-teal); }
.jg-stripe span:nth-child(2) { background: var(--jg-mint); }
.jg-stripe span:nth-child(3) { background: var(--jg-lilac); }
.jg-stripe span:nth-child(4) { background: var(--jg-violet); }
.jg-stripe span:nth-child(5) { background: var(--jg-magenta); }
.jg-stripe span:nth-child(6) { background: var(--jg-coral); }
.jg-stripe span:nth-child(7) { background: var(--jg-yellow); }

/* ── Header (partials/header.html, every page) ── */
.jg-chrome { font-family: var(--jg-font); color: var(--jg-ink); background: var(--jg-bg); }
.jg-chrome a { text-decoration: none; }
.jg-salebar { background: var(--jg-ink); color: var(--jg-bg); }
/* The whole bar is one link: message left, call to action right; one centred line on phones. */
.jg-chrome a.jg-salebar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 38px; padding-block: 8px;
  color: var(--jg-bg); text-decoration: none;
  font-size: 13px; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
}
.jg-chrome a.jg-salebar__inner:hover { color: var(--jg-bg); }
.jg-chrome a.jg-salebar__inner:hover .jg-salebar__cta { text-decoration: underline; text-underline-offset: 3px; }
.jg-salebar__msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-salebar__cta { flex: none; white-space: nowrap; color: var(--jg-yellow); }
@media (max-width: 640px) {
  .jg-chrome a.jg-salebar__inner { justify-content: center; gap: 10px; font-size: 11px; letter-spacing: 0.06em; }
  .jg-salebar__msg { flex: 0 1 auto; }
}
@media (max-width: 400px) {
  .jg-salebar__cta { display: none; }
  .jg-salebar__msg::after { content: " \2192"; }
}

.jg-header { border-bottom: 2px solid var(--jg-rule); background: var(--jg-bg); }
.jg-header__inner { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.jg-brand { display: flex; align-items: center; margin-right: auto; flex-shrink: 0; }
.jg-brand img { display: block; height: 64px; width: auto; margin: -8px 0; }
.jg-nav { display: flex; align-items: center; gap: 22px; }
.jg-nav a, .jg-mnav a { color: var(--jg-ink); font-size: 14px; white-space: nowrap; }
.jg-nav a:hover, .jg-nav a[aria-current="page"], .jg-mnav a:hover { color: var(--jg-accent-700); }
.jg-nav a.jg-nav__seasonal, .jg-mnav a.jg-nav__seasonal { color: var(--jg-accent-700); font-weight: 800; }
.jg-header__actions { display: flex; align-items: center; gap: 4px; }
.jg-icon-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; color: var(--jg-ink);
}
.jg-icon-link:hover { color: var(--jg-accent-700); background: color-mix(in srgb, var(--jg-ink) 7%, transparent); }
.jg-icon-link svg { width: 22px; height: 22px; }
.jg-cart__count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--jg-accent); color: var(--jg-on-accent);
  font-size: 11px; font-weight: 800; line-height: 1;
}
.jg-header__shop { margin-left: 8px; }
.jg-mnav { display: none; border-top: 2px solid var(--jg-rule); }
.jg-mnav__track {
  display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
  padding-block: 12px;
}
.jg-mnav__track::-webkit-scrollbar { display: none; }

@media (max-width: 960px) {
  .jg-nav { display: none; }
  .jg-mnav { display: block; }
  .jg-brand img { height: 52px; margin: -4px 0; }
}
@media (max-width: 520px) {
  .jg-header__shop { display: none; }
  .jg-header__inner { gap: 8px; }
}

/* ── Footer (partials/footer.html, every page) ── */
.jg-footer { font-family: var(--jg-font); color: var(--jg-ink); background: var(--jg-bg); border-top: 2px solid var(--jg-rule); }
.jg-footer a { color: var(--jg-ink); text-decoration: none; }
.jg-footer a:hover { color: var(--jg-accent-700); }
.jg-footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 56px); padding-block: 48px 32px;
}
.jg-footer__brand img { display: block; width: 150px; height: auto; margin: -6px 0 10px; }
.jg-footer__tagline { margin: 0; font-size: 15px; line-height: 24px; max-width: 32ch; }
.jg-footer__socials { display: flex; gap: 4px; margin-top: 14px; }
.jg-footer__socials a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--jg-rule); }
.jg-footer__socials a:hover { background: var(--jg-ink); color: var(--jg-bg); }
.jg-footer__socials svg { width: 18px; height: 18px; }
.jg-footer__title {
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--jg-rule);
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.jg-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; line-height: 28px; }
.jg-footer__base {
  display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
  padding-block: 20px 36px; border-top: 2px solid var(--jg-rule);
  font-size: 13px; line-height: 24px; color: var(--jg-ink-70);
}
@media (max-width: 860px) {
  .jg-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jg-footer__brand { grid-column: 1 / -1; }
}

/* ── Homepage ── */
.jg-hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 56px clamp(32px, 5vw, 80px); align-items: end; padding-block: 84px;
}
.jg-hero__title {
  font-weight: 900; font-size: clamp(48px, 7.4vw, 108px); line-height: 0.98;
  letter-spacing: -0.035em; margin: 0 0 0 -0.05em; text-transform: uppercase;
}
.jg-hero__title > span { display: block; }
.jg-joy { display: flex !important; flex-wrap: wrap; align-items: baseline; gap: 0 0.02em; }
.jg-joy__j { color: var(--jg-teal-deep); }
.jg-joy__o { color: var(--jg-violet); }
.jg-joy__y { color: var(--jg-accent); }
.jg-joy__dot { display: inline-block; width: 0.2em; height: 0.2em; margin-left: 0.04em; background: var(--jg-yellow); }
.jg-joy__pre { margin-right: 0.24em; }
.jg-hero__badge {
  display: inline-block !important; margin-top: 14px; padding: 0.04em 0.18em 0.08em;
  background: var(--jg-accent); color: var(--jg-on-accent);
  font-size: 0.5em; letter-spacing: -0.02em;
}
.jg-hero .jg-lede { margin-top: 28px; }
figure.jg-hero__figure {
  position: relative; margin: 0 24px 24px 0; aspect-ratio: 4 / 5;
  border: 2px solid var(--jg-rule); background: var(--jg-surface);
  box-shadow: 24px 24px 0 var(--jg-yellow), 48px 48px 0 var(--jg-magenta);
}
.jg-hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.jg-hero__tag {
  position: absolute; z-index: 2; top: -22px; left: -22px; padding: 10px 14px;
  background: var(--jg-teal-deep); color: #fff; transform: rotate(-4deg);
  font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
/* Desktop: the whole hero fits in one screen under the header (~124px tall). The headline is
   capped by viewport height as well as width, and the photo is sized to the remaining height. */
@media (min-width: 900px) {
  .jg-hero {
    --jg-hero-pad: clamp(24px, 4.5vh, 56px);
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    padding-block: var(--jg-hero-pad);
  }
  .jg-hero__title { font-size: clamp(44px, min(7vw, 9.5vh), 108px); }
  .jg-hero .jg-lede { margin-top: 20px; }
  .jg-hero .jg-actions { margin-top: 22px; }
  figure.jg-hero__figure {
    justify-self: center;
    width: min(100% - 48px, calc((100svh - 124px - 2 * var(--jg-hero-pad) - 60px) * 0.8));
    min-width: 260px;
    margin: 0 48px 48px 0;
  }
}
@media (max-width: 520px) {
  .jg-hero { padding-block: 48px 72px; }
  figure.jg-hero__figure { margin-right: 36px; box-shadow: 14px 14px 0 var(--jg-yellow), 28px 28px 0 var(--jg-magenta); }
  .jg-hero__tag { left: -10px; }
}

.jg-marquee {
  overflow: hidden; background: var(--jg-ink); color: var(--jg-bg);
  border-block: 2px solid var(--jg-rule);
}
.jg-marquee__track {
  display: inline-flex; white-space: nowrap; padding: 20px 0;
  font-weight: 900; font-size: 32px; letter-spacing: -0.02em; text-transform: uppercase;
  animation: jg-marquee 32s linear infinite;
}
.jg-marquee__item { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; }
.jg-marquee__item::before { content: ""; width: 14px; height: 14px; background: var(--jg-swatch, var(--jg-yellow)); }
@keyframes jg-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .jg-marquee__track { animation: none; } }
@media (max-width: 520px) { .jg-marquee__track { font-size: 24px; padding: 14px 0; } }

.jg-section { padding-block: 70px; }
.jg-bundles .jg-h2 { margin-bottom: 42px; }
.jg-bundles__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  border: 2px solid var(--jg-rule);
}
.jg-page a.jg-tile {
  display: flex; flex-direction: column; gap: 14px; min-height: 300px; padding: 28px;
  background: var(--jg-tile-bg); color: var(--jg-tile-ink);
  outline: 1px solid var(--jg-rule); transition: transform 0.15s, box-shadow 0.15s;
}
.jg-page a.jg-tile:hover { color: var(--jg-tile-ink); transform: translate(-6px, -6px); box-shadow: 6px 6px 0 var(--jg-rule); }
.jg-tile--1 { --jg-tile-bg: var(--jg-teal-deep); --jg-tile-ink: #fff; }
.jg-tile--2 { --jg-tile-bg: var(--jg-ink); --jg-tile-ink: #fff; }
.jg-tile--3 { --jg-tile-bg: var(--jg-yellow); --jg-tile-ink: var(--jg-ink); }
.jg-tile__num { font-weight: 900; font-size: 64px; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.jg-tile__title { font-weight: 800; font-size: 28px; line-height: 32px; letter-spacing: -0.015em; }
.jg-tile__copy { font-size: 15.5px; line-height: 26px; max-width: 34ch; }
.jg-tile__foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: auto; padding-top: 14px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.jg-tile__price { font-size: 22px; letter-spacing: -0.01em; text-transform: none; }
.jg-tile__price del { font-size: 15px; font-weight: 600; margin-left: 6px; }

.jg-feature {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 42px clamp(32px, 5vw, 96px); align-items: center; padding-block: 28px 84px;
}
.jg-feature__figure { aspect-ratio: 85 / 110; max-width: 480px; width: 100%; background: var(--jg-surface); }
.jg-feature__figure img { width: 100%; height: 100%; object-fit: cover; }
.jg-feature__title { font-weight: 800; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.06; letter-spacing: -0.015em; }
.jg-feature .jg-lede { margin-top: 14px; }
.jg-specs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 42px 0 0;
  border-block: 2px solid var(--jg-rule);
}
.jg-specs > div { padding: 18px 12px 18px 0; }
.jg-specs dt { order: 2; margin-top: 6px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jg-ink-70); }
.jg-specs dd { margin: 0; font-weight: 800; font-size: 24px; line-height: 28px; }
.jg-specs > div { display: flex; flex-direction: column; }

.jg-head-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 0 0 42px; }
.jg-link-caps { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.jg-page a.jg-link-caps { color: var(--jg-accent-700); }
.jg-products {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 42px 28px;
}
@media (max-width: 520px) { .jg-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; } }
.jg-product { display: flex; flex-direction: column; }
.jg-product__media { aspect-ratio: 85 / 110; background: #fff; overflow: hidden; }
.jg-product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.jg-product:hover .jg-product__media img { transform: scale(1.03); }
.jg-product__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--jg-rule);
}
.jg-product__title { font-weight: 800; font-size: 17px; line-height: 22px; }
.jg-product__price { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jg-product__price del { display: block; font-size: 13px; color: var(--jg-ink-70); text-align: right; }
.jg-product__meta { margin-top: 6px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jg-ink-70); }

.jg-collections { padding-block: 70px 56px; }
.jg-collections__list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--jg-rule); }
.jg-page a.jg-collection {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: baseline;
  gap: 16px clamp(16px, 3vw, 48px); padding: 32px 28px;
  border-bottom: 2px solid var(--jg-rule); background: var(--jg-bg); color: var(--jg-ink);
  transition: background 0.2s, padding 0.2s;
}
.jg-page a.jg-collection:hover { background: var(--jg-row); color: var(--jg-ink); padding-left: 44px; }
.jg-collection__num { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.jg-collection__num::before { content: ""; width: 10px; height: 10px; background: var(--jg-row); }
.jg-collection__title { font-weight: 900; font-size: clamp(36px, 6vw, 84px); line-height: 1; letter-spacing: -0.035em; text-transform: uppercase; }
.jg-collection__count { display: block; margin-top: 8px; font-size: 13px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jg-ink-70); }
.jg-collection__arrow { font-size: 24px; }
@media (max-width: 520px) { .jg-page a.jg-collection { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 24px 8px; } }

.jg-contact {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 42px clamp(32px, 5vw, 96px); padding-block: 56px 84px;
}
.jg-contact .jg-lede { margin-top: 14px; max-width: 40ch; color: var(--jg-ink-78); }
.jg-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.jg-field--wide, .jg-form__actions { grid-column: 1 / -1; }
.jg-field label { display: block; margin-bottom: 5px; font-size: 12px; color: var(--jg-ink-70); }
.jg-input {
  width: 100%; min-height: 44px; padding: 8px 10px;
  font: inherit; font-size: 15px; color: var(--jg-ink); caret-color: var(--jg-accent);
  background: var(--jg-surface); border: 1px solid var(--jg-ink-70); border-radius: 0;
}
.jg-input:hover { border-color: var(--jg-ink); }
.jg-input:focus-visible { border-color: var(--jg-accent); outline-offset: 0; }
textarea.jg-input { min-height: 110px; resize: vertical; }
.jg-form__status { font-size: 14px; }

.jg-poster { background: var(--jg-accent); color: var(--jg-on-accent); }
.jg-poster__inner { padding-block: 84px; }
.jg-poster__title {
  font-weight: 900; font-size: clamp(44px, 8vw, 120px); line-height: 0.96;
  letter-spacing: -0.04em; margin: 0 0 0 -0.05em; text-transform: uppercase;
}
.jg-poster__title span { display: block; }
.jg-poster__title .jg-poster__pop { color: var(--jg-yellow); text-shadow: 6px 6px 0 var(--jg-ink); }
.jg-poster .jg-actions { margin-top: 42px; }

.jg-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px; background: var(--jg-ink); color: var(--jg-bg); border: 2px solid var(--jg-rule);
  font-size: 14px; font-weight: 600; box-shadow: 4px 4px 0 var(--jg-accent);
}
