*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --slate: #0b0e13;
  --slate-deep: #07090d;
  --stone: #f5efe6;
  --stone-warm: #e6d5bc;
  --stone-mid: #b6aa99;
  --stone-dim: #736b60;
  --bronze: #c8965a;
  --amethyst: #9d6eff;
  --rule: rgba(235, 222, 203, 0.09);
  --rule-strong: rgba(235, 222, 203, 0.18);
  --pad: clamp(1.5rem, 4.5vw, 4.25rem);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --light-x: 50%;
  --light-y: 38%;
  --venture-active: 0;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--slate);
  color: var(--stone);
  font-family: var(--sans);
  font-weight: 400;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(95% 65% at var(--light-x) 100%, rgba(214, 152, 84, 0.14) 0%, rgba(214, 152, 84, 0.04) 42%, transparent 74%),
    radial-gradient(70% 55% at 50% 0%, rgba(24, 30, 42, 0.55) 0%, transparent 70%),
    var(--slate);
}

/* Full-screen WebGL volumetric light canvas */
.rays {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Subtle monumental Tarpeian Rock cliff watermark illuminated by rising volumetric rays */
.monolith-mark {
  position: fixed;
  top: 50%;
  left: 52%;
  width: min(56vh, 50vw);
  aspect-ratio: 1232 / 1203;
  transform: translate(-50%, -48%);
  pointer-events: none;
  z-index: 2;
  opacity: 0.028;
  mix-blend-mode: screen;
  background: radial-gradient(
    80% 75% at 50% 78%,
    rgba(248, 236, 216, 0.95) 0%,
    rgba(214, 168, 112, 0.45) 52%,
    transparent 92%
  );
  -webkit-mask-image: url("../assets/brand/tarpeian-t-mask.png");
  mask-image: url("../assets/brand/tarpeian-t-mask.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), filter 600ms ease;
}

body[data-venture="rickrack"] .monolith-mark {
  opacity: 0.055;
  background: radial-gradient(
    80% 75% at 50% 78%,
    rgba(224, 196, 255, 0.95) 0%,
    rgba(168, 112, 248, 0.52) 52%,
    transparent 92%
  );
}

/* Top Architectural Lintel */
.top {
  position: relative;
  z-index: 3;
  display: flex;
   align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.35rem, 2.8vw, 2.35rem) var(--pad) clamp(1rem, 2vw, 1.5rem);
}

.logo {
  position: relative;
  display: inline-block;
  line-height: 0;
  flex-shrink: 0;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1), filter 350ms ease;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

.logo:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 28px rgba(212, 158, 94, 0.18));
}

.logo img {
  width: clamp(92px, 8.2vw, 122px);
  height: auto;
  display: block;
}

/* Reactive specular travertine rim sheen locked to exact logo geometry */
.logo-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    120px circle at var(--light-x) var(--light-y),
    rgba(255, 244, 226, 0.38),
    rgba(216, 162, 98, 0.12) 45%,
    transparent 75%
  );
  mix-blend-mode: screen;
  -webkit-mask-image: url("../assets/brand/tarpeian-logo-stone.png");
  mask-image: url("../assets/brand/tarpeian-logo-stone.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.top-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(235, 222, 203, 0.03) 0%,
    var(--rule) 25%,
    var(--rule) 75%,
    rgba(235, 222, 203, 0.03) 100%
  );
  position: relative;
}

.top-rule::before,
.top-rule::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-top: 1px solid rgba(235, 222, 203, 0.26);
}

.top-rule::before {
  left: 0;
  border-left: 1px solid rgba(235, 222, 203, 0.26);
}

.top-rule::after {
  right: 0;
  border-right: 1px solid rgba(235, 222, 203, 0.26);
}

.top-meta {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.8vw, 1.35rem);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.inquiries-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--stone);
  text-decoration: none;
  font-weight: 500;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(235, 222, 203, 0.13);
  background: rgba(16, 20, 27, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.inquiries-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d89b56;
  box-shadow: 0 0 8px rgba(216, 155, 86, 0.75);
  transition: background 300ms ease, box-shadow 300ms ease;
}

