/* ============ denseloaf — gallery-clean design system ============ */
/* Community content intentionally uses the existing gallery palette and type. */
/* Light + dark themes. Dark is the default (html[data-theme="dark"]). */

/* Germania One by John Vargas Beltran; license: assets/fonts/Germania-One-OFL.txt. */
@font-face {
  font-family: "Germania One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/germania-one-latin.woff2") format("woff2");
}

@property --shine-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Gallery palette — warm paper, ink, golden accent (#ffd257) */
  --color-bg: #f8f7f4;
  --color-surface: #fdfcf9;
  --color-surface-offset: #f1efe9;
  --color-divider: #e7e3db;
  --color-border: #dcd7cc;
  --color-text: #211e19;
  --color-text-muted: #6f6a60;
  --color-text-faint: #a9a49a;
  --color-accent: #ffd257;
  --color-accent-hover: #e8bd36;
  --color-accent-soft: #fdf2cf;
  --color-accent-ink: #8a6a10;
  --color-success: #43722a;
  --color-error: #a33d2e;
  --color-on-accent: #211e19;

  --font-display: 'Germania One', 'Georgia', serif;
  --font-body: 'Germania One', 'Georgia', serif;

  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-full: 9999px;
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px rgba(33, 30, 25, 0.06);
  --shadow-md: 0 4px 14px rgba(33, 30, 25, 0.08);
  --shadow-lg: 0 16px 40px rgba(33, 30, 25, 0.14);
  --content: 1180px;
}

html[data-theme="dark"] {
  /* Dark theme — warm near-black, cream text, same golden accent */
  --color-bg: #171410;
  --color-surface: #1e1a14;
  --color-surface-offset: #262118;
  --color-divider: #332d20;
  --color-border: #403a2b;
  --color-text: #f4f1e6;
  --color-text-muted: #b3ac99;
  --color-text-faint: #7d7666;
  --color-accent: #ffd257;
  --color-accent-hover: #ffe07a;
  --color-accent-soft: #3a3216;
  --color-accent-ink: #ffd257;
  --color-success: #8dbb68;
  --color-error: #ff9b8a;
  --color-on-accent: #211e19;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none; text-size-adjust: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
}

img, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 { line-height: 1.12; text-wrap: balance; font-family: var(--font-display); font-weight: 500; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

::selection { background: var(--color-accent-soft); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-accent-ink); outline-offset: 3px; border-radius: var(--radius-sm); }

a, button, input, textarea, select { transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.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; }

[hidden] { display: none !important; }

.skip-link { position: fixed; top: -100px; left: var(--space-4); z-index: 200; background: var(--color-text); color: var(--color-bg); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); }
.skip-link:focus { top: var(--space-2); }

/* ============ Beta environment notice ============ */
.beta-banner { position: sticky; top: 0; z-index: 60; background: var(--color-accent); color: var(--color-on-accent); border-bottom: 1px solid currentColor; font-size: var(--text-xs); line-height: 1.5; }
.header .beta-banner { position: static; }
.beta-banner-inner { max-width: var(--content); margin: 0 auto; padding: var(--space-2) var(--space-6); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-2) var(--space-3); }
.beta-banner-badge { border: 1px solid currentColor; border-radius: var(--radius-sm); padding: 0 var(--space-2); font-weight: 700; letter-spacing: 0.08em; }
.beta-banner a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.beta-banner a:focus-visible { outline-color: currentColor; }
@media (max-width: 600px) {
  .beta-banner-inner { grid-template-columns: auto 1fr; padding-inline: var(--space-4); }
  .beta-banner a { grid-column: 2; justify-self: start; }
}

/* ============ Header ============ */
.header { position: sticky; top: 0; z-index: 60; background: color-mix(in oklab, var(--color-bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-divider); }
.header-inner { max-width: var(--content); margin: 0 auto; padding: var(--space-3) var(--space-6); display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }

.brand { display: flex; align-items: center; gap: var(--space-3); flex: none; text-decoration: none; color: var(--color-text); }
.brand-art { display: block; object-fit: contain; flex: none; }
.brand-mark { width: 32px; height: 38px; }
.brand-name { width: 156px; height: 50px; }
html[data-theme="dark"] .brand-art { filter: invert(1); }

.nav { display: flex; gap: var(--space-1); }
.nav-link { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-muted); padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); position: relative; }
.nav-link:hover { color: var(--color-text); background: var(--color-surface-offset); }
.nav-link[aria-current="page"] { color: var(--color-accent-ink); background: var(--color-accent-soft); }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }

/* ---- Theme toggle (slider) ---- */
.theme-toggle { background: none; border: none; padding: 0; cursor: pointer; flex: none; }
.theme-toggle-track { position: relative; display: inline-flex; align-items: center; justify-content: space-between; width: 52px; height: 28px; border-radius: var(--radius-full); background: var(--color-surface-offset); border: 1px solid var(--color-border); padding: 0 5px; overflow: hidden; }
.theme-icon { width: 12px; height: 12px; flex: none; color: var(--color-text-faint); transition: color var(--transition); position: relative; z-index: 1; }
.theme-toggle-thumb { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: var(--radius-full); background: var(--color-accent); box-shadow: var(--shadow-sm); transition: transform .35s cubic-bezier(0.34, 1.3, 0.5, 1); }
.theme-toggle-thumb::after { content: ""; position: absolute; inset: 4px; border-radius: var(--radius-full); background: var(--color-text); opacity: 0; transition: opacity var(--transition); }
html[data-theme="dark"] .theme-toggle-thumb { transform: translateX(24px); }
html[data-theme="dark"] .theme-toggle-thumb::after { opacity: 1; }
html[data-theme="dark"] .theme-icon-moon { color: var(--color-text); }
html[data-theme="light"] .theme-icon-sun { color: var(--color-text); }
html[data-theme="light"] .theme-toggle-thumb::after { opacity: 1; }
.theme-toggle:hover .theme-toggle-track { border-color: var(--color-text-muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--color-accent-ink); outline-offset: 3px; border-radius: var(--radius-full); }
.cart-btn, .menu-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius-full); color: var(--color-text); border: 1px solid var(--color-border); background: var(--color-surface); }
.cart-btn:hover, .menu-btn:hover { border-color: var(--color-text-muted); }
.cart-btn svg, .menu-btn svg { width: 19px; height: 19px; }
.cart-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; background: var(--color-accent); color: var(--color-text); font-size: var(--text-xs); font-weight: 600; line-height: 19px; text-align: center; border-radius: var(--radius-full); }
.menu-btn { display: none; background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.menu-btn:hover { background: var(--color-accent-hover); border-color: var(--color-accent); }
.menu-btn svg { stroke-width: 2.5; }

/* Mobile menu */
.mobile-menu { position: fixed; inset: 0; z-index: 100; background: var(--color-bg); padding: var(--space-5) var(--space-6); display: flex; flex-direction: column; }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: var(--space-5); border-bottom: 1px solid var(--color-divider); }
.mobile-menu-title { font-family: var(--font-display); font-size: var(--text-lg); }
.menu-close { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-full); }
.menu-close svg { width: 18px; height: 18px; }
.mobile-nav { display: flex; flex-direction: column; padding-top: var(--space-4); }
.mobile-nav-link { text-align: left; font-family: var(--font-display); font-size: var(--text-xl); padding: var(--space-4) var(--space-2); border-bottom: 1px solid var(--color-divider); color: var(--color-text); }
.mobile-nav-link[aria-current="page"] { color: var(--color-accent-ink); }
.mobile-menu-foot { margin-top: auto; padding-top: var(--space-6); color: var(--color-text-muted); font-size: var(--text-sm); }
.mobile-menu-foot span { color: var(--color-text-faint); font-size: var(--text-sm); }

