/* ============================================================
   Haverstock Investor Portal — shared styles (landing + chrome)
   Dark-first treatment on the web brand pack: the portal reads
   as the gated "inner" counterpart to the marketing site.
   ============================================================ */

@import url("/brand/brand-tokens.css?v=20260612c");

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--on-dark);
  background:
    radial-gradient(110% 80% at 80% 0%, rgba(46, 107, 95, 0.28) 0%, transparent 55%),
    linear-gradient(168deg, var(--green-mid) 0%, var(--midnight) 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
[hidden] { display: none !important; }  /* class display rules must not override the hidden attribute */
h1, h2, h3, h4, p, address { margin: 0; font-style: normal; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--pine); color: var(--on-dark);
  padding: 0.75rem 1.25rem; font-weight: 700; font-size: 0.85rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Portal header ---------- */
.portal-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11, 31, 26, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.portal-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo { display: inline-flex; align-items: center; gap: 0.7rem; }
.logo-mark { width: 38px; height: auto; flex: none; }
.logo-mark polygon { fill: var(--gold); }
.logo-wordmark { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-weight: 700; font-size: 0.95rem; letter-spacing: 0.13em; color: var(--on-dark); }
.logo-sub { font-weight: 400; font-size: 0.55rem; letter-spacing: 0.46em; margin-top: 4px; color: var(--on-dark); opacity: 0.82; }

.portal-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}
.portal-header-links { display: flex; align-items: center; gap: 1.4rem; }
.portal-header-links a {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-70);
  transition: color 200ms ease;
}
.portal-header-links a:hover { color: var(--gold-bright); }

