:root {
  --bg: #06080d;
  --bg-surface: #0b0f17;
  --bg-elevated: #101622;
  --ink: #f4f7fb;
  --ink-secondary: #9ba7b8;
  --ink-muted: #627086;
  --accent: #38bdf8;
  --accent-bright: #7dd3fc;
  --accent-deep: #1d6ff2;
  --line: rgba(244, 247, 251, 0.1);
  --line-accent: rgba(56, 189, 248, 0.36);

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 1340px;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  overflow-x: clip;
}

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

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Ultra-minimal floating top bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding-block: 1.25rem;
  background: linear-gradient(180deg, rgba(6, 8, 13, 0.94) 0%, rgba(6, 8, 13, 0.68) 60%, rgba(6, 8, 13, 0) 100%);
  pointer-events: none;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  pointer-events: auto;
}

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

.brand-mark {
  width: 26px;
  height: 26px;
  display: block;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.brand-sep {
  color: var(--accent);
}

.brand-sub {
  color: var(--ink-secondary);
  font-weight: 400;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.nav a {
  transition: color 180ms ease;
}

.nav a:hover {
  color: var(--ink);
}

/* Chamfered Contact button */
.contact-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding-inline: 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(56, 189, 248, 0.11);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  overflow: hidden;
  transition: color 200ms var(--ease-out), transform 140ms var(--ease-out);
}

.contact-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #bae6fd 0%, #38bdf8 55%, #1d6ff2 100%);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 240ms var(--ease-out);
  z-index: 0;
}

.contact-link span {
  position: relative;
  z-index: 1;
}

.contact-link:active {
  transform: scale(0.96);
}

.contact-icon {
  display: none;
  width: 17px;
  height: 17px;
}

@media (hover: hover) and (pointer: fine) {
  .contact-link:hover {
    color: #05080f;
  }
  .contact-link:hover::before {
    clip-path: inset(0 0 0 0);
  }
}

/* HERO: Sticky Atmospheric Stage + Ordered-Dithered Fluid Light Field */
.hero-runway {
  position: relative;
  height: 112vh;
  min-height: 760px;
  max-height: 1120px;
  background: var(--bg);
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 680px;
  max-height: 960px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-top: 128px;
  padding-bottom: clamp(3.5rem, 7vh, 5.5rem);
  background: #070b14;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(65% 65% at 72% 36%, rgba(29, 111, 242, 0.28) 0%, rgba(56, 189, 248, 0.08) 42%, transparent 72%),
    radial-gradient(50% 50% at 24% 28%, rgba(56, 189, 248, 0.16) 0%, transparent 65%),
    linear-gradient(180deg, #070c16 0%, #06080d 100%);
  pointer-events: none;
}

#hero-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  mix-blend-mode: screen;
  opacity: 0.78;
  pointer-events: none;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(62% 58% at 16% 86%, rgba(6, 8, 13, 0.78) 0%, rgba(6, 8, 13, 0) 70%),
    linear-gradient(
      180deg,
      rgba(6, 8, 13, 0.34) 0%,
      rgba(6, 8, 13, 0) 30%,
      rgba(6, 8, 13, 0.76) 82%,
      var(--bg) 100%
    );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: end;
  will-change: transform, opacity;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.15rem;
}

.hero-stage h1 {
  font-size: clamp(2.85rem, 6.4vw, 5.75rem);
  font-weight: 300;
  line-height: 0.99;
  letter-spacing: -0.042em;
  color: var(--ink);
  max-width: 13ch;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 0.4rem;
}

.hero-copy {
  font-size: 1rem;
  line-height: 1.68;
  color: rgba(244, 247, 251, 0.84);
  max-width: 36ch;
}

.hero-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  transition: color 180ms ease, transform 180ms var(--ease-out);
}

.hero-cue:hover {
  color: var(--ink);
  transform: translateY(2px);
}

/* Chapters */
.chapter {
  position: relative;
  z-index: 4;
  padding-block: clamp(4.5rem, 8.5vw, 7rem);
  border-top: 1px solid var(--line);
  background: var(--bg);
  scroll-margin-top: 5.5rem;
}

.display-title {
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.032em;
  color: var(--ink);
}

.editorial-lead {
  font-size: 1.03125rem;
  line-height: 1.72;
  color: var(--ink-secondary);
  max-width: 52ch;
}

/* INVESTMENT FOCUS — SWISS-TECH ARCHITECTURAL INDEX */
.chapter-focus {
  background:
    radial-gradient(55% 60% at 92% 18%, rgba(29, 111, 242, 0.08) 0%, rgba(6, 8, 13, 0) 70%),
    var(--bg);
}

.focus-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.focus-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 0.35rem;
}

.focus-meta span {
  color: var(--accent);
}

.focus-index {
  list-style: none;
  border-top: 1px solid var(--line);
}

.focus-row {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 4.4fr) minmax(0, 5.8fr) 6.5rem;
  gap: 1.5rem 2rem;
  padding: clamp(1.35rem, 2.2vw, 1.8rem) 1rem clamp(1.35rem, 2.2vw, 1.8rem) 1.25rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition:
    background-color 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    opacity 220ms var(--ease-out);
}