/* ============ Shared ============ */
.eyebrow { font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent-ink); margin-bottom: var(--space-4); }
.section { padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-6); max-width: var(--content); margin: 0 auto; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-8); }
.section-title { font-size: var(--text-xl); }
.view-title { font-size: var(--text-2xl); }
.view-sub { color: var(--color-text-muted); max-width: 56ch; margin-top: var(--space-4); }
.view-head { max-width: var(--content); margin: 0 auto; padding: clamp(var(--space-10), 5vw, var(--space-16)) var(--space-6) var(--space-8); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; padding: var(--space-3) var(--space-6); border-radius: var(--radius-full); text-decoration: none; position: relative; z-index: 0; cursor: pointer; }
/* Animated shine ring around buttons */
.btn::before { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: var(--radius-full); padding: 2px; pointer-events: none; background: conic-gradient(from var(--shine-angle), transparent 0deg 240deg, rgba(255, 210, 87, 0) 255deg, var(--color-accent) 300deg, #fff8d6 330deg, var(--color-accent) 355deg, transparent 360deg); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; animation: btn-shine 6s linear infinite; }
@keyframes btn-shine { to { --shine-angle: 360deg; } }
.btn:hover::before { animation-duration: 1.6s; }
.btn:active { transform: scale(0.97); }
.btn:active::before { animation-duration: 0.9s; }
/* Highlight sweep on hover (background-position keeps the sheen inside the button) */
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 0 30%, rgba(255,255,255,0.45) 47%, rgba(255,255,255,0.75) 50%, rgba(255,255,255,0.45) 53%, transparent 70%); background-size: 250% 100%; background-position: 120% 0; transition: background-position 0.8s cubic-bezier(0.25, 0.8, 0.3, 1); }
.btn:hover::after { background-position: 300% 0; }
.btn:disabled::before { animation: none; opacity: 0.35; }
.btn:disabled::after { display: none; }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); border: 1px solid var(--color-accent); font-weight: 600; }
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.btn-ghost { border: 1px solid var(--color-border); color: var(--color-text); background: var(--color-surface); }
.btn-ghost:hover { border-color: var(--color-text-muted); }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.filter-tabs { display: inline-flex; gap: var(--space-1); padding: var(--space-1); background: var(--color-surface-offset); border-radius: var(--radius-full); flex-wrap: wrap; }
.filter-tab { font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); }
.filter-tab:hover { color: var(--color-text); }
.filter-tab.is-active { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }

/* ============ Hero ============ */
.hero { max-width: var(--content); margin: 0 auto; padding: clamp(var(--space-10), 5vw, var(--space-20)) var(--space-6) var(--space-8); display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(var(--space-8), 4vw, var(--space-16)); align-items: center; }
.hero-title { font-size: var(--text-3xl); font-weight: 500; letter-spacing: -0.01em; margin-bottom: var(--space-5); }
.hero-sub { color: var(--color-text-muted); font-size: var(--text-lg); max-width: 44ch; margin-bottom: var(--space-8); }
.page-intro { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-4); color: var(--color-text-muted); line-height: 1.75; }
.hero-sub.page-intro,.view-sub.page-intro,.commissions-sub.page-intro,.about-intro.page-intro { font-size: var(--text-base); }
.about-intro { margin-bottom: var(--space-6); }
.about-intro p:last-child { margin-bottom: 0; }
.hero-cta { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero-art { position: relative; }
.hero-art img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 1; object-fit: cover; }
.hero-art figcaption { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--color-text-muted); letter-spacing: 0.06em; }

/* ============ Portfolio ============ */
.section-note { font-size: var(--text-xs); color: var(--color-text-faint); margin: 4px 0 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.p-item { border: 0; padding: 0; text-align: left; background: none; }
.p-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); background: var(--color-surface-offset); transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1); }
.p-item:hover img { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.p-item.is-hidden { display: none; }
.p-meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-top: var(--space-3); }
.p-title { font-family: var(--font-display); font-size: var(--text-base); }
.p-cat { font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.08em; text-transform: uppercase; }

