/* MIT Stone storefront themes ----------------------------------------------
   Chosen in Studio → Settings → Storefront theme (themes.py). Each block re-points the
   variables at the top of store.css, then adds that stone's signature details. "classic" has no
   block: it is store.css as written. Textures in static/img/stones/ were rendered from the same
   procedural stone generator used for the brand lookbook.                                      */

/* Staff preview bar */
.theme-preview {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px;
  padding: 8px 16px; background: var(--brand); color: var(--on-brand); font-size: .84rem;
}
.theme-preview a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* Dark stones: logo sits on a light tile, slab outlines turn light */
html[data-stone="nero"] .brand img,
html[data-stone="bluepearl"] .brand img { mix-blend-mode: normal; background: #f5f2ea; border-radius: 6px; padding: 3px; }
html[data-stone="nero"] .site-header,
html[data-stone="bluepearl"] .site-header { border-bottom-color: var(--line); }
html[data-stone="nero"] .slab-svg .outline,
html[data-stone="bluepearl"] .slab-svg .outline { stroke: rgba(255, 255, 255, .2); }
html[data-stone="nero"] .slab-svg .r-ghost,
html[data-stone="bluepearl"] .slab-svg .r-ghost { stroke: rgba(255, 255, 255, .4); }

/* ============================================================== Nero Kintsugi */
html[data-stone="nero"] {
  color-scheme: dark;
  --bg: #0d0d0e; --bg-2: #151517; --surface: #19191c;
  --ink: #eee7d7; --ink-2: #c9c2b2; --muted: #8e887c; --line: #2a2928; --line-2: #3a3834;
  --brand: #c9a557; --brand-ink: #e0c27e; --brand-soft: #262014; --lime: #e0c27e; --bronze: #9c7a3c;
  --danger: #e0705c; --ok: #6fbf8a; --night: #070708; --night-2: #121214;
  --on-ink: #0d0d0e; --on-brand: #17130b; --on-lime: #17130b; --on-night: #eee7d7;
  --highlight: #e0c27e; --highlight-2: #c9a557; --lime-soft: #2a2418; --lime-ink: #e0c27e;
  --display: "Bodoni Moda", Didot, Georgia, serif; --sans: "Jost", Futura, system-ui, sans-serif;
  --head-weight: 400; --head-track: -.01em;
  --radius: 2px; --radius-sm: 2px; --r: .15; --pill: 2px; --btn-case: uppercase; --btn-track: .14em;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .85);
  --stone: url("../img/stones/nero.jpg");
}
html[data-stone="nero"] .btn { font-size: .78rem; font-weight: 500; }
html[data-stone="nero"] .topbar { border-bottom: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
html[data-stone="nero"] .hero h1 em {
  font-style: italic; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(100deg, #b4893a 0%, #f4dfa2 22%, #b4893a 40%, #b4893a 100%);
  background-size: 250% 100%; animation: nero-gilt 7s ease-in-out infinite;
}
@keyframes nero-gilt { 0%, 30% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
html[data-stone="nero"] .footer,
html[data-stone="nero"] .dark { background: linear-gradient(rgba(7, 7, 8, .72), rgba(7, 7, 8, .9)), var(--stone) center / cover; }
html[data-stone="nero"] .material-card .media { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent); }
html[data-stone="nero"] .material-card:hover .media { box-shadow: 0 0 0 1px var(--brand); }
html[data-stone="nero"] .slab-card .price,
html[data-stone="nero"] .viewer-side .price { color: var(--brand-ink); letter-spacing: .04em; }
html[data-stone="nero"] .specs span,
html[data-stone="nero"] .footer h4 { letter-spacing: .24em; }

/* ======================================================== Statuario Cut Sheet */
html[data-stone="statuario"] {
  --bg: #f6f5f2; --bg-2: #ecebe7; --surface: #ffffff;
  --ink: #1a1c21; --ink-2: #3b3f48; --muted: #6a6f79; --line: #dcdcd8; --line-2: #c5c6c4;
  --brand: #1f3fbf; --brand-ink: #18339c; --brand-soft: #e4e9fb; --lime: #d2412a; --bronze: #8a7a62;
  --night: #101736; --night-2: #18224a;
  --on-lime: #ffffff; --on-night: #e9edfb; --highlight: #a9bbff; --highlight-2: #c3cffc;
  --lime-soft: #fbe6e2; --lime-ink: #a8301c;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --dims-font: var(--mono); --eyebrow-font: var(--mono);
  --head-weight: 400; --head-track: -.01em; --h-scale: 1.08;
  --radius: 0px; --radius-sm: 0px; --r: 0; --pill: 0px;
  --grid: rgba(31, 63, 191, .07);
  --stone: url("../img/stones/statuario.jpg");
}
html[data-stone="statuario"] .btn { font-family: var(--mono); font-weight: 500; font-size: .86rem; }
html[data-stone="statuario"] .eyebrow { letter-spacing: .1em; }
html[data-stone="statuario"] .page-hero:not(.image) {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(246, 245, 242, .7), rgba(246, 245, 242, .82)),
    var(--stone) center / cover;
  border-bottom: 1px solid var(--line);
}
html[data-stone="statuario"] .footer,
html[data-stone="statuario"] .dark {
  background:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--night);
}
/* Measurements read like a drawing: a cobalt dimension tick before every size */
html[data-stone="statuario"] .slab-card .dims::before { content: "↔ "; color: var(--brand); font-weight: 500; }
html[data-stone="statuario"] .material-card .media,
html[data-stone="statuario"] .project .media { outline: 1px solid var(--line-2); outline-offset: 4px; }
html[data-stone="statuario"] .slab-svg .r-free { stroke: var(--brand); }
html[data-stone="statuario"] .slab-svg .r-reserved { stroke: var(--lime); }