.focus-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 55%, #1d6ff2 100%);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 240ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .focus-index:hover .focus-row {
    opacity: 0.48;
  }

  .focus-index:hover .focus-row:hover {
    opacity: 1;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.065) 0%, rgba(29, 111, 242, 0.015) 60%, transparent 100%);
    border-bottom-color: rgba(56, 189, 248, 0.28);
  }

  .focus-index:hover .focus-row:hover::before {
    transform: scaleY(1);
  }

  .focus-index:hover .focus-row:hover .focus-num {
    color: var(--accent-bright);
  }

  .focus-index:hover .focus-row:hover .focus-tag {
    color: var(--accent-bright);
    border-color: var(--line-accent);
  }
}

.focus-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  transition: color 180ms ease;
}

.focus-name {
  font-size: clamp(1.125rem, 1.55vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.25;
  color: var(--ink);
}

.focus-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  max-width: 56ch;
}

.focus-tag {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  transition: color 180ms ease, border-color 180ms ease;
}

/* PRINCIPAL */
.chapter-principal {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg) 100%);
}

.principal-grid {
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.principal-portrait {
  margin: 0;
  max-width: 400px;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 4.5;
  background: #06080d;
  border: 1px solid var(--line);
  overflow: hidden;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 75% at 48% 44%, rgba(6, 8, 13, 0) 46%, rgba(6, 8, 13, 0.72) 100%),
    linear-gradient(180deg, rgba(6, 8, 13, 0.14) 0%, rgba(6, 8, 13, 0) 24%, rgba(6, 8, 13, 0.58) 100%);
  pointer-events: none;
}

#portrait-dither {
  width: 100%;
  height: 100%;
  display: block;
}

.portrait-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.portrait-role {
  color: var(--accent);
}

.principal-content {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.principal-bio .editorial-lead {
  margin-top: 1.25rem;
  max-width: 58ch;
}

.facts-ledger {
  border-top: 1px solid var(--line);
  padding-top: 0.25rem;
}

.fact-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.fact-row dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.fact-row dd {
  font-size: 0.96875rem;
  color: var(--ink);
}

/* CONTACT */
.chapter-contact {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.contact-intro .editorial-lead {
  margin-top: 1.35rem;
  max-width: 42ch;
}

.contact-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: rgba(11, 15, 23, 0.72);
  border: 1px solid var(--line);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.field-opt {
  color: var(--ink-muted);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: rgba(6, 8, 13, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.75rem 0.9rem;
  border-radius: 0;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
  cursor: pointer;
}

.field select option {
  background: var(--bg-elevated);
  color: var(--ink);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-muted);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(244, 247, 251, 0.22);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(10, 14, 22, 0.98);
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-top: 0.25rem;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 48px;
  padding-inline: 1.85rem;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #bae6fd 0%, #38bdf8 52%, #1d6ff2 100%);
  color: #05080f;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: transform 140ms var(--ease-out), filter 180ms ease, opacity 180ms ease;
}

.primary-btn:active {
  transform: scale(0.97);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (hover: hover) and (pointer: fine) {
  .primary-btn:hover:not(:disabled) {
    filter: brightness(1.08);
  }
}

.form-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-secondary);
  min-height: 1.2em;
}

.form-status.is-ok {
  color: var(--accent-bright);
}

.form-status.is-error {
  color: #f87171;
}

/* FOOTER */
.footer {
  position: relative;
  z-index: 4;
  border-top: 1px solid var(--line);
  padding-block: 1.85rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  background: var(--bg);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

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

.footer-brand img {
  width: 20px;
  height: 20px;
  display: block;
  opacity: 0.9;
}

.footer-brand .brand-wordmark {
  font-size: 0.7rem;
  opacity: 0.88;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .brand-mark {
    width: 22px;
    height: 22px;
  }

  .brand-wordmark {
    font-size: 0.68rem;
    letter-spacing: 0.09em;
  }

  .nav {
    display: none;
  }

  .contact-link {
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    clip-path: none;
    color: var(--accent-bright);
  }

  .contact-link::before,
  .contact-link .contact-label {
    display: none;
  }

  .contact-link .contact-icon {
    display: block;
  }

  .hero-runway {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .hero-stage {
    position: relative;
    height: auto;
    min-height: 82svh;
    max-height: none;
    padding-top: 8.5rem;
    padding-bottom: 4rem;
  }

  #hero-shader {
    opacity: 0.52;
  }

  .hero-vignette {
    background:
      linear-gradient(
        180deg,
        rgba(6, 8, 13, 0.45) 0%,
        rgba(6, 8, 13, 0.25) 32%,
        rgba(6, 8, 13, 0.84) 76%,
        var(--bg) 100%
      );
  }

  .hero-grid,
  .principal-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .focus-row {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.55rem 1rem;
    padding: 1.25rem 0.5rem 1.25rem 0.75rem;
  }

  .focus-desc {
    grid-column: 2;
  }

  .focus-tag {
    display: none;
  }
}

@media (max-width: 600px) {
  .fact-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
