/* KATAN Realty Group — hero styles */

:root {
  --ink: oklch(0.965 0.006 85);
  --ink-soft: oklch(0.80 0.008 85);
  --ink-mute: oklch(0.62 0.01 85);

  /* portal accents — harmonized chroma ~0.11, lightness ~0.74, hue varies */
  --gold:   oklch(0.80 0.105 82);
  --green:  oklch(0.74 0.105 152);
  --purple: oklch(0.66 0.115 305);

  --glass: oklch(0.20 0.018 255 / 0.42);
  --glass-line: oklch(0.85 0.02 255 / 0.16);

  --font-display: "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  --gutter: clamp(20px, 4.2vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: #0b0c10;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---- scroll mechanics ---- */
#scroll-root {
  height: 420vh;            /* travel distance for the build */
  position: relative;
}
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #a9b0ba;
}

/* soft cinematic vignette + top scrim for nav legibility */
.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 38%, transparent 52%, oklch(0.04 0.01 260 / 0.55) 100%),
    linear-gradient(to bottom, oklch(0.04 0.01 260 / 0.55) 0%, transparent 18%, transparent 78%, oklch(0.03 0.01 260 / 0.5) 100%);
  z-index: 2;
}

/* ---- top nav ---- */
.topnav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 2.6vw, 30px) var(--gutter);
  gap: 24px;
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 1.5vw, 21px);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
}
.wordmark .sub {
  font-size: 10px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 38px);
  margin-left: auto;
  margin-right: clamp(20px, 3vw, 48px);
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.tenant-login {
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid oklch(0.85 0.02 255 / 0.28);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.tenant-login:hover {
  border-color: oklch(0.85 0.02 255 / 0.6);
  background: oklch(0.85 0.02 255 / 0.08);
}

/* ---- hero copy ---- */
.hero-copy {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  max-width: min(46vw, 640px);
  will-change: opacity, transform;
}
.hero-copy::before {
  content: "";
  position: absolute;
  left: -16%;
  top: -34%;
  width: 150%;
  height: 168%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(70% 60% at 32% 50%, oklch(0.18 0.012 258 / 0.46) 0%, transparent 72%);
  filter: blur(8px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: clamp(20px, 3vh, 34px);
  text-shadow: 0 1px 14px oklch(0.12 0.01 258 / 0.55);
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}
.headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
  text-shadow: none;
}
.headline .hl-line {
  display: inline-block;
  filter: drop-shadow(0 2px 26px oklch(0.14 0.01 258 / 0.45));
  transition: filter 1.1s ease;
}
.headline .hl-ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em);
  transition: opacity 0.45s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  background-image: linear-gradient(102deg, #ffffff 8%, #dfe9f3 30%, #c9d8ea 48%, #f3e9d8 66%, #ffffff 88%);
  background-size: 240% 100%;
  background-position: calc(var(--hl-shift, 0%) * 0.3 + var(--lx, 0%)) 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.headline .hl-ch.on { opacity: 1; transform: translateY(0); }
.headline .hl-3 .hl-ch {
  background-image: linear-gradient(100deg, #f6ead2 10%, var(--gold) 34%, #f0d9ac 58%, #f6ead2 82%);
}
.headline.lit .hl-3 {
  filter: drop-shadow(0 2px 26px oklch(0.14 0.01 258 / 0.45)) drop-shadow(0 0 30px oklch(0.80 0.105 82 / 0.45));
}
.headline.lit .hl-3 .hl-ch { animation: hl-sweep 1.5s cubic-bezier(0.4, 0, 0.2, 1) 1; }
@keyframes hl-sweep {
  from { background-position: calc(var(--hl-shift, 0%) * 0.3 + var(--lx, 0%) - 160%) 0; }
  to { background-position: calc(var(--hl-shift, 0%) * 0.3 + var(--lx, 0%)) 0; }
}
.headline .em {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(34px, 6vh, 64px);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: opacity 0.6s ease;
  text-shadow: 0 1px 12px oklch(0.12 0.01 258 / 0.5);
}
.scroll-cue .track {
  position: relative;
  width: 64px; height: 1px;
  background: oklch(0.85 0.02 255 / 0.22);
  overflow: hidden;
}
.scroll-cue .track::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--ink-soft);
  animation: cue 2.4s cubic-bezier(0.65,0,0.35,1) infinite;
}
@keyframes cue {
  0% { transform: translateX(-110%); }
  60%,100% { transform: translateX(280%); }
}

