/* SocialGuy design kit — shared craft layer.
   Art direction stays per-site (tokens + layout); this file only carries the
   parts that are identical in quality, not in look: type scale helpers,
   hairline rules, eyebrows, grain, reveal/marquee/menu mechanics, buttons.

   Usage: set the custom properties per site, then compose sections. */

:root {
  /* per-site overrides go here — these are fallbacks only */
  --ink: #14120f;
  --paper: #f6f1e7;
  --accent: #b0854a;
  --muted: #7d7568;
  --rule: color-mix(in srgb, var(--ink) 18%, transparent);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-3: clamp(2.2rem, 1.7rem + 2.4vw, 3.6rem);
  --step-4: clamp(3rem, 2rem + 5vw, 6.5rem);
  --gutter: clamp(1.1rem, 4vw, 4.5rem);
  --maxw: 78rem;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }

/* ---------- layout ---------- */
.wrap { width: min(100% - var(--gutter) * 2, var(--maxw)); margin-inline: auto; }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(.8rem, 1.6vw, 1.6rem); }
.section { padding-block: clamp(3.5rem, 8vw, 8rem); position: relative; }
.section--tight { padding-block: clamp(2.2rem, 4vw, 3.5rem); }
.col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }
@media (max-width: 760px) {
  .grid12 > * { grid-column: 1 / -1 !important; }
}

/* ---------- type ---------- */
.display {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: .95;
  letter-spacing: -.025em;
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
.display em { font-style: italic; }
.h2 { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.02; letter-spacing: -.02em; margin: 0; font-weight: 400; }
.h3 { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1; margin: 0; font-weight: 400; }
.lead { font-size: var(--step-1); line-height: 1.5; max-width: 46ch; }
.small { font-size: var(--step--1); }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500; color: var(--muted); margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: ""; width: 2.2rem; height: 1px; background: currentColor; opacity: .6;
}
.index { font-variant-numeric: tabular-nums; opacity: .45; margin-right: .5em; }

/* ---------- rules & surfaces ---------- */
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.band { background: var(--ink); color: var(--paper); }
.band .muted { color: color-mix(in srgb, var(--paper) 62%, transparent); }
.band .rule { border-color: color-mix(in srgb, var(--paper) 22%, transparent); }
.tint { background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }

/* grain overlay — subtle, sits above everything, never blocks input */
.grain::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60;
  opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  --btn-ink: var(--paper); --btn-bg: var(--ink);
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.5em; min-height: 46px; border: 1px solid var(--btn-bg);
  background: transparent; color: var(--btn-bg); font: inherit; font-size: var(--step--1);
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; overflow: hidden; isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--btn-bg);
  transform: translateY(101%); transition: transform .45s var(--ease); z-index: -1;
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--btn-ink); }
.btn--solid { background: var(--btn-bg); color: var(--btn-ink); }
.btn--solid::before { background: var(--accent); }
.btn--solid:hover { color: var(--ink); }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-group] > * { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal-group].is-in > * { opacity: 1; transform: none; }
[data-reveal-group].is-in > *:nth-child(2) { transition-delay: .08s; }
[data-reveal-group].is-in > *:nth-child(3) { transition-delay: .16s; }
[data-reveal-group].is-in > *:nth-child(4) { transition-delay: .24s; }
[data-reveal-group].is-in > *:nth-child(5) { transition-delay: .32s; }
[data-reveal-group].is-in > *:nth-child(6) { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], [data-reveal-group] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn::before { display: none; }
  .marquee__track { animation: none !important; }
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--rule); }
.marquee__track { display: flex; gap: 2.5rem; width: max-content; padding-block: .9rem; animation: slide 32s linear infinite; }
.marquee span { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sticky mobile CTA ---------- */
.mobile-cta { display: none; }
@media (max-width: 720px) {
  .mobile-cta {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 70;
    background: var(--ink); color: var(--paper);
    padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom));
    gap: .5rem;
  }
  .mobile-cta a {
    flex: 1; display: grid; place-items: center; min-height: 46px;
    border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
    font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  }
  .mobile-cta a:first-child { background: var(--accent); color: var(--ink); border-color: var(--accent); }
  body { padding-bottom: 4.6rem; }
}

/* ---------- full-screen menu ---------- */
.burger {
  width: 46px; height: 46px; display: inline-grid; place-items: center; gap: 5px;
  background: none; border: 1px solid var(--rule); cursor: pointer; padding: 0;
}
.burger span { display: block; width: 20px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
body.menu-open .burger span:first-child { transform: translateY(3.2px) rotate(45deg); }
body.menu-open .burger span:last-child { transform: translateY(-3.2px) rotate(-45deg); }
.menu-panel {
  position: fixed; inset: 0; z-index: 80; background: var(--paper);
  display: grid; align-content: center; gap: 1rem; padding: var(--gutter);
  clip-path: inset(0 0 100% 0); transition: clip-path .5s var(--ease);
}
body.menu-open .menu-panel { clip-path: inset(0 0 0 0); }
.menu-panel a { font-family: var(--font-display); font-size: clamp(1.8rem, 7vw, 3rem); text-decoration: none; line-height: 1.1; }
body.menu-open { overflow: hidden; }

/* ---------- utility ---------- */
.stack > * + * { margin-top: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; }
.frame { position: relative; overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.caption { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
