/* ==========================================================================
   Salman — shared styles
   Colours are tokens on :root; dark mode redefines them via [data-theme].
   ========================================================================== */

:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-2: #f2ebe0;
  --text: #1d1915;
  --muted: #6b6157;
  --border: #e5dccf;
  --accent: #b5502a;
  --accent-hover: #9a4122;
  --accent-ink: #ffffff;
  --gold: #b9862a;

  --ng: #2e7d4f;
  --zw: #b9862a;
  --ug: #c0392b;

  --shadow: 0 1px 2px rgba(40, 25, 10, .06), 0 8px 24px rgba(40, 25, 10, .06);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1160px;
  --gutter: 16px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110e;
    --surface: #1d1915;
    --surface-2: #26211c;
    --text: #f3ece2;
    --muted: #a89c8e;
    --border: #3a322a;
    --accent: #e07a4f;
    --accent-hover: #ec916a;
    --accent-ink: #1a0f08;
    --gold: #e0b45a;
    --ng: #5cbf87;
    --zw: #e0b45a;
    --ug: #ec6a5a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #14110e;
  --surface: #1d1915;
  --surface-2: #26211c;
  --text: #f3ece2;
  --muted: #a89c8e;
  --border: #3a322a;
  --accent: #e07a4f;
  --accent-hover: #ec916a;
  --accent-ink: #1a0f08;
  --gold: #e0b45a;
  --ng: #5cbf87;
  --zw: #e0b45a;
  --ug: #ec6a5a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color .25s ease, color .25s ease;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 104px 0; } }

.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { color: var(--muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: none; color: var(--accent);
}
.arrow-link::after { content: "→"; transition: transform .2s; }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 68px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: center;
}
.logo img {
  width: 40px; height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 0 0 2px var(--accent);
}
.logo span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.header-tools { display: flex; align-items: center; gap: 8px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
}
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: .8rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.menu-toggle { display: none; }

@media (max-width: 760px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* ---------- Hero ---------- */

.hero { padding: 56px 0 72px; overflow: hidden; }
@media (min-width: 900px) { .hero { padding: 88px 0 112px; } }

.hero-grid {
  display: grid; gap: 48px; align-items: center;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }

.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero .lead { margin-bottom: 32px; }

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}
.hero-art .disc {
  position: absolute; inset: 6%;
  border-radius: 50%;
  background: var(--surface-2);
}
.hero-art .disc::before {
  content: ""; position: absolute; inset: -6%;
  border-radius: 50%;
  border: 1px dashed var(--border);
}
.hero-art .shoe-art {
  position: absolute; left: 4%; right: 4%; top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  filter: drop-shadow(0 24px 24px rgba(40, 25, 10, .18));
  transition: opacity .6s ease;
}

/* 3D sandal (Three.js canvas). Hidden until it renders, then the 2D drawing fades out. */
.hero-art .shoe-3d {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  cursor: grab;
}
.hero-art .shoe-3d:active { cursor: grabbing; }
.hero-art .shoe-3d canvas { display: block; width: 100%; height: 100%; }
.hero-art.is-3d .shoe-3d { opacity: 1; }
.hero-art.is-3d .shoe-fallback { opacity: 0; pointer-events: none; }

.hero-art .drag-hint { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.hero-art.is-3d .drag-hint { opacity: 1; }
.hero-art.is-3d.interacted .drag-hint { opacity: 0; }

.hero-art .drag-hint {
  position: absolute; top: 5%; left: 50%; transform: translateX(-50%);
  color: var(--muted);
}
.hero-art .drag-hint svg { width: 14px; height: 14px; }
.hero-art .flags {
  position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem; font-weight: 600;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-ng { background: var(--ng); }
.dot-zw { background: var(--zw); }
.dot-ug { background: var(--ug); }

/* ---------- Category tiles ---------- */

.cat-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }

.cat-tile {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-tile .tile-art {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  padding: 24px;
  background: var(--surface-2);
}
.cat-tile .tile-art::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: var(--cat-color);
}
.cat-tile .tile-body { padding: 22px 22px 26px; }
.cat-tile p { color: var(--muted); }

.cat-ng { --cat-color: var(--ng); }
.cat-zw { --cat-color: var(--zw); }
.cat-ug { --cat-color: var(--ug); }

/* ---------- Values ---------- */

.values { background: var(--surface-2); }
.values-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
.value .icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--accent);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.value .icon svg { width: 22px; height: 22px; }
.value p { color: var(--muted); margin: 0; }

