/* =========================================================
   Tomorrow Institute — Microsite
   Style: cinematic / kinetic agency aesthetic (48fps)
   ========================================================= */

:root {
  --bg: #0a0a0c;
  --bg-alt: #101013;
  --fg: #f5f4f2;
  --fg-dim: #a8a7ad;
  --fg-faint: #6f6e75;
  --accent: #f0155b;
  --accent-dim: #7a0b30;
  --line: rgba(245, 244, 242, 0.12);
  --line-soft: rgba(245, 244, 242, 0.06);

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --wrap: min(1240px, 92vw);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75em 1.25em;
  z-index: 999;
}
.skip-link:focus { left: 1em; top: 1em; }

/* ---------- grain ---------- */
.grain {
  position: fixed;
  inset: -100px;
  z-index: 500;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(4) infinite;
}
@keyframes grain {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-2%,2%); }
  50%  { transform: translate(2%,-2%); }
  75%  { transform: translate(-1%,-1%); }
  100% { transform: translate(0,0); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* ---------- custom cursor ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1px solid rgba(245,244,242,0.4);
  pointer-events: none;
  z-index: 600;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
  mix-blend-mode: difference;
  display: none;
}
.cursor__dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: var(--fg);
  transform: translate(-50%, -50%);
}
.cursor.is-active {
  width: 56px; height: 56px;
  background: var(--accent);
  border-color: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
}

/* ---------- header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 400;
  padding-block: 22px;
  transition: padding 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  padding-block: 14px;
  background: rgba(10,10,12,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line-soft);
}
.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.logo__mark {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  flex: none;
}
.logo__mark svg { width: 60%; height: 60%; }
.logo__word em { font-style: normal; color: var(--fg-dim); font-weight: 400; }

.nav {
  display: flex;
  gap: clamp(18px, 2.4vw, 34px);
}
.nav a {
  position: relative;
  font-size: 0.92rem;
  color: var(--fg-dim);
  padding-block: 4px;
  transition: color 0.25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after { right: 0; }

.header__actions { display: flex; align-items: center; gap: 14px; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  padding: 4px;
}
.burger span {
  display: block;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- mobile nav ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 350;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 100px 7vw 40px;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav nav { display: flex; flex-direction: column; gap: 10px; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.mobile-nav__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  color: var(--fg-dim);
  font-size: 0.9rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
}
.mobile-nav__foot a { color: var(--accent); word-break: break-word; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.9em 1.6em;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #ff2d70; }
.btn--outline { border: 1px solid var(--line); color: var(--fg); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost { color: var(--fg-dim); }
.btn--ghost:hover { color: var(--fg); }
.btn--ghost svg { transition: transform 0.3s var(--ease); }
.btn--ghost:hover svg { transform: translateX(3px); }
.btn--sm { padding: 0.65em 1.3em; font-size: 0.85rem; }
.btn--lg { padding: 1.05em 2.1em; font-size: 1rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 90px;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 1200px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(240,21,91,0.28), rgba(240,21,91,0) 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  font-weight: 500;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7.4vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}
.hero__title span { display: block; overflow: hidden; }
.hero__title em { font-style: normal; color: var(--accent); }

.hero__foot {
  margin-top: 46px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.hero__lead {
  max-width: 34ch;
  color: var(--fg-dim);
  font-size: 1.08rem;
  line-height: 1.55;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  z-index: 1;
}
.scroll-cue span {
  width: 1px; height: 26px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollcue 1.8s var(--ease) infinite;
}
@keyframes scrollcue {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  padding-block: 22px;
  background: var(--bg-alt);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 0.6em;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  font-weight: 500;
  color: var(--fg-dim);
  white-space: nowrap;
  animation: marquee 26s linear infinite;
}
.marquee__track i { color: var(--accent); font-style: normal; margin-inline: 0.4em; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .marquee__track { animation-duration: 60s; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(80px, 12vw, 150px); }
.section--dark { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }
.section--pillars { padding-top: 0; }

.kicker {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 18px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 20px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 2.1fr;
  gap: 60px;
}
.statement {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 28px;
  max-width: 22ch;
}
.body-text {
  color: var(--fg-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 58ch;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.tag-list li {
  border: 1px solid var(--line);
  padding: 0.5em 1.1em;
  font-size: 0.85rem;
  color: var(--fg-dim);
}

/* ---------- pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.pillar {
  padding: clamp(30px, 3vw, 46px);
  border-right: 1px solid var(--line-soft);
  transition: background 0.4s var(--ease);
}
.pillar:last-child { border-right: none; }
.pillar:hover { background: var(--bg-alt); }
.pillar__top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}
.pillar__num {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}
.pillar__tag {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.pillar__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 16px;
}
.pillar__text {
  color: var(--fg-dim);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 28px;
}
.pillar__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  width: 100%;
}
.pillar__link svg { transition: transform 0.3s var(--ease); color: var(--accent); }
.pillar__link:hover svg { transform: translate(2px, -2px); }

/* ---------- process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 50px;
}
.process__step { border-top: 1px solid var(--line); padding-top: 24px; }
.process__num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.process__step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.process__step p { color: var(--fg-dim); font-size: 0.96rem; line-height: 1.6; }

/* ---------- themes ---------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  margin-top: 46px;
}
.theme-card {
  background: var(--bg-alt);
  padding: 34px 28px;
  min-height: 130px;
  display: flex;
  align-items: flex-end;
  transition: background 0.35s var(--ease);
}
.theme-card:hover { background: rgba(240,21,91,0.08); }
.theme-card span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- cta banner ---------- */
.cta {
  padding-block: clamp(90px, 14vw, 160px);
  text-align: center;
  position: relative;
  background:
    radial-gradient(60% 120% at 50% 100%, rgba(240,21,91,0.18), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.cta h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.cta em { font-style: normal; color: var(--accent); }

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}
.contact__list { margin-top: 36px; display: flex; flex-direction: column; gap: 18px; }
.contact__list dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  margin-bottom: 4px;
}
.contact__list dd { font-size: 1.05rem; }
.contact__list a { border-bottom: 1px solid var(--line); transition: border-color 0.25s var(--ease), color 0.25s var(--ease); }
.contact__list a:hover { color: var(--accent); border-color: var(--accent); }

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.85rem; color: var(--fg-dim); }
.field input, .field textarea, .field select {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 0.85em 1em;
  color: var(--fg);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  background: #131316;
}
.field textarea { resize: vertical; }
.contact__form .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- footer ---------- */
.footer { padding-top: 60px; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-soft);
}
.footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__nav a, .footer__legal a { color: var(--fg-dim); font-size: 0.9rem; }
.footer__nav a:hover, .footer__legal a:hover { color: var(--fg); }
.footer__legal { display: flex; gap: 20px; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-block: 26px 30px;
  color: var(--fg-faint);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .burger { display: flex; }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .pillars { grid-template-columns: 1fr; }
  .pillar { border-right: none; border-bottom: 1px solid var(--line-soft); }
  .process { grid-template-columns: 1fr; gap: 30px; }
  .theme-grid { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; gap: 50px; }
}
@media (max-width: 560px) {
  .theme-grid { grid-template-columns: 1fr; }
  .hero__foot { align-items: flex-start; }
  .header__actions .btn--outline { display: none; }
}
