/* =========================================================
   JC Custom — base styles
   Colours, fonts, text sizes, layout, buttons, glass.
   Everything else (header, footer, shop…) builds on this.
   ========================================================= */

/* ---------- 1. Fonts (stored in the theme, no Google request) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-latin-var.woff2") format("woff2");
}

/* ---------- 2. Design tokens ---------- */
:root {
  /* colours */
  --jc-ivory: #FAF7F2;        /* page background */
  --jc-ivory-2: #F1ECE2;      /* soft areas, photo boxes */
  --jc-ivory-3: #F4EFE6;      /* product photo boxes */
  --jc-line: #E3DDD0;         /* lines and borders */
  --jc-green: #1F3A30;        /* buttons, prices, bands */
  --jc-green-2: #2C5243;      /* lighter green for glows */
  --jc-green-tint: #EEF2EC;   /* very light green sections */
  --jc-gold: #B39257;         /* gold lines and details */
  --jc-gold-dark: #8A6D3B;    /* gold for small text (readable) */
  --jc-gold-light: #D9C49A;   /* gold text on black */
  --jc-gold-line: rgba(179, 146, 87, .45);
  --jc-black: #111111;        /* headings, top bar, footer */
  --jc-text: #2B2B2B;         /* normal text */
  --jc-muted: #6E685D;        /* small grey text (passes contrast) */
  --jc-on-dark: #CFC8BA;      /* soft text on black/green */

  /* fonts */
  --jc-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --jc-sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* text sizes: each one grows smoothly from phone to computer.
     clamp(smallest, preferred, largest) — rem keeps the visitor's own phone text setting working. */
  --jc-fs-xs: 0.75rem;                                    /* 12px labels */
  --jc-fs-sm: 0.8125rem;                                  /* 13px small text */
  --jc-fs-base: clamp(0.9375rem, 0.9rem + 0.15vw, 1rem);  /* 15–16px body */
  --jc-fs-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);    /* 17–20px */
  --jc-fs-h4: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);     /* 20–24px */
  --jc-fs-h3: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);   /* 22–28px */
  --jc-fs-h2: clamp(1.875rem, 1.5rem + 1.5vw, 2.625rem);  /* 30–42px section titles */
  --jc-fs-h1: clamp(2.125rem, 1.6rem + 2.4vw, 4rem);      /* 34–64px page titles */
  --jc-fs-product: clamp(1.75rem, 1.45rem + 1.2vw, 2.625rem); /* 28–42px product name */

  /* spacing */
  --jc-gutter: clamp(16px, 3vw, 24px);
  --jc-section: clamp(48px, 6vw, 96px);
  --jc-max: 1280px;

  /* shapes */
  --jc-radius-sm: 12px;
  --jc-radius: 20px;
  --jc-radius-lg: 28px;
  --jc-pill: 999px;

  /* motion */
  --jc-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 3. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--jc-ivory);
  color: var(--jc-text);
  font-family: var(--jc-sans);
  font-size: var(--jc-fs-base);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
img { border-style: none; }
a { color: inherit; text-decoration: none; transition: color .2s var(--jc-ease); }
a:hover { color: var(--jc-gold-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--jc-gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--jc-green); color: var(--jc-ivory); }

/* ---------- 4. Typography ---------- */
h1, h2, h3, h4, .jc-serif {
  font-family: var(--jc-serif);
  font-weight: 400;
  color: var(--jc-black);
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: .005em;
}
h1 { font-size: var(--jc-fs-h1); line-height: 1.04; }
h2 { font-size: var(--jc-fs-h2); }
h3 { font-size: var(--jc-fs-h3); }
h4 { font-size: var(--jc-fs-h4); }
p { margin: 0 0 1em; }
small, .jc-small { font-size: var(--jc-fs-sm); }

/* small gold label above titles: "New in", "Our favourites"… */
.jc-kicker {
  display: block;
  font-family: var(--jc-sans);
  font-size: var(--jc-fs-xs);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--jc-gold-dark);
  margin-bottom: 10px;
}
/* short gold line under titles */
.jc-rule { display: block; width: 48px; height: 1px; background: var(--jc-gold); margin: 14px 0 0; border: 0; }
.jc-center { text-align: center; }
.jc-center .jc-rule { margin-left: auto; margin-right: auto; }

.jc-section-head { margin-bottom: clamp(24px, 3vw, 40px); }
.jc-section-head h2 { margin: 0; }