/* ---------- Landing hero ---------- */
.portal-hero {
  position: relative;
  overflow: hidden;
  padding: calc(68px + clamp(3rem, 2rem + 5vw, 6.5rem)) 0 clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
.portal-hero > .container { position: relative; z-index: 1; }

/* Signature contour ornament (ported from the website hero) + faint peak mark. */
.portal-ornament { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.portal-contours { position: absolute; inset: -14% 0 -10% 0; width: 100%; height: 130%; }
.portal-contours path {
  fill: none;
  stroke: rgba(244, 239, 231, 0.06);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: portal-draw 2.6s var(--ease-out) forwards;
}
.portal-contours path:nth-child(2) { stroke: rgba(201, 165, 88, 0.10); animation-delay: 0.12s; }
.portal-contours path:nth-child(3) { stroke: rgba(201, 165, 88, 0.20); animation-delay: 0.24s; }
.portal-contours path:nth-child(4) { stroke: rgba(244, 239, 231, 0.06); animation-delay: 0.36s; }
.portal-contours path:nth-child(5) { stroke: rgba(201, 165, 88, 0.11); animation-delay: 0.48s; }
.portal-contours path:nth-child(6) { stroke: rgba(244, 239, 231, 0.05); animation-delay: 0.60s; }
@keyframes portal-draw { to { stroke-dashoffset: 0; } }
.portal-peak {
  position: absolute;
  right: -2%; top: -6%;
  width: min(38vw, 440px);
  color: rgba(244, 239, 231, 0.045);
}
.portal-overline {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: var(--track-overline);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.portal-title {
  font-size: clamp(2.4rem, 1.6rem + 4vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.portal-title em { color: var(--gold-bright); font-weight: 400; }
.portal-sub {
  margin-top: 1.3rem;
  max-width: 40rem;
  color: var(--on-dark-70);
  font-weight: 300;
  line-height: 1.7;
}

/* ---------- Destination cards ---------- */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
  padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
}
.dest {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 230px;
  padding: 1.6rem 1.6rem 1.45rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(244, 239, 231, 0.04);
  overflow: hidden;
  transition: transform 320ms var(--ease-out), border-color 320ms ease, background-color 320ms ease;
}
.dest:hover { transform: translateY(-5px); border-color: var(--gold-dim); background: rgba(244, 239, 231, 0.07); }
.dest-no {
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-size: clamp(2.1rem, 1.7rem + 1vw, 2.9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--gold);
  opacity: 0.85;
}
@supports ((-webkit-text-stroke: 1px black)) {
  .dest-no { color: transparent; -webkit-text-stroke: 1.3px var(--gold-dim); }
}
.dest h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.dest p { margin-top: 0.45rem; font-size: 0.86rem; font-weight: 300; color: var(--on-dark-70); line-height: 1.55; max-width: 30rem; }
.dest-cta {
  margin-top: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.dest:hover .dest-cta { color: var(--gold-bright); }

/* Feature card — the deck. Brand contour flourish on the right (no photo). */
.dest-feature {
  grid-column: span 6;
  min-height: 320px;
  background:
    radial-gradient(130% 150% at 100% 0%, rgba(201, 165, 88, 0.11), transparent 55%),
    rgba(244, 239, 231, 0.04);
}
.dest-feature-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(100deg, transparent 26%, #000 72%);
  mask-image: linear-gradient(100deg, transparent 26%, #000 72%);
}
.dest-feature-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dest-feature-art path { fill: none; stroke: rgba(201, 165, 88, 0.22); stroke-width: 1.4; stroke-linecap: round; }
.dest-feature-art path:nth-child(even) { stroke: rgba(244, 239, 231, 0.08); }
.dest-feature > .dest-kicker,
.dest-feature > h2,
.dest-feature > p,
.dest-feature > .dest-cta { position: relative; z-index: 1; }
.dest-feature .dest-no { z-index: 1; }
.dest-feature h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem); }
.dest-feature .dest-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.dest-half { grid-column: span 3; }
.dest-third { grid-column: span 2; }

/* Coming-soon state */
.dest.is-soon { cursor: default; }
.dest.is-soon:hover { transform: none; border-color: var(--line-dark); background: rgba(244, 239, 231, 0.04); }
.dest-soon-tag {
  position: absolute;
  top: 1.15rem; right: 1.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-dark-50);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}
.dest.is-soon h2, .dest.is-soon .dest-no { opacity: 0.75; }

/* ---------- Portal footer ---------- */
.portal-footer {
  border-top: 1px solid var(--line-dark);
  padding: 1.6rem 0 2rem;
}
.portal-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--on-dark-50);
}
.portal-footer a { color: var(--on-dark-70); }
.portal-footer a:hover { color: var(--gold-bright); }

/* ---------- Reveal motion (landing) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
  transition-delay: calc(var(--reveal-index, 0) * 100ms);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- Sign-in gate ---------- */
.gate-main {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(68px + clamp(2rem, 1rem + 4vw, 4rem)) var(--gutter) clamp(2.5rem, 2rem + 3vw, 4rem);
}
.gate-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  animation: gate-in 700ms var(--ease-out) both;
  background: rgba(11, 31, 26, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold-dim);
  border-radius: 18px;
  padding: clamp(1.8rem, 1.4rem + 1.5vw, 2.6rem);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6);
}
@keyframes gate-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.gate-overline {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.8rem;
}
.gate-title { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }
.gate-title em { color: var(--gold-bright); font-weight: 400; }
.gate-sub { margin-top: 0.7rem; color: var(--on-dark-70); font-weight: 300; font-size: 0.92rem; line-height: 1.6; }

.gate-step { margin-top: 1.6rem; }
.gate-lead { color: var(--on-dark-70); font-weight: 300; font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.2rem; }
.gate-lead b { color: var(--on-dark); font-weight: 600; }

.gate-field { display: block; margin-bottom: 1rem; }
.gate-field > span {
  display: block; margin-bottom: 0.4rem;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}