/* =========================================================== Verde Bath House */
html[data-stone="verde"] {
  --bg: #eef2ec; --bg-2: #e0e8de; --surface: #f9fbf7;
  --ink: #0e2a21; --ink-2: #2a4a3f; --muted: #5b7267; --line: #d0dbd0; --line-2: #b6c6b8;
  --brand: #14463a; --brand-ink: #0f3b30; --brand-soft: #d4e3d8; --lime: #b08442; --bronze: #8a6630;
  --night: #0c241d; --night-2: #12342a;
  --on-lime: #1a1408; --on-night: #e7efe4; --highlight: #e2c48d; --highlight-2: #d3b47a;
  --lime-soft: #f1e6d2; --lime-ink: #6b4f1f;
  --display: "Young Serif", "Iowan Old Style", Georgia, serif; --sans: "Figtree", system-ui, sans-serif;
  --head-weight: 400; --head-track: -.01em; --h-scale: .95;
  --radius: 22px; --radius-sm: 14px; --r: 1.3;
  --stone: url("../img/stones/verde.jpg");
}
html[data-stone="verde"] .hero h1 em { font-style: normal; }
html[data-stone="verde"] .site-header { border-bottom: 1px solid color-mix(in srgb, var(--lime) 55%, transparent); }
/* Arched frames, like a colonnade onto the baths, with a brass hairline */
html[data-stone="verde"] .material-card .media,
html[data-stone="verde"] .project .media {
  border-radius: 999px 999px var(--radius-sm) var(--radius-sm);
  box-shadow: 0 0 0 1px var(--lime), 0 0 0 5px var(--bg), 0 0 0 6px color-mix(in srgb, var(--lime) 45%, transparent);
}
html[data-stone="verde"] .material-card .badges { top: auto; bottom: 12px; }
html[data-stone="verde"] .footer,
html[data-stone="verde"] .dark { background: linear-gradient(rgba(12, 36, 29, .78), rgba(12, 36, 29, .9)), var(--stone) center / cover; }
html[data-stone="verde"] .hero-media::after {
  content: ""; position: absolute; inset: -10%; pointer-events: none;
  background:
    radial-gradient(38% 26% at 25% 80%, rgba(255, 255, 255, .14), transparent 70%),
    radial-gradient(30% 22% at 70% 65%, rgba(255, 255, 255, .1), transparent 70%);
  animation: verde-steam 16s ease-in-out infinite alternate;
}
@keyframes verde-steam { from { transform: translateY(5%); opacity: .5; } to { transform: translateY(-12%); opacity: 1; } }

