/* ============================================================
   Arthur Torres — Fractional CMO
   Shared design system
   Editorial luxury meets operational precision
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,500;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* color */
  --bg: #0F0F0F;
  --bg-deep: #0A0A0A;
  --surface: #1A1A1A;
  --surface-2: #161616;
  --surface-hi: #202020;
  --amber: #C9A84C;
  --amber-bright: #E0C268;
  --amber-dim: rgba(201, 168, 76, 0.14);
  --amber-line: rgba(201, 168, 76, 0.35);
  --text: #F5F5F5;
  --text-2: #C9C7C2;
  --muted: #8A8A86;
  --muted-2: #6A6A66;
  --border: #2A2A2A;
  --border-2: #222222;

  /* type */
  --display: 'Playfair Display', Georgia, serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 76px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: #111; }

a { color: inherit; text-decoration: none; }

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

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 11vh, 140px); position: relative; }
.section--tight { padding-block: clamp(56px, 8vh, 96px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--amber-line);
}
.eyebrow--plain::before { display: none; }

.muted-caps {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.012em; color: var(--text); }

.h-display {
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.h-section {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.016em;
}
.h-card { font-size: 1.4rem; line-height: 1.15; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: var(--text-2);
  font-weight: 400;
  max-width: 46ch;
}

.mono-note {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.7;
}

.amber { color: var(--amber); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 15px 26px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn--primary {
  background: var(--amber);
  color: #141008;
  border-color: var(--amber);
  box-shadow: 0 0 0 0 rgba(201,168,76,0);
}
.btn--primary:hover {
  background: var(--amber-bright);
  box-shadow: 0 8px 30px -8px rgba(201,168,76,0.5);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--amber-line); color: var(--amber-bright); background: rgba(201,168,76,0.04); }
.btn--block { width: 100%; justify-content: center; }
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(15,15,15,0.72);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--border-2); background: rgba(12,12,12,0.88); }
.nav__inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  white-space: nowrap;
}
.wordmark .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); display: inline-block; transform: translateY(-1px); }
.nav__links { display: flex; align-items: center; gap: 36px; }
.nav__link {
  font-size: 14.5px; font-weight: 500; color: var(--text-2);
  position: relative; transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--amber); transition: width 0.3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link.is-active::after, .nav__link:hover::after { width: 100%; }
.nav__cta { margin-left: 6px; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; transition: 0.3s var(--ease); }

/* mobile menu */
.nav__mobile {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
  background: var(--bg-deep); border-bottom: 1px solid var(--border);
  display: none; flex-direction: column; padding: 18px var(--gutter) 30px;
  gap: 4px;
}
.nav__mobile.is-open { display: flex; }
.nav__mobile a { padding: 14px 0; font-size: 1.15rem; font-weight: 500; border-bottom: 1px solid var(--border-2); }
.nav__mobile .btn { margin-top: 16px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border-2); background: var(--bg-deep); padding: 64px 0 36px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; }
.footer__col h4 { font-family: var(--body); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; margin-bottom: 18px; }
.footer__wordmark { font-family: var(--display); font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.footer__col p, .footer__col a { color: var(--muted); font-size: 14.5px; line-height: 1.9; }
.footer__links { display: flex; flex-direction: column; gap: 9px; }
.footer__links a { transition: color 0.25s var(--ease); width: fit-content; }
.footer__links a:hover { color: var(--amber); }
.footer__social { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); transition: color 0.25s var(--ease); }
.footer__social:hover { color: var(--amber); }
.footer__social svg { width: 18px; height: 18px; }
.footer__bar {
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--border-2);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted-2); flex-wrap: wrap;
}
.footer__bar span { white-space: nowrap; }
.footer__bar .legacy { color: var(--amber); }

/* ---------- card base ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card--hover:hover {
  transform: translateY(-4px);
  border-color: var(--amber-line);
  box-shadow: 0 18px 50px -24px rgba(0,0,0,0.8), 0 0 0 1px rgba(201,168,76,0.08);
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* fallback: if IntersectionObserver never fires (e.g. non-rendered iframe), show everything instantly */
html.reveal-fallback .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- section header block ---------- */
.section-head { max-width: 760px; }
.section-head .eyebrow { margin-bottom: 22px; }
.section-head .h-section { margin-bottom: 18px; }
.section-head .lead { max-width: 64ch; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
}