.gate-field input, .gate-field textarea {
  width: 100%;
  font-family: inherit; font-size: 0.95rem; color: var(--on-dark);
  background: rgba(244, 239, 231, 0.05);
  border: 1px solid var(--line-dark); border-radius: 10px;
  padding: 0.7rem 0.85rem;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.gate-field input::placeholder, .gate-field textarea::placeholder { color: var(--on-dark-50); }
.gate-field input:focus, .gate-field textarea:focus {
  outline: none; border-color: var(--gold); background: rgba(244, 239, 231, 0.08);
}
.gate-field textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
#gate-otp-input { letter-spacing: 0.5em; font-size: 1.3rem; text-align: center; }

.gate-consent { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 1.2rem; font-size: 0.82rem; color: var(--on-dark-70); line-height: 1.5; }
.gate-consent input { margin-top: 0.2rem; width: 16px; height: 16px; accent-color: var(--gold); flex: none; }
.gate-link { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 2px; font: inherit; }
.gate-link:hover { color: var(--gold); }

.gate-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 0.8rem 1rem; border-radius: 10px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, opacity 200ms ease;
}
.gate-btn:hover { transform: translateY(-2px); }
.gate-btn[disabled] { opacity: 0.55; cursor: default; transform: none; }
.gate-btn-primary { background: var(--gold); color: var(--midnight); border: 1px solid var(--gold); }
.gate-btn-primary:hover { background: var(--gold-bright); }
.gate-btn-ms { background: rgba(244, 239, 231, 0.95); color: #2f2f2f; border: 1px solid transparent; }
.gate-btn-ms .ms-logo { width: 18px; height: 18px; }
.gate-btn-hc { margin-top: 0.7rem; background: transparent; color: var(--gold-bright); border: 1px solid var(--gold-dim); }
.gate-btn-hc:hover { background: rgba(201, 165, 88, 0.08); }

.gate-divider { display: flex; align-items: center; gap: 0.9rem; margin: 1.1rem 0; color: var(--on-dark-50); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; }
.gate-divider::before, .gate-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-dark); }