/* =================================================================== Rosa '86 */
html[data-stone="rosa"] {
  --bg: #f9ede7; --bg-2: #f2ddd3; --surface: #fffaf7;
  --ink: #2a1317; --ink-2: #552f37; --muted: #86656a; --line: #ecd4ca; --line-2: #ddbdb1;
  --brand: #6e1f2a; --brand-ink: #5a1721; --brand-soft: #f4dad6; --lime: #2742ad; --bronze: #d6a03c;
  --night: #2a1317; --night-2: #3a1c22;
  --on-lime: #ffffff; --on-night: #fcefe9; --highlight: #f4b8a6; --highlight-2: #f0c9bb;
  --lime-soft: #e1e6f8; --lime-ink: #1f3690;
  --display: "Gloock", "Iowan Old Style", Georgia, serif; --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --head-weight: 400; --head-track: -.02em; --h-scale: 1.05;
  --radius: 0 40px 0 0; --radius-sm: 0 16px 0 0; --r: .5;
  --stone: url("../img/stones/rosa.jpg");
}
html[data-stone="rosa"] .hero h1 em { font-style: normal; }
/* Eyebrows open with a cobalt disc and an ochre triangle */
html[data-stone="rosa"] .eyebrow::before { width: 11px; height: 11px; border-radius: 50%; background: var(--lime); }
html[data-stone="rosa"] .eyebrow::after {
  content: ""; order: -1; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid var(--bronze);
}
html[data-stone="rosa"] .footer { position: relative; padding-top: 86px; }
html[data-stone="rosa"] .footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px; background: var(--stone) center / cover; }
html[data-stone="rosa"] .material-card .media { border-bottom: 5px solid var(--brand); }
html[data-stone="rosa"] .page-hero:not(.image) { background: linear-gradient(rgba(249, 237, 231, .72), rgba(249, 237, 231, .86)), var(--stone) center / cover; }

/* ======================================================== Blue Pearl Schiller */
html[data-stone="bluepearl"] {
  color-scheme: dark;
  --bg: #0a1019; --bg-2: #0f1824; --surface: #141f2f;
  --ink: #e2e8f0; --ink-2: #b6c2d1; --muted: #7f8da0; --line: #1f2c40; --line-2: #2c3d57;
  --brand: #8cc4f0; --brand-ink: #b2dafa; --brand-soft: #142640; --lime: #9fe3d8; --bronze: #b3a5ef;
  --danger: #f0806e; --ok: #6fd3a0; --night: #060a11; --night-2: #0c131e;
  --on-ink: #0a1019; --on-brand: #08111c; --on-lime: #08111c; --on-night: #dfe7f0;
  --highlight: #9fe3d8; --highlight-2: #8cc4f0; --lime-soft: #12302e; --lime-ink: #9fe3d8;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif; --sans: "Manrope", system-ui, sans-serif;
  --head-weight: 600; --head-track: -.03em; --head-case: uppercase; --h-scale: .68;
  --radius: 10px; --radius-sm: 6px; --r: .6; --pill: 6px; --btn-case: uppercase; --btn-track: .06em;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .85);
  --stone: url("../img/stones/bluepearl.jpg");
}
html[data-stone="bluepearl"] .btn { font-size: .82rem; }
html[data-stone="bluepearl"] .brand strong { font-size: 1rem; }
html[data-stone="bluepearl"] .hero h1 em {
  font-style: normal; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, #8cc4f0, #9fe3d8, #b3a5ef, #8cc4f0);
  background-size: 300% 100%; animation: bp-schiller 9s linear infinite;
}
@keyframes bp-schiller { to { background-position: 300% 0; } }
/* Feldspar flash: a blue-teal-violet sheen sweeps across stone photos on hover */
html[data-stone="bluepearl"] .material-card .media::after,
html[data-stone="bluepearl"] .project .media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, rgba(140, 196, 240, .38) 44%, rgba(159, 227, 216, .32) 51%, rgba(179, 165, 239, .26) 58%, transparent 72%) 130% 0 / 260% 100% no-repeat;
  transition: background-position .9s cubic-bezier(.2, .7, .2, 1);
}
html[data-stone="bluepearl"] .project .media { position: relative; }
html[data-stone="bluepearl"] .material-card:hover .media::after,
html[data-stone="bluepearl"] .project:hover .media::after { background-position: -30% 0; }
html[data-stone="bluepearl"] .footer,
html[data-stone="bluepearl"] .dark { background: linear-gradient(rgba(6, 10, 17, .7), rgba(6, 10, 17, .9)), var(--stone) center / cover; }
html[data-stone="bluepearl"] .slab-card,
html[data-stone="bluepearl"] .stock-panel { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 9%, transparent), transparent 45%), var(--surface); }