/* ============ Shop ============ */
.shop-tools { max-width: var(--content); margin: 0 auto; padding: 0 var(--space-6) var(--space-8); }
.product-grid { max-width: var(--content); margin: 0 auto; padding: 0 var(--space-6) var(--space-16); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.product-card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; transition: box-shadow var(--transition), transform var(--transition); }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-card.is-hidden { display: none; }
.pc-media { position: relative; overflow: hidden; background: var(--color-surface-offset); }
.pc-media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pc-media .pc-tag { position: absolute; top: var(--space-3); left: var(--space-3); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: color-mix(in oklab, var(--color-bg) 85%, transparent); backdrop-filter: blur(6px); color: var(--color-text); padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); }
.pc-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.pc-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.pc-title { font-family: var(--font-display); font-size: var(--text-base); }
.pc-price { font-weight: 600; font-size: var(--text-sm); white-space: nowrap; }
.pc-desc { font-size: var(--text-sm); color: var(--color-text-muted); }
.pc-add { margin-top: auto; padding-top: var(--space-2); align-self: flex-start; font-size: var(--text-sm); font-weight: 500; color: var(--color-accent-ink); padding: var(--space-2) var(--space-4); border: 1px solid var(--color-accent-ink); border-radius: var(--radius-full); background: transparent; }
.pc-add:hover { background: var(--color-accent); color: var(--color-text); border-color: var(--color-accent); }

/* ============ Commissions ============ */
.commissions { max-width: var(--content); margin: 0 auto; padding: clamp(var(--space-10), 5vw, var(--space-16)) var(--space-6) var(--space-16); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-8), 4vw, var(--space-16)); align-items: start; }
.commissions-sub { color: var(--color-text-muted); margin-top: var(--space-4); margin-bottom: var(--space-8); }
.process { list-style: none; display: flex; flex-direction: column; gap: var(--space-6); counter-reset: step; margin-bottom: var(--space-10); }
.process li { display: flex; gap: var(--space-4); }
.process-num { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-accent-ink); flex: none; }
.process h3 { font-size: var(--text-base); margin-bottom: var(--space-1); }
.process p { font-size: var(--text-sm); color: var(--color-text-muted); }
.contact-direct { padding: var(--space-5); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); background: var(--color-surface); }
.contact-direct p { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-1); }
.contact-mail { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-accent); }
.contact-mail--off { font-family: var(--font-body); font-size: var(--text-sm); color: var(--color-text-muted); border-bottom: none; }

.inquiry-form { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-5); }
.form-title { font-size: var(--text-xl); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.field input, .field select, .field textarea { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3); font-size: var(--text-sm); }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-accent-hover); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--color-error); }
.form-error { font-size: var(--text-sm); color: var(--color-error); }
.form-note { font-size: var(--text-xs); color: var(--color-text-faint); text-align: center; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-10) var(--space-4); }
.form-success-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent-ink); display: grid; place-items: center; }
.form-success-icon svg { width: 24px; height: 24px; }
.form-success h3 { font-size: var(--text-lg); }
.form-success p { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ============ About ============ */
.about { max-width: var(--content); margin: 0 auto; padding: clamp(var(--space-10), 5vw, var(--space-16)) var(--space-6) var(--space-16); display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(var(--space-8), 4vw, var(--space-16)); align-items: center; }
.about-art img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 1; object-fit: cover; }
.about-copy p { color: var(--color-text-muted); margin-bottom: var(--space-4); }
.about-copy .view-title { margin-bottom: var(--space-5); }
.about-heading { display: flex; align-items: center; gap: var(--space-5); margin-bottom: var(--space-5); }
.about-heading > div { min-width: 0; }
.about-heading .eyebrow { color: var(--color-accent-ink); margin-bottom: var(--space-2); }
.about-heading .view-title { margin-bottom: 0; }
.about-profile { width: 88px; height: 88px; aspect-ratio: 1; flex: none; border-radius: 50%; object-fit: cover; background: #000; border: 1px solid var(--color-border); }
.about-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--color-divider); }
.about-facts h3 { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-1); }
.about-facts p { font-size: var(--text-sm); margin: 0; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--color-divider); background: var(--color-surface); }
.footer-inner { max-width: var(--content); margin: 0 auto; padding: var(--space-8) var(--space-6); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); }
.footer-brand { display: flex; align-items: center; gap: var(--space-3); }
.footer-nav { display: flex; gap: var(--space-5); }
.footer-nav button { font-size: var(--text-sm); color: var(--color-text-muted); }
.footer-nav button:hover { color: var(--color-text); }
.footer-meta { display: flex; flex-direction: column; gap: var(--space-1); align-items: flex-end; font-size: var(--text-sm); color: var(--color-text-muted); }
.footer-meta a { color: var(--color-text-muted); text-decoration: none; }
.footer-meta a:hover { color: var(--color-accent); }