.gate-row { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: 0.78rem; }
.gate-error { color: #e3a7a0; font-size: 0.8rem; margin: -0.3rem 0 0.9rem; }

.gate-message { text-align: center; }
.gate-message h2 { font-size: 1.3rem; font-weight: 700; }
.gate-message p { margin-top: 0.6rem; color: var(--on-dark-70); font-weight: 300; line-height: 1.6; }
.gate-message .gate-link { display: inline-block; margin-top: 1.2rem; }

/* Terms modal */
.gate-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.gate-modal[hidden] { display: none; }
.gate-modal-scrim { position: absolute; inset: 0; background: rgba(5, 14, 11, 0.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.gate-modal-panel {
  position: relative; width: 100%; max-width: 560px; max-height: 82vh; overflow-y: auto;
  background: var(--midnight); border: 1px solid var(--gold-dim); border-radius: 16px;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
}
.gate-modal-close { position: absolute; top: 0.7rem; right: 1rem; font-size: 1.6rem; line-height: 1; color: var(--on-dark-50); }
.gate-modal-close:hover { color: var(--gold-bright); }
.gate-modal-panel h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; padding-right: 2rem; }
.gate-modal-body p { font-size: 0.82rem; font-weight: 300; color: var(--on-dark-70); line-height: 1.65; margin-bottom: 0.8rem; }
.gate-modal-body strong { color: var(--on-dark); font-weight: 600; }

@media (max-width: 560px) {
  .gate-card { max-width: 100%; }
  .gate-row { flex-direction: column-reverse; gap: 0.6rem; align-items: stretch; }
}

/* ---------- Breakpoints ---------- */
@media (max-width: 900px) {
  .dest-half, .dest-third { grid-column: span 6; }
  .dest { min-height: 0; padding-top: 3.2rem; }
  .dest-feature { min-height: 280px; }
  .portal-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .portal-contours path { stroke-dashoffset: 0 !important; animation: none !important; }
}

/* ============================================================
   Investor portal HOME — light treatment
   The sign-in gate stays dark; the post-sign-in home is light
   (warm paper) so it contrasts with the dark website hero and
   the dark deck cover. Intro left, line-separated list right,
   sitting within a single viewport on desktop.
   ============================================================ */
.portal-home {
  color: var(--ink);
  background:
    radial-gradient(120% 92% at 88% -12%, rgba(201, 165, 88, 0.12) 0%, transparent 52%),
    linear-gradient(168deg, var(--paper) 0%, #ece4d6 100%);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Header + footer chrome on a light ground */
.portal-home .portal-header { background: rgba(251, 248, 242, 0.78); border-bottom: 1px solid var(--line); }
.portal-home .logo-name,
.portal-home .logo-sub { color: var(--ink); }
.portal-home .portal-header-links a { color: var(--ink-70); }
.portal-home .portal-header-links a:hover { color: var(--gold); }
.portal-home .portal-footer { border-top: 1px solid var(--line); flex: none; }
.portal-home .portal-footer-inner { color: var(--ink-50); }
.portal-home .portal-footer a { color: var(--ink-70); }
.portal-home .portal-footer a:hover { color: var(--gold); }

/* Contour ornament re-tinted to read as topo lines on cream */
.portal-home .portal-peak { color: rgba(27, 75, 67, 0.05); }
.portal-home .portal-contours path { stroke: rgba(27, 75, 67, 0.07); }
.portal-home .portal-contours path:nth-child(2) { stroke: rgba(201, 165, 88, 0.18); }
.portal-home .portal-contours path:nth-child(3) { stroke: rgba(201, 165, 88, 0.28); }
.portal-home .portal-contours path:nth-child(4) { stroke: rgba(27, 75, 67, 0.06); }
.portal-home .portal-contours path:nth-child(5) { stroke: rgba(201, 165, 88, 0.18); }
.portal-home .portal-contours path:nth-child(6) { stroke: rgba(27, 75, 67, 0.05); }

/* Layout — fills the band between fixed header and footer */
.home-main {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(68px + clamp(1.5rem, 1rem + 3vw, 3rem)) 0 clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.home-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: center;
  width: 100%;
}
.portal-home .portal-overline { color: var(--gold); }
.home-intro .portal-title { font-size: clamp(2.2rem, 1.5rem + 3.2vw, 3.9rem); }
.portal-home .portal-title em { color: var(--pine); }
.home-intro .portal-sub { color: var(--ink-70); max-width: 34rem; }

/* Line-separated destination list (no cards) */
.home-list { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem clamp(0.9rem, 0.6rem + 1vw, 1.6rem);
  padding: clamp(0.9rem, 0.65rem + 0.7vw, 1.35rem) 0.2rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.home-list .row:last-child { border-bottom: 1px solid var(--line); }
.row-no {
  font-size: clamp(0.8rem, 0.72rem + 0.3vw, 0.95rem);
  font-weight: 700; letter-spacing: 0.06em; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.row-body { min-width: 0; }
.row-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.row-title { font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.42rem); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.row-tag {
  font-size: 0.56rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-50); border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.6rem;
  transform: translateY(-1px);
}
.row-tag.is-featured { color: var(--gold); border-color: var(--gold-dim); }
.row-desc { display: block; margin-top: 0.3rem; font-size: 0.85rem; font-weight: 300; color: var(--ink-70); line-height: 1.5; max-width: 40rem; }
.row-cta {
  font-size: 1.3rem; line-height: 1; color: var(--gold); justify-self: end;
  transition: transform 280ms var(--ease-out), color 280ms ease;
}
.row-link { cursor: pointer; transition: background-color 280ms ease; }
.row-link:hover { background: rgba(201, 165, 88, 0.07); }
.row-link:hover .row-title { color: var(--pine); }
.row-link:hover .row-cta { transform: translateX(5px); color: var(--gold-bright); }
.row.is-soon { grid-template-columns: auto 1fr; }
.row.is-soon .row-title { color: var(--ink-70); }
.row.is-soon .row-no { color: var(--gold-dim); }

/* Stack to a single scrolling column on narrow screens */
@media (max-width: 860px) {
  .home-main { align-items: flex-start; }
  .home-layout { grid-template-columns: 1fr; gap: 2rem; align-items: start; }
  .home-intro .portal-sub { max-width: 100%; }
}