body[data-venture="rickrack"] .inquiries-dot {
  background: #b685ff;
  box-shadow: 0 0 10px rgba(182, 133, 255, 0.85);
}

.inquiries-link:hover,
.inquiries-link:focus-visible {
  border-color: rgba(226, 179, 120, 0.42);
  background: rgba(28, 33, 44, 0.75);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(226, 179, 120, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.top-meta .sep {
  width: 1px;
  height: 14px;
  background: var(--rule);
}

.top-meta .legal {
  color: var(--stone-dim);
  font-size: 0.78rem;
  letter-spacing: 0.025em;
}

/* Primary Stage */
.stage {
  position: relative;
  z-index: 3;
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
  gap: clamp(2.5rem, 7vw, 7.5rem);
  align-items: end;
  padding: 0 var(--pad) clamp(1.75rem, 3.5vh, 3.25rem);
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}

/* Eyebrow & Roman Numeral Index */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(0.85rem, 1.8vh, 1.35rem);
}

.numeral {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--bronze);
  opacity: 0.85;
}

.eyebrow-rule {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, rgba(208, 158, 98, 0.55), rgba(208, 158, 98, 0));
}

.mission h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.85rem, 5.8vw, 5.35rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(1.25rem, 2.6vh, 1.9rem);
  color: var(--stone);
  max-width: 18ch;
  text-wrap: balance;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.mission h1 em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(
    135deg,
    #fbf6ee 0%,
    #e9d3b3 52%,
    #cf9e64 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.04em;
  transition: filter 450ms ease;
}

body[data-venture="rickrack"] .mission h1 em {
  filter: drop-shadow(0 0 22px rgba(168, 118, 255, 0.22));
}

.mission p {
  font-size: clamp(0.95rem, 1.12vw, 1.08rem);
  line-height: 1.68;
  color: var(--stone-mid);
  margin: 0;
  max-width: 43ch;
  padding-left: 1.1rem;
  border-left: 1px solid rgba(214, 164, 104, 0.28);
  text-wrap: pretty;
}

/* Ventures Ledger */
.ventures {
  justify-self: end;
  width: 100%;
  max-width: 410px;
}

.ventures-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
}

.ventures h2 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-mid);
  margin: 0;
}

.head-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.ventures-head .count {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--stone-dim);
}

.ventures ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Tactile Architectural Venture Dossier Card */
.venture-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  text-decoration: none;
  color: var(--stone);
  border-radius: 10px;
  border: 1px solid rgba(235, 222, 203, 0.12);
  background:
    linear-gradient(135deg, rgba(24, 28, 38, 0.72) 0%, rgba(13, 16, 22, 0.84) 100%);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 248, 236, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 320ms ease,
    box-shadow 320ms ease,
    background 320ms ease;
}

/* Creative ambient aura inside the venture card */
.venture-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    130% 120% at 12% 50%,
    rgba(147, 83, 234, 0.22) 0%,
    rgba(216, 158, 90, 0.1) 48%,
    transparent 85%
  );
  opacity: 0.35;
  transition: opacity 350ms ease;
  pointer-events: none;
}

.venture-card:hover,
.venture-card:focus-visible,
body[data-venture="rickrack"] .venture-card {
  transform: translateY(-2px);
  border-color: rgba(186, 142, 255, 0.42);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.58),
    0 0 28px rgba(147, 83, 234, 0.18),
    inset 0 1px 0 rgba(255, 248, 236, 0.16);
  outline: none;
}

.venture-card:hover::before,
.venture-card:focus-visible::before,
body[data-venture="rickrack"] .venture-card::before {
  opacity: 1;
}

.venture-badge {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #09070e;
  border: 1px solid rgba(214, 174, 114, 0.26);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 0 12px rgba(147, 83, 234, 0.22);
  overflow: hidden;
  transition: border-color 300ms ease, transform 300ms ease, box-shadow 300ms ease;
}