/* ---- right portals ---- */
.portals {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vh, 22px);
  width: min(30vw, 340px);
}
.portals-label {
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: right;
  margin-bottom: 4px;
  font-weight: 500;
}
.portal {
  --accent: var(--gold);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  padding: 18px 18px 18px 22px;
  background: var(--glass);
  border: 1px solid oklch(0.85 0.02 255 / 0.10);
  border-radius: 4px;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1),
              border-color 0.4s ease, background 0.4s ease;
}
.portal::before {                 /* the thin accent bar */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.5;
  transition: opacity 0.4s ease, box-shadow 0.4s ease, width 0.4s ease;
}
.portal:hover {
  transform: translateX(-8px);
  border-color: oklch(0.85 0.02 255 / 0.22);
  background: oklch(0.22 0.02 255 / 0.55);
}
.portal:hover::before {
  opacity: 1;
  width: 4px;
  box-shadow: 0 0 18px 1px var(--accent);
}
.portal .p-index {
  grid-row: 1 / span 2;
  align-self: start;
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  padding-top: 3px;
}
.portal-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.portal .p-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.portal .p-desc {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 30ch;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.5s cubic-bezier(0.22,1,0.36,1),
              opacity 0.4s ease, transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.portal:hover .p-desc,
.portal:focus-visible .p-desc {
  max-height: 60px;
  opacity: 1;
  transform: translateY(0);
}
.portal .p-arrow {
  align-self: center;
  color: var(--accent);
  font-size: 17px;
  opacity: 0.6;
  transform: translateX(-4px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.portal:hover .p-arrow { opacity: 1; transform: translateX(0); }

/* .lit = lit from the OTHER direction (hovering the building on canvas) */
.portal.lit {
  transform: translateX(-8px);
  border-color: oklch(0.85 0.02 255 / 0.22);
  background: oklch(0.22 0.02 255 / 0.55);
}
.portal.lit::before { opacity: 1; width: 4px; box-shadow: 0 0 18px 1px var(--accent); }
.portal.lit .p-desc { max-height: 60px; opacity: 1; transform: translateY(0); }
.portal.lit .p-arrow { opacity: 1; transform: translateX(0); }

/* ---- build phase indicator (narrates the interaction) ---- */
.phase {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(22px, 4vh, 40px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink-mute);
}
.phase-ticks {
  display: flex;
  gap: 6px;
}
.phase-ticks .t {
  width: 26px; height: 2px;
  background: oklch(0.85 0.02 255 / 0.18);
  transition: background 0.5s ease, box-shadow 0.5s ease;
}
.phase-ticks .t.on {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.phase-label {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  min-width: 16ch;
}
.phase-label b {
  color: var(--ink);
  font-weight: 600;
}

/* ---- portal entry screen ---- */
.portal-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: oklch(0.115 0.012 258 / 0.985);
  backdrop-filter: blur(30px) saturate(120%);
  -webkit-backdrop-filter: blur(30px) saturate(120%);
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 6vw, 88px) var(--gutter);
  opacity: 0;
  visibility: hidden;
  transform: translateX(4%);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1), visibility 0s linear 0.7s;
}
.portal-screen.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1), visibility 0s;
}
.portal-screen::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent, var(--gold));
  box-shadow: 0 0 28px 2px var(--accent, var(--gold));
}
.ps-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: auto;
}
.ps-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease;
}
.ps-back:hover { color: var(--ink); }
.ps-kicker {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent, var(--gold));
  font-weight: 600;
}
.ps-cols {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  margin: auto 0;
  width: 100%;
  max-width: 1180px;
}
.ps-body { max-width: 560px; }
.ps-eyebrow {
  font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 18px; font-weight: 500;
}
.ps-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5vw, 74px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.ps-title .em { font-style: italic; font-weight: 300; }
.ps-lede {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 52ch;
  margin: 0 0 30px;
}
.ps-points {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 13px;
}
.ps-points li {
  position: relative; padding-left: 22px;
  font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); font-weight: 300;
}
.ps-points li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 7px; height: 7px; border: 1px solid var(--accent, var(--gold));
  transform: rotate(45deg);
}