/* ---------- 5. Layout ---------- */
.jc-container { width: 100%; max-width: var(--jc-max); margin-inline: auto; padding-inline: var(--jc-gutter); }
.jc-section { padding-block: var(--jc-section); }
.jc-band-tint { background: linear-gradient(180deg, var(--jc-green-tint), #E8EEE8); border-block: 1px solid var(--jc-gold-line); }
.jc-band-green {
  background:
    radial-gradient(540px 320px at 8% 0%, rgba(179,146,87,.35), transparent 70%),
    radial-gradient(560px 340px at 92% 100%, rgba(44,82,67,.95), transparent 70%),
    var(--jc-green);
  color: var(--jc-on-dark);
}
.jc-band-black {
  background:
    radial-gradient(700px 360px at 8% 0%, rgba(44,82,67,.85), transparent 70%),
    radial-gradient(600px 340px at 95% 100%, rgba(179,146,87,.28), transparent 70%),
    var(--jc-black);
  color: var(--jc-on-dark);
}
.jc-band-green h1, .jc-band-green h2, .jc-band-green h3,
.jc-band-black h1, .jc-band-black h2, .jc-band-black h3 { color: var(--jc-ivory); }
.jc-band-green .jc-kicker, .jc-band-black .jc-kicker { color: var(--jc-gold-light); }

.jc-grid { display: grid; gap: clamp(12px, 2vw, 24px); }
.jc-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jc-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .jc-grid-4, .jc-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.screen-reader-text, .jc-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto; width: auto; height: auto; margin: 0; padding: 12px 18px; z-index: 100000;
  background: var(--jc-ivory); color: var(--jc-black); top: 8px; left: 8px; border-radius: var(--jc-radius-sm);
}

/* ---------- 6. Buttons ---------- */
.jc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 30px;
  border-radius: var(--jc-pill); border: 1px solid var(--jc-green);
  background: var(--jc-green); color: var(--jc-ivory);
  font-family: var(--jc-sans); font-size: var(--jc-fs-xs); font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; line-height: 1;
  box-shadow: 0 6px 18px rgba(31, 58, 48, .22);
  transition: background .25s var(--jc-ease), color .25s var(--jc-ease), border-color .25s var(--jc-ease), transform .25s var(--jc-ease);
  cursor: pointer; white-space: nowrap;
}
.jc-btn:hover { background: var(--jc-black); border-color: var(--jc-black); color: var(--jc-ivory); }
.jc-btn:active { transform: translateY(1px); }
.jc-btn--outline { background: transparent; color: var(--jc-black); border-color: var(--jc-black); box-shadow: none; }
.jc-btn--outline:hover { background: var(--jc-black); color: var(--jc-ivory); }
.jc-btn--gold { background: var(--jc-gold); border-color: var(--jc-gold); color: var(--jc-black); box-shadow: none; }
.jc-btn--gold:hover { background: var(--jc-gold-light); border-color: var(--jc-gold-light); color: var(--jc-black); }
.jc-btn--glass {
  background: linear-gradient(135deg, rgba(255,255,255,.6), rgba(255,255,255,.25));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--jc-black); border-color: rgba(179,146,87,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.jc-btn--glass:hover { background: var(--jc-gold); border-color: var(--jc-gold); color: #fff; }
.jc-btn--block { width: 100%; }
.jc-btn[disabled], .jc-btn.is-disabled { opacity: .5; pointer-events: none; }

/* text link with gold underline */
.jc-link {
  font-size: var(--jc-fs-xs); letter-spacing: .16em; text-transform: uppercase;
  color: var(--jc-green); border-bottom: 1px solid var(--jc-gold); padding-bottom: 2px;
}
.jc-link:hover { color: var(--jc-gold-dark); }

/* round icon button (arrows, close) */
.jc-icon-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--jc-gold); background: transparent; color: var(--jc-gold-dark);
  transition: background .2s var(--jc-ease), color .2s var(--jc-ease);
}
.jc-icon-btn:hover { background: var(--jc-green); border-color: var(--jc-green); color: var(--jc-ivory); }

/* ---------- 7. Glass (used sparingly — it costs phone power) ---------- */
.jc-glass {
  background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.26));
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 8px 32px rgba(31,58,48,.12), inset 0 1px 0 rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.jc-glass-dark {
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 8px 32px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.25);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
/* phones: lighter blur = smoother scrolling */
@media (max-width: 768px) {
  .jc-glass, .jc-glass-dark { -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%); }
}
/* old browsers without glass support: a soft solid colour instead */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .jc-glass { background: rgba(250, 247, 242, .94); }
  .jc-glass-dark { background: rgba(17, 17, 17, .78); }
}
/* visitors who ask their phone for less transparency */
@media (prefers-reduced-transparency: reduce) {
  .jc-glass { background: var(--jc-ivory); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .jc-glass-dark { background: rgba(17,17,17,.9); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* soft green + gold glow behind glass areas */
.jc-glow {
  background:
    radial-gradient(620px 420px at 12% 30%, rgba(44,82,67,.50), transparent 70%),
    radial-gradient(520px 380px at 88% 18%, rgba(179,146,87,.42), transparent 70%),
    radial-gradient(760px 520px at 60% 105%, rgba(31,58,48,.50), transparent 70%),
    var(--jc-ivory-2);
}

/* ---------- 8. Forms ---------- */
.jc-field, input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 50px; padding: 0 16px;
  border: 1px solid #CFC7B8; border-radius: 14px;
  background: #FFFFFF; color: var(--jc-black);
  font-size: 16px; /* 16px stops iPhones zooming in on tap */
  transition: border-color .2s var(--jc-ease), box-shadow .2s var(--jc-ease);
}
textarea { padding: 12px 16px; min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--jc-green); box-shadow: 0 0 0 3px rgba(31,58,48,.12); }
label { font-size: var(--jc-fs-sm); color: var(--jc-text); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--jc-green); width: 18px; height: 18px; }

