/*
 * Execution Space — Shared Design Tokens + Base Styles
 * Import this in every comp: <link rel="stylesheet" href="../_components/es-tokens.css">
 * ─────────────────────────────────────────────────────────────────
 */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,700;1,800;1,900&display=swap');

/* ── Tokens ── */
:root {
  /* Colours */
  --bg:          #FFFFFF;
  --bg-alt:      #2B2B2B;
  --bg-dark:     #1A1A1A;
  --text:        #0A0A0A;
  --text-lt:     #F3F3F3;
  --text-muted:  #7A7A7A;
  --accent:      #FFCD05;
  --off-white:   #F7F6F2;
  --black:       #000000;
  --font:        'Figtree', sans-serif;

  /* Type scale */
  --h0:  clamp(3.25rem, 9vw,   6rem);
  --h1:  clamp(2.5rem,  6vw,   4rem);
  --h2:  clamp(1.875rem,4vw,   3rem);
  --h3:  clamp(1.5rem,  3vw,   2.5rem);
  --h5:  1.5rem;
  --lg:  1.125rem;
  --md:  1rem;
  --sm:  0.875rem;
  --xs:  0.75rem;

  /* Spacing */
  --sy:   clamp(4.5rem, 9vw, 7.5rem);   /* section vertical */
  --maxw: 1280px;                         /* max content width */
  --gut:  clamp(1.25rem, 4vw, 3rem);     /* gutter */

  /* Easing */
  --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --eout:    cubic-bezier(0.16, 1, 0.3, 1);
  --espring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; }
body  {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a        { text-decoration: none; color: inherit; }
ul       { list-style: none; }
button   { border: none; cursor: pointer; font-family: var(--font); background: none; }
img, svg { max-width: 100%; }

/* ── Grain overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 9999;
}

/* ── Layout helpers ── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ── Section label  [  LABEL  ] ── */
.slabel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.75rem;
}
.slabel::before { content: '['; color: var(--accent); font-weight: 800; font-size: var(--xs); }
.slabel::after  { content: ']'; color: var(--accent); font-weight: 800; font-size: var(--xs); }
.slabel span {
  font-size: var(--xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* ── Scroll reveal ── */
.r {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--eout), transform 0.75s var(--eout);
}
.r.in { opacity: 1; transform: none; }
.r.d1 { transition-delay: 0.08s; }
.r.d2 { transition-delay: 0.17s; }
.r.d3 { transition-delay: 0.26s; }
.r.d4 { transition-delay: 0.35s; }

/* ── Page body offset for fixed nav ── */
body { padding-top: 70px; }

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.07); }

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo svg { height: 33px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-links a {
  font-size: var(--sm);
  font-weight: 500;
  color: var(--text);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  inset: auto 0 -3px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Hamburger */
.nav-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-ham span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
  transform-origin: center;
}
.nav-ham.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-ham.open span:nth-child(2) { opacity: 0; }
.nav-ham.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

.nav-drawer {
  display: none;
  position: fixed;
  inset: 70px 0 0;
  background: var(--bg);
  z-index: 199;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  font-size: var(--h3);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-ham   { display: flex; }
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
es-footer footer,
footer {
  background: var(--bg);
  border-top: 1px solid rgba(0,0,0,0.07);
}
.foot-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem var(--gut);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 3rem;
  align-items: start;
}
.foot-logo svg { height: 29px; width: auto; display: block; }
.foot-brand-tag {
  font-size: var(--xs);
  color: var(--text-muted);
  margin-top: .75rem;
  line-height: 1.6;
  max-width: 220px;
}
.foot-col-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(10,10,10,.3);
  margin-bottom: 1rem;
}
.foot-col-links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.foot-col-links a {
  font-size: var(--sm);
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.2s;
}
.foot-col-links a:hover { color: var(--text); }
.foot-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem var(--gut);
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.foot-bar p { font-size: var(--xs); color: var(--text-muted); }
.foot-bar a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.foot-bar a:hover { color: var(--text); }

@media (max-width: 680px) {
  .foot-main { grid-template-columns: 1fr; gap: 2rem; }
  .foot-bar  { flex-direction: column; align-items: flex-start; }
}