/* action panel (login or marketplace) */
.ps-action { width: 100%; }
.login-card, .market-card {
  background: oklch(0.165 0.014 260 / 0.92);
  border: 1px solid oklch(0.85 0.02 255 / 0.14);
  border-radius: 12px;
  padding: clamp(26px, 3vw, 38px);
  display: flex; flex-direction: column; gap: 15px;
  box-shadow: 0 40px 100px -50px rgba(0,0,0,0.85);
}
.login-card .fld { display: flex; flex-direction: column; gap: 8px; }
.login-card .fld span {
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 500;
}
.login-card input[type="email"], .login-card input[type="password"] {
  background: #0c0d11;
  border: 1px solid oklch(0.85 0.02 255 / 0.18);
  border-radius: 8px;
  padding: 13px 15px;
  color: var(--ink);
  font-family: var(--font-body); font-size: 15px;
  outline: none; transition: border-color 0.3s ease;
}
.login-card input:focus { border-color: var(--accent, var(--gold)); }
.login-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--ink-mute);
}
.login-row .rmb { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.login-row .lnk { color: var(--ink-soft); text-decoration: none; }
.login-row .lnk:hover { color: var(--ink); }
.ps-primary {
  margin-top: 6px;
  background: var(--accent, var(--gold)); color: #0c0d12;
  border: none; border-radius: 999px;
  padding: 15px 26px;
  font-family: var(--font-body); font-weight: 600;
  font-size: 13.5px; letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; transition: transform 0.3s ease, filter 0.3s ease;
}
.ps-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.ps-secondary {
  background: none; border: none;
  color: var(--ink-soft); font-family: var(--font-body);
  font-size: 13.5px; cursor: pointer; text-decoration: none; text-align: center;
  transition: color 0.3s ease;
}
.ps-secondary:hover { color: var(--ink); }
.login-note { margin: 4px 0 0; font-size: 12px; color: var(--ink-mute); text-align: center; line-height: 1.5; }

/* marketplace card */
.market-map {
  position: relative;
  height: clamp(220px, 30vh, 300px);
  border-radius: 10px;
  border: 1px solid oklch(0.85 0.02 255 / 0.14);
  overflow: hidden;
  background: linear-gradient(135deg, oklch(0.22 0.02 232), oklch(0.16 0.02 262));
}
.market-map::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, oklch(0.85 0.02 255 / 0.05) 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 27px, oklch(0.85 0.02 255 / 0.05) 27px 28px);
}
.market-map::after {        /* a diagonal ‘avenue’ + river feel */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(74deg, transparent 46%, oklch(0.85 0.02 255 / 0.06) 46% 49%, transparent 49%),
    radial-gradient(120% 80% at 100% 100%, oklch(0.3 0.04 232 / 0.45), transparent 55%);
}
.map-label {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.06em; color: var(--ink-mute);
}
.pin {
  position: absolute; width: 13px; height: 13px; z-index: 2;
  background: var(--accent, var(--gold));
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent, #E2B266) 26%, transparent),
              0 6px 12px -4px rgba(0,0,0,0.6);
  animation: pin-pulse 2.6s cubic-bezier(0.4,0,0.6,1) infinite;
}
.pin::after { content: ""; position: absolute; inset: 4px; background: #0c0d11; border-radius: 50%; }
.pin-1 { left: 22%; top: 30%; animation-delay: 0s; }
.pin-2 { left: 52%; top: 20%; animation-delay: 0.4s; }
.pin-3 { left: 71%; top: 50%; animation-delay: 0.8s; }
.pin-4 { left: 35%; top: 60%; animation-delay: 1.2s; }
.pin-5 { left: 62%; top: 74%; animation-delay: 1.6s; }
@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent, #E2B266) 26%, transparent), 0 6px 12px -4px rgba(0,0,0,0.6); }
  50% { box-shadow: 0 0 0 8px color-mix(in oklch, var(--accent, #E2B266) 8%, transparent), 0 6px 12px -4px rgba(0,0,0,0.6); }
}
.market-alt {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.market-alt .dot-sep { color: var(--ink-mute); }
@media (prefers-reduced-motion: reduce) { .pin { animation: none; } }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .hero-copy { max-width: 78vw; top: 38%; }
  .portals {
    flex-direction: row;
    top: auto; bottom: clamp(70px, 12vh, 110px);
    transform: none;
    right: var(--gutter); left: var(--gutter);
    width: auto;
    overflow-x: auto;
  }
  .portals-label { display: none; }
  .portal { min-width: 200px; }
  .portal .p-desc { max-height: 60px; opacity: 1; transform: none; }
  .phase { display: none; }
  .ps-cols { grid-template-columns: 1fr; gap: 40px; }
  .ps-body { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue .track::after { animation: none; }
}
