/* ============================================================
   FABULOUS — Foundry identity
   Single-screen holding company site
   ============================================================ */

:root {
  --ink:        #0A0A0C;
  --ink-panel:  #131318;
  --bone:       #EDEBE4;
  --bone-dim:   #9A9AA3;
  --muted:      #83838C;
  --line:       rgba(237, 235, 228, 0.10);
  --line-soft:  rgba(237, 235, 228, 0.06);
  --cobalt:     #4B57FF;
  --cobalt-hi:  #6B78FF;
  --gold:       #E8B23A;
  --gold-hi:    #F6CB5E;

  --ff-display: "Archivo", system-ui, sans-serif;
  --ff-body:    "Archivo", system-ui, -apple-system, sans-serif;
  --ff-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --edge: clamp(1.25rem, 4vw, 3.5rem);
}

/* ---- reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body.site {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--ff-body);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

/* ============================================================
   Atmosphere — furnace glow, automation lattice, grain
   ============================================================ */
.atmosphere { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.lattice {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: clamp(48px, 6vw, 96px) clamp(48px, 6vw, 96px);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 20%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 50% 30%, #000 20%, transparent 78%);
  opacity: 0.7;
}

.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.glow--cobalt {
  top: -18vmax; left: -12vmax; width: 55vmax; height: 55vmax;
  background: radial-gradient(circle, rgba(75,87,255,0.55), transparent 62%);
}
.glow--gold {
  bottom: -22vmax; right: -14vmax; width: 58vmax; height: 58vmax;
  background: radial-gradient(circle, rgba(232,178,58,0.42), transparent 60%);
}

.grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  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='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Shell — single-screen grid
   ============================================================ */
.shell {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1rem, 2.4vh, 2rem) var(--edge);
  gap: clamp(1rem, 3vh, 2.4rem);
}

/* ---- topbar ------------------------------------------------ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-bottom: clamp(0.75rem, 1.6vh, 1.1rem);
  border-bottom: 1px solid var(--line);
}
.brandmark {
  font-family: var(--ff-display); font-weight: 800;
  font-size: 0.95rem; letter-spacing: 0.14em;
  color: var(--bone);
}
.topbar__meta {
  font-family: var(--ff-mono); font-size: 0.7rem;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted);
}
.topbar__social { display: flex; gap: 0.4rem; }
.social {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--bone); border: 1px solid var(--line);
  transition: color .25s, border-color .25s, background .25s, transform .25s;
}
.social:hover { color: var(--ink); background: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.social:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 2px; }

@media (max-width: 620px) { .topbar__meta { display: none; } }

/* ============================================================
   Stage — hero + register split
   ============================================================ */
.stage {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(1.4rem, 4vh, 3rem);
  min-height: 0;
}

/* ---- hero -------------------------------------------------- */
.hero {
  display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: clamp(0.9rem, 2.2vh, 1.6rem);
  min-height: 0;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.eyebrow__tick {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(232,178,58,0.18);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.wordmark {
  font-family: var(--ff-display); font-weight: 900;
  font-size: clamp(3.2rem, 15.5vw, 15rem);
  line-height: 0.86; letter-spacing: -0.01em;
  /* brushed-metal sheen: bone → warm gold → bone */
  background: linear-gradient(96deg,
    #F4F1E6 12%, var(--gold-hi) 34%, #F4F1E6 52%, #D9D4C6 74%, #F4F1E6 92%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: sheen 9s ease-in-out infinite;
  text-wrap: balance;
}
@keyframes sheen { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.lede {
  max-width: 46ch;
  font-size: clamp(1rem, 0.95rem + 0.5vw, 1.35rem);
  line-height: 1.5; color: #C9C7BE;
}
.lede em { font-style: normal; color: var(--bone); font-weight: 600; }

/* ============================================================
   Register — the three companies
   ============================================================ */
.register { display: flex; flex-direction: column; gap: clamp(0.7rem, 1.6vh, 1.1rem); min-height: 0; }

.register__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding-bottom: 0.5rem;
}
.register__label {
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--bone);
}
.register__label::before { content: "// "; color: var(--cobalt-hi); }
.register__count {
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.14em; color: var(--muted);
}

.ventures {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

.venture {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: clamp(1rem, 1.8vw, 1.5rem);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s, background .3s;
}
.venture::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--cobalt), var(--gold));
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.venture::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 20% 0%, rgba(75,87,255,0.14), transparent 55%);
  opacity: 0; transition: opacity .3s;
}
.venture:hover,
.venture:focus-within { transform: translateY(-4px); border-color: rgba(232,178,58,0.4); }
.venture:hover::before,
.venture:focus-within::before { transform: scaleX(1); }
.venture:hover::after,
.venture:focus-within::after { opacity: 1; }

/* whole card is a link to the venture's site */
.venture__link { position: absolute; inset: 0; z-index: 5; border-radius: 14px; }
.venture__link:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 3px; }

.venture__go {
  position: absolute; z-index: 6; pointer-events: none;
  top: clamp(1rem, 1.8vw, 1.5rem); right: clamp(1rem, 1.8vw, 1.5rem);
  font-family: var(--ff-mono); font-size: 1rem; line-height: 1; color: var(--muted);
  transition: color .3s, transform .3s;
}
.venture:hover .venture__go,
.venture:focus-within .venture__go { color: var(--gold); transform: translate(2px, -2px); }

.venture__tag {
  font-family: var(--ff-mono); font-size: 0.66rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--cobalt-hi);
}
.venture__name {
  font-family: var(--ff-display); font-weight: 800;
  font-size: clamp(1.15rem, 0.9rem + 1vw, 1.7rem);
  line-height: 1; letter-spacing: -0.01em; color: var(--bone);
}
.venture__name span { color: var(--muted); font-weight: 700; }
.venture__desc {
  font-size: 0.88rem; line-height: 1.45; color: #B4B2AA;
  flex: 1;
}
.venture__status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--ff-mono); font-size: 0.66rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
}
.venture__status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
}

/* ---- footer ------------------------------------------------ */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-top: clamp(0.75rem, 1.6vh, 1.1rem);
  border-top: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 0.72rem;
  letter-spacing: 0.08em; color: var(--muted);
}
.footer__copy { color: var(--bone); }
.footer__by { text-transform: uppercase; letter-spacing: 0.18em; }
.footer__links { display: flex; gap: 1.2rem; }
.footer__links a { position: relative; transition: color .2s; }
.footer__links a:hover { color: var(--gold); }
.footer__links a:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 3px; }

@media (max-width: 620px) { .footer__by { display: none; } }

/* ============================================================
   Load reveal
   ============================================================ */
[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 80ms + 120ms);
}
.site:not(.is-loading) [data-reveal] { opacity: 1; transform: none; }

/* ============================================================
   Responsive — allow scroll on smaller screens
   ============================================================ */
@media (max-width: 900px) {
  .ventures { grid-template-columns: 1fr; }
  .shell { min-height: auto; }
  .venture__desc { flex: none; }
}

@media (min-width: 901px) and (max-height: 620px) {
  .wordmark { font-size: clamp(3rem, 11vw, 8rem); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .wordmark { animation: none; background-position: 0 50%; }
  .eyebrow__tick { animation: none; }
  .glow { transition: none; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
}