/* ---------- Founder teaser ---------- */

.founder-teaser {
  display: grid; gap: 40px; align-items: center;
}
@media (min-width: 860px) { .founder-teaser { grid-template-columns: 340px 1fr; gap: 64px; } }

blockquote {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  line-height: 1.25;
  font-style: italic;
  font-weight: 400;
}
.attribution { color: var(--muted); font-weight: 600; margin-bottom: 24px; }

/* Monogram portrait (placeholder until a real photo is added) */
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.portrait .stripes {
  position: absolute; left: 0; right: 0; top: 0;
  height: 18px;
  background: linear-gradient(to bottom,
    #1d1915 0 33.3%, #f2c230 33.3% 66.6%, #c0392b 66.6% 100%);
}
.portrait .monogram {
  font-family: var(--font-display);
  font-size: 9rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}
.portrait .caption {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; flex-wrap: wrap;
  font-size: .85rem; font-weight: 600;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.portrait .caption span {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

/* ---------- Page header (inner pages) ---------- */

.page-head { padding: 56px 0 24px; }
@media (min-width: 900px) { .page-head { padding: 88px 0 32px; } }

/* ---------- Catalog ---------- */

.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 8px 0 40px;
}
.filter-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.filter-btn:hover { border-color: var(--text); }
.filter-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.collection { margin-bottom: 72px; scroll-margin-top: 96px; }
.collection[hidden] { display: none; }

.collection-head {
  display: grid; gap: 8px;
  padding-bottom: 20px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 860px) {
  .collection-head { grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: end; }
}
.collection-head h2 { margin: 0; display: flex; align-items: center; gap: 14px; }
.collection-head h2 .bar { width: 6px; height: 1em; border-radius: 3px; background: var(--cat-color); }
.collection-head p { margin: 0; color: var(--muted); }

.product-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }

.product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-art {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  display: grid; place-items: center;
  padding: 28px;
  position: relative;
}
.product-art .tag {
  position: absolute; top: 14px; left: 14px;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted);
}
.product-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.product-body p { color: var(--muted); font-size: .94rem; flex: 1; }
.product-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.price { font-weight: 700; font-size: 1.05rem; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }

.shoe-art svg { width: 100%; height: auto; overflow: visible; }

/* ---------- About ---------- */

.about-hero { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .about-hero { grid-template-columns: 1.2fr 1fr; gap: 64px; } }

.meta-list { display: flex; flex-wrap: wrap; gap: 24px 40px; margin: 28px 0 0; padding: 0; list-style: none; }
.meta-list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.meta-list dd { margin: 4px 0 0; font-weight: 600; }

.story { display: grid; gap: 40px; }
@media (min-width: 860px) { .story { grid-template-columns: 1fr 1.6fr; gap: 64px; } }
.story-body p { font-size: 1.08rem; }

.pull-quote {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 48px 28px;
  text-align: center;
}
.pull-quote blockquote { max-width: 30ch; margin: 0 auto 16px; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .timeline { grid-template-columns: repeat(4, 1fr); } }
.timeline li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.timeline .step {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--accent); line-height: 1; margin-bottom: 14px; display: block;
}
.timeline p { color: var(--muted); margin: 0; font-size: .95rem; }

.cta-band {
  background: var(--text); color: var(--bg);
  border-radius: var(--radius);
  padding: 44px 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
}
.cta-band h2 { margin: 0; max-width: 22ch; }
.cta-band .btn-primary { background: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  font-size: .92rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
}
.footer-inner nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--text); }
.footer-badge { display: inline-block; margin-bottom: 10px; }
.footer-badge img { width: 96px; height: 96px; }

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