/* Pablo Juwelier — shared styles */
:root {
  --cream: #f3efe6;
  --cream-2: #eae4d6;
  --ink: #1a1a1a;
  --ink-soft: #2a2620;
  --gold: #8a6a3b;
  --gold-2: #a88a5c;
  --champagne: #c9b896;
  --champagne-2: #d9c9a8;
  --line: rgba(26,26,26,0.14);
  --muted: rgba(26,26,26,0.55);
  --grain-strength: 0.12;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.serif { font-family: 'Cormorant Garamond', 'Times New Roman', serif; font-weight: 400; letter-spacing: -0.01em; }
.italic { font-style: italic; }
.ar { font-family: 'Noto Naskh Arabic', 'Amiri', serif; direction: rtl; unicode-bidi: isolate; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.02em; }
.eyebrow { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.rule { height: 1px; background: var(--line); width: 100%; }

/* Grain overlay — lighter, champagne-tinted; uses soft-light so max grain stays luminous */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  opacity: var(--grain-strength);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.62  0 0 0 0 0.55  0 0 0 0 0.42  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: soft-light;
}

/* Shimmer on accent words */
.shim {
  position: relative;
  background: linear-gradient(100deg,
    var(--ink) 0%, var(--ink) 38%,
    var(--gold-2) 48%, #f1e3c0 52%, var(--gold-2) 56%,
    var(--ink) 66%, var(--ink) 100%);
  background-size: 260% 100%;
  background-position: var(--shim-x, 100%) 50%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  transition: background-position 0.35s ease;
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.18s; }
.reveal-delay-3 { transition-delay: 0.28s; }
.reveal-delay-4 { transition-delay: 0.40s; }

/* Letter-by-letter */
.letters span { display: inline-block; opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.letters.in span { opacity: 1; transform: none; }

/* Buttons / links */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 1px solid var(--ink);
  font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; background: transparent;
  cursor: pointer; transition: background .4s ease, color .4s ease;
}
.btn:hover { background: var(--ink); color: var(--cream); }
.btn.gold { border-color: var(--gold); color: var(--gold); }
.btn.gold:hover { background: var(--gold); color: var(--cream); }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.link-arrow:hover { border-bottom-color: var(--ink); }

/* Placeholder imagery — subtly striped */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(138,106,59,0.08) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #e6ddc9, #d9cdb2);
  color: rgba(26,26,26,0.55);
}
.ph::after {
  content: attr(data-label);
  position: absolute; left: 12px; bottom: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(26,26,26,0.45);
}
.ph-dark {
  background:
    repeating-linear-gradient(135deg, rgba(201,184,150,0.08) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #2a2620, #1a1814);
  color: rgba(243,239,230,0.55);
}
.ph-dark::after { color: rgba(243,239,230,0.55); }

/* Parallax stage */
.parallax { will-change: transform; transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }

/* Scroll-linked clip reveal for images */
.clip-reveal { clip-path: inset(var(--clip, 100%) 0 0 0); transition: clip-path 1.4s cubic-bezier(.2,.7,.2,1); }
.clip-reveal.in { clip-path: inset(0 0 0 0); }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(243,239,230,0.88);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.nav .brand { font-family: 'Cormorant Garamond', serif; font-size: 22px; letter-spacing: 0.04em; }
.nav .brand em { font-style: italic; color: var(--gold); }
.nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; }
.nav a:hover { opacity: 1; color: var(--gold); }

/* Magazine rules */
.hair { height: 1px; background: var(--ink); opacity: 0.85; }

/* Marquee */
.marquee { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee-track {
  display: inline-flex; gap: 50px; padding: 22px 0;
  animation: slide 40s linear infinite;
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 28px; color: var(--ink);
}
.marquee-track span { color: var(--gold); font-style: normal; font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; align-self: center; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Tweaks panel */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 10000;
  background: #fff; border: 1px solid var(--line);
  padding: 16px 18px; width: 280px; box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  font-family: 'Inter', sans-serif; font-size: 12px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 { margin: 0 0 12px 0; font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 400; letter-spacing: 0.02em; }
.tweaks label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0; color: var(--muted); }
.tweaks select, .tweaks input[type=text] { font: inherit; padding: 4px 8px; border: 1px solid var(--line); background: var(--cream); width: 150px; }
.tweaks input[type=range] { width: 120px; }
.tweaks .swatches { display: flex; gap: 6px; }
.tweaks .sw { width: 22px; height: 22px; border: 1px solid var(--line); cursor: pointer; }
.tweaks .sw.active { outline: 2px solid var(--ink); outline-offset: 2px; }
