/* ============================================================
   Veera Forge — machined Swiss dark, single viewport
   ============================================================ */

@font-face {
  font-family: "Nasalization";
  src: url("fonts/NasalizationRg.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:            #0a0a0b;
  --ink:           #f4f2ec;
  --dim:           #98948b;
  --faint:         #5b5852;
  --accent:        #e84d14;
  --accent-hi:     #ff6a33;
  --accent-soft:   rgba(232, 77, 20, 0.16);
  --hair:          rgba(244, 242, 236, 0.08);
  --hair-strong:   rgba(244, 242, 236, 0.18);
  --panel-hover:   rgba(244, 242, 236, 0.03);

  --display:  "Archivo", "Helvetica Neue", sans-serif;
  --serif-it: "Instrument Serif", Georgia, serif;
  --mono:     "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wordmark: "Nasalization", "Archivo", sans-serif;

  /* shared horizontal edge — gutters, capped at 1560px content width */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --edge:   max(var(--gutter), calc((100vw - 1560px) / 2));

  --ease-out:   cubic-bezier(.16, .84, .3, 1);
  --t-fast: 0.3s;
  --t-base: 0.5s;
}

/* ----------------------------- reset ----------------------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: 100vh;
  height: 100svh;   /* fallback for browsers without dvh */
  height: 100dvh;   /* dynamic — matches visible area as URL bar resizes */
  overflow: hidden;
  overscroll-behavior: none;
  position: relative;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

:focus:not(:focus-visible) { outline: none; }

/* ----------------------------- atmosphere ------------------ */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0   0 0 0 0 0   0 0 0 0 0   0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(90% 70% at 85% 10%,
      rgba(232, 77, 20, 0.06) 0%,
      rgba(232, 77, 20, 0) 55%),
    radial-gradient(80% 60% at 50% 100%,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0) 60%);
}

/* ----------------------------- topbar ---------------------- */

.topbar {
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.8rem, 2vh, 1.25rem) var(--edge);
  border-bottom: 1px solid var(--hair);
  animation: fadeIn 0.9s var(--ease-out) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand__mark {
  width: clamp(16px, 2.4vh, 22px);
  height: auto;
}

.brand__name {
  font-family: var(--wordmark);
  /* 1.6× the mono-meta clamp — caps land just under the mark's height */
  font-size: clamp(1.056rem, 2.4vh, 1.28rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  transform: translateY(0.08em); /* optical centering against the mark */
}

.topbar__meta {
  font-family: var(--mono);
  font-size: clamp(0.66rem, 1.5vh, 0.8rem); /* tracks .brand__name so both sides of the bar read at the same weight */
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

/* ----------------------------- stage ----------------------- */

.stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
}

/* ----------------------------- hero ------------------------ */

.hero {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--gutter);
  padding: clamp(1rem, 3vh, 2.5rem) var(--edge);
}

.hero__eyebrow {
  margin: 0 0 clamp(0.9rem, 2.6vh, 1.7rem);
  font-family: var(--mono);
  font-size: clamp(0.58rem, 1.4vh, 0.7rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  animation: fadeUp 0.9s 0.15s var(--ease-out) both;
}

.hero__slash {
  color: var(--accent);
  margin-right: 0.5em;
  letter-spacing: 0;
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.4rem, min(7.2vw, 11vh), 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero__title em {
  font-family: var(--serif-it);
  font-style: italic;
  font-stretch: normal;
  font-weight: 400;
  font-size: 1.05em;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}

/* line-by-line clip reveal */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em; /* room for serif descenders inside the clip */
}

.line__inner {
  display: block;
  transform: translateY(115%);
  animation: lineUp 1s var(--ease-out) forwards;
}

.line:nth-child(1) .line__inner { animation-delay: 0.25s; }
.line:nth-child(2) .line__inner { animation-delay: 0.38s; }

@keyframes lineUp {
  to { transform: translateY(0); }
}

/* Emblem — the V mark, lit by the baked ember halo (see CLAUDE.md) */
.hero__emblem {
  position: relative;
  justify-self: center;
  width: clamp(110px, 22vh, 210px);
  aspect-ratio: 1228 / 1080;
  animation: emblemIn 1.2s 0.45s var(--ease-out) both;
}

.hero__emblem::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 290%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url("halo.png") center / 100% 100% no-repeat;
  pointer-events: none;
  animation: emberPulse 8s ease-in-out infinite;
  z-index: -1;
}

.hero__emblem-img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px rgba(232, 77, 20, 0.35))
          drop-shadow(0 0 40px rgba(232, 77, 20, 0.2));
}

