/* ===========================================================================
   ELEGANG — shared design system
   Chrome shared by collection.html + workshop.html. Tokens, nav, menu,
   button, reveal motion and footer are lifted verbatim from index.html so
   the three pages read as one hand. index.html keeps its own inline styles.
   =========================================================================== */

:root {
  --bg:        #0a0a0a;                    /* gallery black            */
  --fg:        #f4f1ea;                    /* off-white on dark        */
  --muted:     rgba(244, 241, 234, 0.55);  /* secondary on dark        */
  --cream:     #f3efe6;                    /* atelier cream            */
  --ink:       #161310;                    /* near-black ink on cream  */
  --ink-soft:  rgba(22, 19, 16, 0.62);     /* body copy on cream       */
  --ink-mute:  rgba(22, 19, 16, 0.40);     /* tertiary on cream        */
  --accent:    #c9a25e;                    /* gold                     */
  --gold-ink:  #a07d33;                    /* deeper gold on light     */
  --line-dark: rgba(244, 241, 234, 0.14);
  --line-light:rgba(22, 19, 16, 0.12);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --maxw:      1320px;
  --gutter:    clamp(22px, 5vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
body.theme-dark  { background: var(--bg);    color: var(--fg);  }
body.theme-light { background: var(--cream); color: var(--ink); }

img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: #0a0a0a; }

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

/* page fade-in on load — quiet, single gesture */
body.boot { opacity: 0; }
body.ready { opacity: 1; transition: opacity 0.9s var(--ease); }

/* ---------- Typographic utilities ---------- */
.serif { font-family: 'Cormorant Garamond', serif; font-weight: 300; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: var(--accent);
}
body.theme-light .eyebrow { color: var(--gold-ink); }

/* ---------- Fixed top nav (shared) ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background .5s var(--ease), padding .5s var(--ease),
              border-color .5s var(--ease);
}
.nav .brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-weight: 500;
  white-space: nowrap;
}
.nav .links { display: flex; gap: clamp(18px, 3vw, 40px);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.nav .links a { position: relative; opacity: 0.62; padding-bottom: 5px;
  transition: opacity .35s var(--ease); }
.nav .links a:hover { opacity: 1; }
.nav .links a.active { opacity: 1; }
.nav .links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav .links a.active::after,
.nav .links a:hover::after { transform: scaleX(1); }

/* condensed, faintly backed nav once the page scrolls */
body.theme-dark  .nav.scrolled { background: rgba(10,10,10,0.72);
  border-color: var(--line-dark);  backdrop-filter: blur(10px); }
body.theme-light .nav.scrolled { background: rgba(243,239,230,0.82);
  border-color: var(--line-light); backdrop-filter: blur(10px); }
.nav.scrolled { padding-top: 16px; padding-bottom: 16px; }

/* mobile menu toggle */
.nav-toggle { display: none; font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; opacity: 0.8; }
.nav-toggle:hover { opacity: 1; }

/* full-screen menu overlay (mobile) */
.menu {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s var(--ease);
}
body.theme-dark  .menu { background: rgba(10,10,10,0.97); }
body.theme-light .menu { background: rgba(243,239,230,0.98); }
.menu.open { opacity: 1; visibility: visible; }
.menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 9vw, 56px); font-weight: 300;
  letter-spacing: 0.04em; padding: 10px 0;
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), color .35s;
}
.menu.open a { opacity: 1; transform: none; }
.menu.open a:nth-child(1) { transition-delay: .08s; }
.menu.open a:nth-child(2) { transition-delay: .16s; }
.menu.open a:nth-child(3) { transition-delay: .24s; }
.menu a:hover { color: var(--accent); }
.menu-close { position: absolute; top: 26px; right: var(--gutter);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; opacity: 0.7; }
.menu-close:hover { opacity: 1; }

@media (max-width: 680px) {
  .nav .links { display: none; }
  .nav-toggle { display: inline-block; }
}
/* very small phones: ease the wordmark tracking so brand + Menu never crowd */
@media (max-width: 420px) {
  .nav { padding-top: 20px; padding-bottom: 20px; }
  .nav .brand { font-size: 18px; letter-spacing: 0.3em; text-indent: 0.3em; }
}

/* ---------- Button (from .shop-btn) ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  padding: 20px 56px; border: 1px solid rgba(201,162,94,0.55);
  background: transparent; color: inherit;
  font-size: 13px; letter-spacing: 0.32em; text-indent: 0.32em;
  text-transform: uppercase; overflow: hidden;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent); transform: translateY(101%);
  transition: transform .5s var(--ease); }
.btn:hover { color: #0a0a0a; border-color: var(--accent); }
.btn:hover::before { transform: translateY(0); }
.btn .arrow { transition: transform .5s var(--ease); }
.btn:hover .arrow { transform: translateX(6px); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:disabled:hover { color: inherit; border-color: rgba(201,162,94,0.55); }
.btn:disabled:hover::before { transform: translateY(101%); }

/* ---------- Reveal-on-scroll (from index) ---------- */
.reveal { opacity: 0; transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Footer (shared) ---------- */
.site-footer {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 46px var(--gutter) 54px;
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
}
.site-footer .f-links { display: flex; gap: 26px; }
.site-footer .f-links a { opacity: 0.7; transition: opacity .3s, color .3s; }
.site-footer .f-links a:hover { opacity: 1; color: var(--accent); }
body.theme-dark  .site-footer { background: #0a0a0a; color: var(--muted);
  border-top: 1px solid var(--line-dark); }
body.theme-light .site-footer { background: var(--cream); color: var(--ink-mute);
  border-top: 1px solid var(--line-light); }
@media (max-width: 560px) {
  .site-footer { flex-direction: column; text-align: center; gap: 18px; }
}

/* ---------- Fine film grain (dark pages) ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