/* ============ Cart drawer ============ */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(33, 30, 25, 0.4); }
.cart { position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(440px, 100vw); background: var(--color-bg); border-left: 1px solid var(--color-divider); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--color-divider); }
.cart-title { font-size: var(--text-xl); }
.cart-close { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-full); }
.cart-close svg { width: 17px; height: 17px; }
.cart-close:hover { border-color: var(--color-text-muted); }
.cart-body { flex: 1; overflow-y: auto; padding: var(--space-5) var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); }
.cart-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-16) var(--space-4); color: var(--color-text-muted); }
.cart-empty p { font-size: var(--text-sm); }
.cart-item { display: grid; grid-template-columns: 76px 1fr auto; gap: var(--space-4); align-items: center; }
.cart-item img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius-md); background: var(--color-surface-offset); }
.ci-info { display: flex; flex-direction: column; gap: var(--space-1); }
.ci-title { font-family: var(--font-display); font-size: var(--text-base); }
.ci-variant { font-size: var(--text-xs); color: var(--color-text-muted); }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.ci-price { font-weight: 600; font-size: var(--text-sm); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.qty button { width: 30px; height: 30px; display: grid; place-items: center; font-size: var(--text-base); color: var(--color-text-muted); }
.qty button:hover { color: var(--color-text); background: var(--color-surface-offset); }
.qty span { min-width: 26px; text-align: center; font-size: var(--text-sm); font-weight: 500; }
.ci-remove { font-size: var(--text-xs); color: var(--color-text-faint); text-decoration: underline; text-underline-offset: 3px; }
.ci-remove:hover { color: #b3402a; }
.cart-foot { border-top: 1px solid var(--color-divider); padding: var(--space-5) var(--space-6) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.cart-row { display: flex; justify-content: space-between; font-size: var(--text-sm); }
.cart-subtotal { font-weight: 600; font-size: var(--text-base); }
.cart-clear { margin-top: var(--space-2); }
.cart-note { font-size: var(--text-xs); color: var(--color-text-faint); }
.cart-error { font-size: var(--text-sm); color: #b3402a; }

/* ============ Modals ============ */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: var(--space-4); }
.modal-backdrop { position: absolute; inset: 0; background: rgba(33, 30, 25, 0.45); }
.modal-panel { position: relative; background: var(--color-bg); border-radius: var(--radius-xl); max-width: 880px; width: 100%; max-height: calc(100dvh - 2 * var(--space-4)); overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-panel--wide { max-width: 720px; }
.modal-close { position: absolute; top: var(--space-4); right: var(--space-4); z-index: 5; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--color-accent); color: var(--color-accent); border-radius: var(--radius-full); background: #17140d; }
.modal-close svg { width: 22px; height: 22px; stroke-width: 3; }
.image-close,.community-close.image-close { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; padding: 0; border: 1px solid var(--color-accent); border-radius: var(--radius-full); background: #17140d; color: var(--color-accent); }
.image-close svg { width: 22px; height: 22px; stroke-width: 3; }
.modal-close:hover { border-color: var(--color-text-muted); }

.modal-product { display: grid; grid-template-columns: 1fr 1fr; }
.mp-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-xl) 0 0 var(--radius-xl); min-height: 320px; }
/* Theme-aware display copies; uploaded originals remain unmodified. */
img[src$="product-unavailable.webp"] {
  object-fit: contain;
  background: var(--color-bg);
  content: url("assets/img/webp/product-unavailable-light.webp");
}
img[src$="denseloaf-featured-original.webp"] {
  background: var(--color-bg);
  content: url("assets/img/webp/denseloaf-featured-original-light.webp");
}
html[data-theme="dark"] img[src$="product-unavailable.webp"] {
  content: url("assets/img/webp/product-unavailable-dark.webp");
}
html[data-theme="dark"] img[src$="denseloaf-featured-original.webp"] {
  content: url("assets/img/webp/denseloaf-featured-original-dark.webp");
}
.pc-media, .mp-media { background: var(--color-bg); }
.mp-info { padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.mp-eyebrow { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-faint); }
.mp-title { font-size: var(--text-xl); }
.mp-price { font-size: var(--text-lg); font-weight: 600; }
.mp-desc { font-size: var(--text-sm); color: var(--color-text-muted); }
.mp-variants { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.variant-btn { font-size: var(--text-sm); padding: var(--space-2) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); }
.variant-btn:hover { border-color: var(--color-text-muted); }
.variant-btn.is-active { border-color: var(--color-accent-ink); background: var(--color-accent-soft); color: var(--color-accent-ink); font-weight: 600; }

/* Checkout */
.checkout { padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); }
.checkout-title { font-size: var(--text-xl); }
.co-summary { border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); background: var(--color-surface); }
.co-line { display: flex; justify-content: space-between; font-size: var(--text-sm); gap: var(--space-4); }
.co-line span:last-child { white-space: nowrap; }
.co-total { border-top: 1px solid var(--color-divider); padding-top: var(--space-3); font-weight: 600; font-size: var(--text-base); }
.co-shipping { font-size: var(--text-xs); color: var(--color-text-faint); }
.co-demo { font-size: var(--text-xs); color: var(--color-text-muted); background: var(--color-accent-soft); border-radius: var(--radius-md); padding: var(--space-3); }
.co-success { text-align: center; padding: var(--space-10) var(--space-6); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.co-success-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent-ink); display: grid; place-items: center; }
.co-success-icon svg { width: 26px; height: 26px; }
.co-success h3 { font-size: var(--text-xl); }
.co-success p { font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: var(--space-6); }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(24, 22, 18, 0.82); }
.lightbox-panel { position: relative; max-width: min(720px, 92vw); }
.lightbox-panel img { max-height: 78dvh; width: auto; margin: 0 auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.lightbox-panel figcaption { display: flex; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-4); color: #f4f1ea; font-size: var(--text-sm); }
.lightbox-panel figcaption span:last-child { color: rgba(244, 241, 234, 0.65); }

/* Preview note */

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .portfolio-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .commissions, .about { grid-template-columns: 1fr; }
  .modal-product { grid-template-columns: 1fr; }
  .mp-media img { border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}

@media (max-width: 720px) {
  .about-heading { gap: var(--space-4); }
  .about-profile { width: 72px; height: 72px; }
  .header-inner { padding-inline: var(--space-4); gap: var(--space-3); }
  .header .brand { gap: var(--space-2); }
  .header .brand-mark { width: 26px; height: 31px; }
  .header .brand-name { width: 116px; height: 38px; }
  .nav { display: none; }
  .menu-btn { display: grid; }
  .portfolio-grid, .product-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 359px) {
  .header-inner { padding-inline: var(--space-3); gap: var(--space-2); }
  .header .brand-mark { width: 22px; height: 26px; }
  .header .brand-name { width: 96px; height: 31px; }
  .header-actions { gap: var(--space-1); }
}

/* ============ Effects (add-to-cart flash, cart pulse, order confetti) ============ */
.screen-flash { position: fixed; inset: 0; pointer-events: none; z-index: 220; background: radial-gradient(circle at var(--fx, 90%) var(--fy, 40px), rgba(255, 210, 87, 0.34), rgba(255, 210, 87, 0.1) 26%, transparent 62%); animation: screen-flash 0.65s ease-out forwards; }
@keyframes screen-flash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

.cart-btn.pulse::after { content: ""; position: absolute; inset: -3px; border-radius: var(--radius-full); border: 2px solid var(--color-accent); pointer-events: none; animation: cart-pulse 0.65s cubic-bezier(0.2, 0.6, 0.3, 1) forwards; }
@keyframes cart-pulse { 0% { transform: scale(0.7); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.confetti-piece { position: fixed; top: -14px; width: 9px; height: 14px; border-radius: 2px; z-index: 230; pointer-events: none; animation: confetti-fall var(--d, 1.7s) cubic-bezier(0.2, 0.5, 0.4, 1) forwards; }
@keyframes confetti-fall { to { transform: translate3d(var(--dx, 0px), 106vh, 0) rotate(var(--rot, 360deg)); opacity: 0.9; } }

@media (prefers-reduced-motion: reduce) {
  .btn::before { animation: none; }
  .btn::after { transition: none; opacity: 0; }
  .screen-flash, .confetti-piece, .cart-btn.pulse::after { display: none; }
}