@keyframes emblemIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes emberPulse {
  0%, 100% { opacity: 0.8; }
  50%      { opacity: 1;   }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ----------------------------- ventures -------------------- */

.ventures {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 var(--edge);
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hair-strong);
  padding: clamp(0.9rem, 2.4vh, 1.6rem) clamp(1rem, 1.8vw, 1.8rem)
           clamp(1rem, 2.8vh, 1.9rem) 0;
  animation: fadeUp 0.9s var(--ease-out) both;
  transition: background-color var(--t-base) ease;
}

.panel:nth-child(1) { animation-delay: 0.65s; }
.panel:nth-child(2) { animation-delay: 0.78s; }
.panel:nth-child(3) { animation-delay: 0.91s; }

.panel + .panel {
  border-left: 1px solid var(--hair);
  padding-left: clamp(1rem, 1.8vw, 1.8rem);
}

/* accent line sweeps in along the top edge on hover */
.panel::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-base) var(--ease-out);
}

.panel:hover { background-color: var(--panel-hover); }
.panel:hover::after { transform: scaleX(1); }

.panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: clamp(0.58rem, 1.3vh, 0.68rem);
  letter-spacing: 0.2em;
  color: var(--faint);
}

.panel__arrow {
  color: var(--faint);
  transition:
    color var(--t-fast) ease,
    transform var(--t-base) var(--ease-out);
}

.panel:hover .panel__arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.panel__logo {
  height: clamp(28px, 4.6vh, 44px);
  margin: clamp(0.9rem, 2.6vh, 1.7rem) 0 clamp(0.8rem, 2.2vh, 1.4rem);
  display: flex;
  align-items: center;
}

.panel__logo img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  transition: transform var(--t-base) var(--ease-out);
}

.panel:hover .panel__logo img { transform: translateY(-2px); }

/* the Forge Foundations SVG renders optically smaller than the other
   marks at equal height — oversize it inside the shared logo row */
.panel__logo--forge img { height: 130%; }

.panel__field {
  font-family: var(--mono);
  font-size: clamp(0.56rem, 1.3vh, 0.66rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1.5;
}

.panel__domain {
  margin-top: clamp(0.35rem, 1vh, 0.6rem);
  font-family: var(--display);
  font-size: clamp(0.74rem, 1.7vh, 0.86rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--faint);
  transition: color var(--t-fast) ease;
}

.panel:hover .panel__domain { color: var(--ink); }

/* ----------------------------- footer ---------------------- */

.footer {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.7rem, 1.8vh, 1.1rem) var(--edge);
  border-top: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: clamp(0.56rem, 1.3vh, 0.66rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  animation: fadeIn 0.9s 0.9s var(--ease-out) both;
}

.footer__contact {
  color: var(--dim);
  text-transform: none;
  letter-spacing: 0.06em;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--t-fast) ease;
}

.footer__contact::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.35);
  transform-origin: left center;
  transition: transform var(--t-base) var(--ease-out);
}

.footer__contact:hover { color: var(--accent-hi); }
.footer__contact:hover::after { transform: scaleX(1); }

.footer__legal { white-space: nowrap; }

/* ----------------------------- responsive ------------------ */
/* Narrow: hero stacks, panels become full-width rows so the
   page still fits a single mobile viewport without scrolling. */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero__emblem { display: none; }
}

@media (max-width: 760px) {
  .ventures { grid-template-columns: 1fr; }

  .panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "index logo  arrow"
      "index meta  arrow";
    align-items: center;
    column-gap: clamp(0.8rem, 4vw, 1.4rem);
    padding: clamp(0.7rem, 1.8vh, 1rem) 0;
  }

  .panel + .panel {
    border-left: 0;
    padding-left: 0;
  }

  .panel__top { display: contents; }
  .panel__index { grid-area: index; align-self: center; }
  .panel__arrow { grid-area: arrow; }

  .panel__logo {
    grid-area: logo;
    height: clamp(22px, 3.6vh, 30px);
    margin: 0 0 0.45rem;
  }

  .panel__field {
    grid-area: meta;
    line-height: 1.4;
  }

  .panel__domain { display: none; } /* the arrow says "link"; keep rows tight */
}

@media (max-width: 640px) {
  .topbar { padding-top: 0.7rem; padding-bottom: 0.7rem; }

  /* phone widths can't fit the full-size wordmark next to the meta */
  .brand__name { font-size: clamp(0.9rem, 2.2vh, 1rem); letter-spacing: 0.26em; }

  .topbar__meta { letter-spacing: 0.14em; }

  .topbar__est { display: none; } /* keep brand and meta from colliding */

  /* the three-part eyebrow needs tighter tracking to stay on one line */
  .hero__eyebrow { letter-spacing: 0.16em; }

  .hero__title { font-size: clamp(2.1rem, min(11vw, 9vh), 3.4rem); }
}

/* Escape hatch: on viewports too short for the fixed layout
   (landscape phones, tiny windows), allow scrolling rather than
   letting sections overlap. */
@media (max-height: 540px) {
  html, body {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
  }

  .hero { flex: 0 0 auto; }
}

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