/* ---------- 9. Product photo frame (fixes mixed photo shapes) ----------
   Every photo sits inside the same square, fitted — never cropped. */
.jc-photo {
  display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--jc-ivory-3); border: 1px solid rgba(179,146,87,.35); border-radius: var(--jc-radius);
}
.jc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* ---------- 10. Motion: respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 11. Simple text pages (fallback template) ---------- */
.jc-content { max-width: 900px; }
.jc-entry > * + * { margin-top: 1em; }
.jc-entry a { color: var(--jc-green); text-decoration: underline; text-decoration-color: var(--jc-gold); text-underline-offset: 3px; }

/* ---------- 12. Temporary logo: Jewel + italic Cloxet + gold line ending in a diamond ---------- */
.jc-mark { --s: 34px; --ink: var(--jc-black); --accent: var(--jc-green); --gold: var(--jc-gold); display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.jc-mark__row { display: inline-flex; align-items: flex-end; white-space: nowrap; }
.jc-mark__j { font-family: var(--jc-serif); font-weight: 400; font-size: var(--s); letter-spacing: .07em; color: var(--ink); }
.jc-mark__c { height: calc(var(--s) * .82); width: auto; margin-left: calc(var(--s) * .34); margin-bottom: calc(var(--s) * .2); fill: var(--accent); overflow: visible; }
.jc-mark__u { display: flex; align-items: center; gap: calc(var(--s) * .16); margin-top: calc(var(--s) * .1); margin-left: 30%; }
.jc-mark__u i { width: calc(var(--s) * 2.6); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.jc-mark__gem { width: calc(var(--s) * .32); height: auto; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linejoin: round; }
.jc-mark__gem-fill { fill: rgba(179,146,87,.18); stroke: none; }
.jc-band-black .jc-mark, .jc-band-green .jc-mark { --ink: var(--jc-ivory); --accent: var(--jc-gold-light); --gold: var(--jc-gold-light); }
@media (max-width: 900px) { .jc-mark { --s: 26px; } }

/* ---------- 13. Wishlist heart ---------- */
.jc-heart {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid rgba(179,146,87,.35); background: rgba(250,247,242,.88); color: var(--jc-black);
  transition: transform .2s var(--jc-ease), color .2s var(--jc-ease), background .2s var(--jc-ease);
}
.jc-heart:hover { transform: scale(1.06); color: var(--jc-gold-dark); }
.jc-heart.is-on { color: var(--jc-gold); }
.jc-heart.is-on svg { fill: currentColor; }
.jc-heart.is-pop { animation: jc-pop .35s var(--jc-ease); }
@keyframes jc-pop { 50% { transform: scale(1.25); } }
.jc-heart--big { position: static; flex-shrink: 0; width: 46px; height: 46px; margin-top: 4px; }
.jc-icon-link--wish.is-on svg { fill: var(--jc-gold); color: var(--jc-gold-dark); }
@media (max-width: 600px) { .jc-heart:not(.jc-heart--big) { top: 6px; right: 6px; width: 34px; height: 34px; } }

/* ---------- 14. Text pages (help, legal) and 404 ---------- */
.jc-flow { padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(48px, 6vw, 88px); }
.jc-flow__title { font-size: var(--jc-fs-h2); margin: 0; }
.jc-textpage { max-width: 820px; }
.jc-textpage__head { margin-bottom: clamp(24px, 3vw, 36px); }
.jc-textpage__body h2 { font-size: var(--jc-fs-h4); margin: 34px 0 10px; padding-top: 22px; border-top: 1px solid var(--jc-line); }
.jc-textpage__body > h2:first-child, .jc-textpage__body > .wp-block-heading:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.jc-textpage__body p, .jc-textpage__body li { color: var(--jc-text); }
.jc-textpage__body ul, .jc-textpage__body ol { padding-left: 1.2em; }
.jc-textpage__body li { margin-bottom: 8px; }
.jc-textpage__body li::marker { color: var(--jc-gold); }
.jc-textpage__body strong { color: var(--jc-black); font-weight: 500; }
.jc-textpage__help { margin-top: clamp(36px, 5vw, 56px); padding: 24px; border-radius: var(--jc-radius); background: var(--jc-green-tint); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.jc-textpage__help p { margin: 0; font-family: var(--jc-serif); font-size: var(--jc-fs-h4); color: var(--jc-black); }
.jc-404 { max-width: 680px; }
.jc-404 > p { margin: 18px auto 24px; color: var(--jc-muted); }
.jc-404__search { display: flex; gap: 10px; max-width: 520px; margin: 0 auto 22px; }
.jc-404__search input { flex: 1; min-width: 0; }
.jc-404__links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
