@font-face {
  font-family: "FK Grotesk Neue";
  src: url("assets/FKGroteskNeue-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* TOTTTAL tokens — from Figma */
  --canvas: #f2eee9;        /* subtle warm off-white (Hermes) */
  --ui: #efefef;            /* pills + cards, used at 90% */
  --orange: #ff3b00;
  --ink: #000000;
  --about: #787878;
  --ls: -0.02em;            /* letter-spacing -2% */

  --radius-pill: 10px;
  --radius-card: 100px;
  --pill-h: 52px;
  --corner-smooth: superellipse(5);   /* corner smoothing ~Figma 100% (progressive enhancement) */
  --panel-w: 282px;     /* about page width */
  --panel-w2: 423px;    /* partners page width */

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: "FK Grotesk Neue", -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: var(--ls);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a { font: inherit; color: inherit; letter-spacing: inherit; }
button { border: 0; background: none; cursor: pointer; }

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--canvas);
  isolation: isolate;
}

/* ---------- orange wash for menu-open ---------- */
.menu-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--orange);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.stage[data-menu-open="true"] .menu-wash { opacity: 1; }

/* ---------- gallery / carousel ---------- */
.gallery {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  transition: filter 0.6s var(--ease);
}
.gallery:active { cursor: grabbing; }
/* menu open: blur everything below the menu into a soft orange field */
.stage[data-menu-open="true"] .gallery { filter: blur(60px); }

.track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60.5vw;            /* 1162 / 1920 */
  height: 71.8vh;           /* 775 / 1080 */
  margin: 0;
  border-radius: var(--radius-card);
  corner-shape: var(--corner-smooth);
  overflow: hidden;
  background: #d9d9d9;
  will-change: transform, opacity;
  transform-origin: center center;
  backface-visibility: hidden;
}
.card img,
.card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* orange Color-blend layer over the blurred imagery (menu open) — uniform orange, Figma 15:204 */
.color-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--orange);
  mix-blend-mode: color;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.stage[data-menu-open="true"] .color-layer { opacity: 1; }

/* ---------- HUD: menu + clock ---------- */
.hud {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.pill {
  background: rgba(239, 239, 239, 0.9);
  border-radius: var(--radius-pill);
  corner-shape: var(--corner-smooth);
  height: var(--pill-h);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* menu */
.menu { position: relative; }
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 176px;
  padding: 0 8px 0 18px;
  transition: width 0.62s var(--ease);
}
.stage[data-menu-open="true"] .bar { width: 282px; }

.brand {
  display: inline-flex;
  align-items: baseline;
  font-size: 17.8px;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mid { letter-spacing: -0.045em; }   /* "TTT" tighter */
/* ® raised via transform (flex ignores vertical-align); layout stays on baseline */
.reg { font-size: 0.5em; transform: translateY(-1.4em); margin-left: 1px; }
.stage[data-menu-open="true"] .reg { display: none; }
.route {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.5s var(--ease), opacity 0.4s var(--ease);
}
.stage[data-menu-open="true"] .route { max-width: 80px; opacity: 1; }

.toggle {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  background: none;
}
/* orange fill — blurs on hover, leaving the symbol crisp */
.toggle-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-pill);
  corner-shape: var(--corner-smooth);
  background: var(--orange);
  transition: filter 0.3s var(--ease);
}
.toggle:hover .toggle-fill,
.toggle.is-hover .toggle-fill { filter: blur(5px); }

/* the +/− symbol — stays sharp above the fill */
.toggle-plus { position: absolute; inset: 0; z-index: 1; }
.toggle-plus::before, .toggle-plus::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: #000;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.42s var(--ease), opacity 0.3s var(--ease);
}
.toggle-plus::before { width: 26px; height: 1.25px; }
.toggle-plus::after  { width: 1.25px; height: 28px; }
.stage[data-menu-open="true"] .toggle-plus::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }

/* panel */
.panel {
  position: absolute;
  top: 60px;
  left: 0;
  width: 282px;
  background: rgba(239, 239, 239, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-pill);
  corner-shape: var(--corner-smooth);
  overflow: hidden;
  width: var(--panel-w);
  height: 0;
  opacity: 0;
  transform: translateY(-12px) scaleY(0.9);
  transform-origin: top center;
  pointer-events: none;
  transition: height 0.62s var(--ease), width 0.62s var(--ease),
              opacity 0.4s var(--ease), transform 0.62s var(--ease);
}
.stage[data-menu-open="true"] .panel {
  height: 401px;
  opacity: 1;
  transform: translateY(0) scaleY(1);
  pointer-events: auto;
}
.stage[data-menu-open="true"][data-page="1"] .panel { width: var(--panel-w2); }

.pages {
  display: flex;
  width: max-content;            /* sized by the fixed-width pages, no reflow */
  height: 100%;
  transform: translateX(0);
  transition: transform 0.62s var(--ease);
}
.stage[data-page="1"] .pages { transform: translateX(calc(-1 * var(--panel-w))); }

/* each page keeps a fixed width so the text never compresses during the slide */
.page { flex: 0 0 auto; width: var(--panel-w); height: 100%; padding: 24px 24px 22px; position: relative; }
.page-partners { width: var(--panel-w2); }

.copy p {
  font-size: 13px;
  line-height: 1.3;
  color: var(--about);
  margin-bottom: 13px;
}
.links { margin-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.links a {
  font-size: 13px;
  color: var(--about);
  text-decoration: underline;
  text-underline-offset: 3px;
  width: fit-content;
}

.page-partners { display: flex; flex-direction: column; gap: 20px; padding-top: 28px; }
.partner { display: flex; gap: 20px; align-items: flex-start; }
.partner + .partner { border-top: 1px solid rgba(0, 0, 0, 0.12); padding-top: 20px; }

/* avatar: 108px circle with initials -> hover morphs to a portrait that reveals the photo */
.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 124px;
  height: 152px;            /* reserved box so hover doesn't shift the layout */
  display: flex;
  align-items: center;
  justify-content: center;
}
.chip {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  corner-shape: var(--corner-smooth);
  background: rgba(239, 239, 239, 0.9);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.5s var(--ease), height 0.5s var(--ease), border-radius 0.5s var(--ease);
}
.partner:hover .chip,
.partner.is-hover .chip { width: 124px; height: 152px; border-radius: 30px; }

.initials {
  font-size: 33.7px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.35s var(--ease);
}
.partner:hover .initials,
.partner.is-hover .initials { opacity: 0; }

.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.partner:hover .photo,
.partner.is-hover .photo { opacity: 1; }

.partner p { font-size: 13px; line-height: 1.3; color: rgba(0, 0, 0, 0.5); }

.pager {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: flex;
  align-items: baseline;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.3);
}
.pager .pg { color: rgba(0, 0, 0, 0.3); transition: color 0.25s var(--ease); }
.stage[data-page="0"] .pager .pg[data-page="0"],
.stage[data-page="1"] .pager .pg[data-page="1"] { color: var(--ink); }

/* clock */
.clock {
  position: relative;
  width: 126px;
  padding: 0;
}
.clock .ctop {
  position: absolute;
  left: 14px;
  top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 3px;
}
.clock .hm { font-size: 23px; line-height: 1; color: var(--ink); }
.clock .ss { font-size: 13px; line-height: 1; color: var(--ink); margin-top: -1px; }
.clock .globe {
  position: absolute;
  top: 9px;
  right: 12px;
  width: 13px;
  height: 13px;
  opacity: 0.9;
}
.clock .tz {
  position: absolute;
  left: 14px;
  bottom: 9px;
  font-size: 8.2px;
  line-height: 1;
  color: var(--ink);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  :root {
    --radius-card: 40px;
    --panel-w: min(282px, calc(100vw - 32px));
    --panel-w2: min(423px, calc(100vw - 32px));
  }
  .hud { padding-left: 16px; }
  .card { width: 86vw; height: 60vh; }
  .bar { width: 168px; }
  .stage[data-menu-open="true"] .bar { width: var(--panel-w); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