/* ================================================================ Quarry Mark */
html[data-stone="kashmir"] {
  --bg: #efece6; --bg-2: #e4e0d7; --surface: #faf8f4;
  --ink: #1a1917; --ink-2: #3c3934; --muted: #6c675e; --line: #d7d2c7; --line-2: #c3bdb1;
  --brand: #8a2430; --brand-ink: #6e1b25; --brand-soft: #f1dede; --lime: #c48a1c; --bronze: #8f7a5a;
  --night: #1a1917; --night-2: #262420;
  --on-lime: #1a1408; --on-night: #efece6; --highlight: #e7b04a; --highlight-2: #d9a441;
  --lime-soft: #f5e7c9; --lime-ink: #6e4a07;
  --display: "Saira Stencil One", "Archivo", Impact, sans-serif; --sans: "Archivo", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace; --dims-font: var(--mono); --eyebrow-font: var(--mono);
  --head-weight: 400; --head-track: .01em; --head-case: uppercase; --h-scale: .92;
  --radius: 3px; --radius-sm: 2px; --r: .25; --pill: 3px; --btn-case: uppercase; --btn-track: .06em;
  --saw: repeating-linear-gradient(112deg, transparent 0 9px, rgba(20, 18, 16, .05) 9px 10px);
  --stone: url("../img/stones/kashmir.jpg");
}
html[data-stone="kashmir"] .hero h1 em { font-style: normal; text-shadow: 0 0 14px rgba(231, 176, 74, .45); }
/* Gang-saw lines over a granite block face */
html[data-stone="kashmir"] .page-hero:not(.image) {
  background: var(--saw), linear-gradient(rgba(239, 236, 230, .8), rgba(239, 236, 230, .88)), var(--stone) center / cover;
  border-bottom: 1px solid var(--line);
}
html[data-stone="kashmir"] .footer,
html[data-stone="kashmir"] .dark { background: repeating-linear-gradient(112deg, transparent 0 9px, rgba(255, 255, 255, .03) 9px 10px), var(--night); }
/* Badges read like spray paint on a quarry block */
html[data-stone="kashmir"] .material-card .badges .chip {
  font-family: "Saira Stencil One", "Archivo", sans-serif; font-weight: 400; font-size: .82rem; letter-spacing: .04em;
  background: rgba(250, 248, 244, .88); color: var(--brand); transform: rotate(-2deg);
  text-shadow: 0 0 1px var(--brand), 0 0 7px rgba(138, 36, 48, .35);
}
html[data-stone="kashmir"] .slab-card .sub { font-family: var(--mono); font-size: .8rem; }

@media (prefers-reduced-motion: reduce) {
  html[data-stone] .hero h1 em, html[data-stone] .hero-media::after { animation: none !important; }
}

/* Mono sizes are wider: keep "116.6 × 189.5 cm" on one line in slab cards */
html[data-stone="statuario"] .slab-card .dims,
html[data-stone="kashmir"] .slab-card .dims { font-size: .86rem; letter-spacing: -.02em; }