.venture-card:hover .venture-badge,
.venture-card:focus-visible .venture-badge {
  border-color: rgba(192, 132, 252, 0.65);
  box-shadow:
    0 6px 16px rgba(139, 92, 246, 0.32),
    inset 0 0 14px rgba(168, 85, 247, 0.35);
  transform: scale(1.04);
}

.venture-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.venture-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  flex: 1;
}

.ventures .name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--stone);
}

.ventures .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(235, 222, 203, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--bronze);
  font-size: 0.82rem;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), color 240ms ease, border-color 240ms ease, background 240ms ease;
}

.venture-card:hover .arrow,
.venture-card:focus-visible .arrow {
  transform: translate(2px, -2px);
  color: #e9d5ff;
  border-color: rgba(192, 132, 252, 0.45);
  background: rgba(147, 83, 234, 0.2);
}

.ventures .kind {
  font-size: 0.8125rem;
  color: var(--stone-mid);
  line-height: 1.4;
}

/* Foundation Plinth & Cutout Wordmark */
.base {
  position: relative;
  z-index: 2;
  background: #06080b;
  padding: clamp(0.85rem, 1.9vh, 1.4rem) var(--pad) 0;
  overflow: hidden;
  user-select: none;
}

/* Razor-sharp lit architectural stone lip along the top of the bedrock */
.plinth-edge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(214, 158, 92, 0.06) 0%,
    rgba(242, 206, 158, 0.42) var(--light-x),
    rgba(214, 158, 92, 0.06) 100%
  );
  box-shadow: 0 1px 12px rgba(224, 164, 96, 0.25);
  pointer-events: none;
}

.word {
  width: 100%;
  aspect-ratio: 2676 / 298;
  margin-bottom: -1.6%;
  background: radial-gradient(
    65% 150% at var(--light-x) 100%,
    #fff6e8 0%,
    #f3c98b 28%,
    #b87338 62%,
    #3d2919 100%
  );
  -webkit-mask: url("../assets/brand/tarpeian-word-mask.png") center bottom / 100% 100% no-repeat;
  mask: url("../assets/brand/tarpeian-word-mask.png") center bottom / 100% 100% no-repeat;
}

body.shader-ready .base {
  background: transparent;
}

body.shader-ready .plinth-edge {
  opacity: 0.55;
}

body.shader-ready .word {
  opacity: 0;
}

/* 404 Page */
.lost {
  grid-row: 1 / -1;
  place-self: center;
  text-align: center;
  padding: var(--pad);
  position: relative;
  z-index: 3;
}

.lost .logo {
  display: inline-block;
  margin-bottom: 2rem;
}

.lost h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  margin: 0 0 1rem;
}

.lost p {
  margin: 0;
  font-size: 0.9375rem;
}

.lost a {
  color: var(--stone-mid);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.lost a:hover {
  color: var(--stone);
}

@media (max-width: 820px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .top-rule {
    display: none;
  }

  .top {
    flex-wrap: wrap;
    gap: 0.85rem;
  }

  .top-meta {
    gap: 0.75rem;
    font-size: 0.78rem;
  }

  .top-meta .legal,
  .top-meta .sep {
    display: none;
  }

  .stage {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    align-self: stretch;
    align-content: center;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .mission h1 {
    font-size: clamp(2.5rem, 10.5vw, 3.6rem);
  }

  .ventures {
    justify-self: start;
    max-width: 100%;
  }

  .monolith-mark {
    width: 78vw;
    top: 44%;
    opacity: 0.025;
  }

  .base {
    padding-top: 0.75rem;
  }

  .word {
    width: min(44vw, 200px);
    margin: 0 auto -2%;
    aspect-ratio: 1232 / 1203;
    -webkit-mask-image: url("../assets/brand/tarpeian-t-mask.png");
    mask-image: url("../assets/brand/tarpeian-t-mask.png");
  }
}

@media (max-height: 680px) and (min-width: 821px) {
  .mission h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.8rem);
    margin-bottom: 0.75rem;
  }
}
