/* Upview Ventures — styles */

:root {
  --night: #0E1A33;      /* midnight blue */
  --navy: #1F3158;
  --stone: #F2F2EE;
  --stone-2: #E8E7E0;
  --sand: #CDBF9F;
  --bronze: #7A5E2C;     /* sand-family tone with AA contrast on stone */
  --rule: #D3D2C9;
  --rule-dark: rgba(242, 242, 238, .16);
  --muted: #535D73;
  --on-dark: #C6CDDB;
  --on-dark-muted: #A6B0C5;

  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1280px;
  --gut: clamp(20px, 4.5vw, 56px);
  --head-h: 76px;
  --ease: cubic-bezier(.6, .05, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--head-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--stone);
  color: var(--night);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--night);
  outline-offset: 3px;
  border-radius: 2px;
}
.dark :focus-visible { outline-color: var(--sand); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--night); color: var(--stone);
  padding: 12px 20px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 14px; }

.dark { background: var(--night); color: var(--stone); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand span {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .16em;
  line-height: 1;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 15px/1 var(--sans);
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid var(--night);
  background: var(--night);
  color: var(--stone);
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-light { background: var(--stone); color: var(--night); border-color: var(--stone); }
.btn-light:hover { background: var(--sand); border-color: var(--sand); }
.btn-outline { background: transparent; color: var(--stone); border-color: rgba(242, 242, 238, .38); }
.btn-outline:hover { background: rgba(242, 242, 238, .08); border-color: var(--stone); }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 242, 238, .94);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-head.is-scrolled { border-bottom-color: var(--rule); }
.head-in { display: flex; align-items: center; justify-content: space-between; height: var(--head-h); gap: 24px; }

.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 38px); }
.nav a:not(.btn) {
  position: relative;
  text-decoration: none;
  font-size: 15px;
  color: var(--navy);
  padding: 6px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:not(.btn):hover { color: var(--night); }
.nav a:not(.btn):hover::after,
.nav a[aria-current="true"]::after { transform: scaleX(1); }
.nav .btn { padding: 12px 22px; margin-left: 6px; }

.menu-btn {
  display: none;
  align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--night);
  padding: 10px 2px; min-height: 44px;
}
.menu-btn .bars { position: relative; width: 20px; height: 10px; }
.menu-btn .bars::before, .menu-btn .bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-btn .bars::before { top: 0; }
.menu-btn .bars::after { top: 8.5px; }
.menu-btn[aria-expanded="true"] .bars::before { top: 4.25px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { top: 4.25px; transform: rotate(-45deg); }

/* ---------- Type ---------- */
.label {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; font-weight: 500; color: var(--bronze);
  margin-bottom: 26px;
}
.label .num { font-variant-numeric: tabular-nums; }
.label .num::after { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-left: 14px; opacity: .6; }
.dark .label { color: var(--sand); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h2 {
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -.012em;
  max-width: 17ch;
  text-wrap: balance;
}
h2 em, h1 em { font-style: italic; color: var(--bronze); }
.dark h1 em, .dark h2 em { color: var(--sand); }
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--navy); max-width: 58ch; }
.dark .lede { color: var(--on-dark); }

section { padding: clamp(88px, 11vw, 150px) 0; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 7vw, 112px);
  align-items: end;
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 7vw, 96px) 0 0; overflow: hidden; }
.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
}
.hero h1 {
  font-size: clamp(46px, 6.6vw, 96px);
  line-height: .98;
  letter-spacing: -.018em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero-mark { width: clamp(140px, 14vw, 200px); height: auto; opacity: .92; margin-bottom: -4px; }
.hero-sub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px;
  align-items: end;
  margin-top: clamp(28px, 3.6vw, 44px);
}
.hero-sub p { color: var(--on-dark); font-size: clamp(17px, 1.5vw, 19px); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Route diagram */
.route { margin-top: clamp(44px, 5vw, 64px); border-top: 1px solid var(--rule-dark); padding: clamp(20px, 3vw, 36px) 0 clamp(56px, 7vw, 88px); }
.route-art { width: 100%; height: auto; overflow: visible; }
.route-art .arc { fill: none; stroke: var(--sand); stroke-width: 1.5; stroke-linecap: round; }
.route-art .arc-return { fill: none; stroke: rgba(205, 191, 159, .45); stroke-width: 1; stroke-dasharray: 2 7; }
.route-art .grid line { stroke: rgba(242, 242, 238, .07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.route-art .halo { fill: var(--sand); opacity: .14; transform-box: fill-box; transform-origin: center; }
.route-art .node { fill: var(--night); stroke: var(--sand); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.route-art .core { fill: var(--sand); }
.route-art .pulse { fill: var(--stone); }

.route-labels { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.route-labels li { text-align: center; padding: 0 12px; }
.route-labels .role { display: block; font-size: 13px; font-weight: 500; color: var(--sand); margin-bottom: 6px; }
.route-labels strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; color: var(--stone); }
.route-labels .note { display: block; font-size: 15px; color: var(--on-dark-muted); margin-top: 6px; }

@media (prefers-reduced-motion: no-preference) {
  .js .route-art .arc { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
  .js .route-art .reveal, .js .route-labels li { opacity: 0; }
  .js .route-art .pulse { opacity: 0; }
  .js .route-art .arc-return { opacity: 0; }

  .route.is-live .arc { animation: draw 1.8s var(--ease) forwards; }
  .route.is-live .arc.a1 { animation-delay: .5s; }
  .route.is-live .arc.a2 { animation-delay: 1.5s; }
  .route.is-live .arc-return { animation: fade 1.2s 3s forwards, flow 2.4s 3s linear infinite; }
  .route.is-live .reveal { animation: fade .7s forwards; }
  .route.is-live .r1 { animation-delay: .2s; }
  .route.is-live .r2 { animation-delay: 1.3s; }
  .route.is-live .r3 { animation-delay: 2.3s; }
  .route.is-live .route-labels li { animation: rise .8s var(--ease) forwards; }
  .route.is-live .route-labels li:nth-child(1) { animation-delay: .3s; }
  .route.is-live .route-labels li:nth-child(2) { animation-delay: 1.4s; }
  .route.is-live .route-labels li:nth-child(3) { animation-delay: 2.4s; }
  .route.is-live .pulse { animation: fade .4s 3.2s forwards; }
  .route.is-live .halo { animation: breathe 3.6s 3s ease-in-out infinite; }

  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fade { to { opacity: 1; } }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes flow { to { stroke-dashoffset: -18; } }
  @keyframes breathe { 0%, 100% { transform: scale(1); opacity: .14; } 50% { transform: scale(1.6); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .route-art .pulse { display: none; }
}

/* Vertical route (small screens) */
.route-v { display: none; }

/* ---------- Model ---------- */
.model .split { align-items: start; }
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(24px, 3vw, 48px);
  margin-top: clamp(56px, 7vw, 88px);
}
.fact { border-top: 1px solid var(--night); padding-top: 26px; }
.fact h3 { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.05; margin-bottom: 12px; }
.fact p { color: var(--muted); font-size: 16px; max-width: 34ch; }

.support { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.support li { display: flex; gap: 12px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
.support li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--sand); transform: translateY(-2px); }

/* ---------- Stages ---------- */
.stages { background: var(--stone-2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(24px, 3vw, 48px); margin-top: clamp(56px, 7vw, 88px); counter-reset: step; }
.step { position: relative; padding-top: 34px; border-top: 1px solid var(--rule); }
.step::before {
  content: ""; position: absolute; top: -5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%; background: var(--night);
}
.step .n { display: block; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--bronze); margin-bottom: 8px; }
.step h3 { font-size: clamp(34px, 3.4vw, 44px); line-height: 1; margin-bottom: 14px; }
.step p { color: var(--muted); font-size: 16px; max-width: 32ch; }

/* ---------- Regions ---------- */
.regions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(24px, 3vw, 48px); margin-top: clamp(56px, 7vw, 88px); }
.region { border-top: 1px solid var(--night); padding-top: 26px; }
.region .verb {
  display: inline-block; font-size: 13px; font-weight: 500; color: var(--night);
  background: var(--sand); border-radius: 999px; padding: 6px 14px; margin-bottom: 22px;
}
.region h3 { font-size: clamp(32px, 3.2vw, 42px); line-height: 1.02; margin-bottom: 14px; }
.region p { color: var(--muted); font-size: 16px; max-width: 34ch; }

/* ---------- Team ---------- */
.team { padding-top: 0; }
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 52px clamp(16px, 2.4vw, 32px); margin-top: clamp(48px, 6vw, 72px); }
.person .ph { aspect-ratio: 4 / 5; overflow: hidden; background: #111; }
.person img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .6s ease, transform .9s var(--ease);
}
.person:hover img, .person.in-color img { filter: none; }
.person:hover img { transform: scale(1.025); }
.person h3 { font-size: clamp(22px, 2vw, 26px); font-weight: 600; line-height: 1.1; margin-top: 18px; }
.person p { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- Advisors ---------- */
.advisor-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 64px); margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--rule-dark); }
.advisor-list li {
  display: flex; align-items: baseline; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--rule-dark);
  font-family: var(--serif); font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1;
}
.advisor-list .idx { font-family: var(--sans); font-size: 13px; color: var(--sand); font-variant-numeric: tabular-nums; flex: none; width: 22px; }
.advisor-list .hon { color: var(--sand); }

/* ---------- Partners ---------- */
.testimonial { max-width: 1040px; }
.quote {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 3.6vw, 48px); line-height: 1.16; letter-spacing: -.005em;
  text-wrap: pretty;
}
.quote::before { content: "\201C"; display: block; font-size: 1.8em; line-height: .6; color: var(--sand); margin-bottom: 18px; }
.cite { margin-top: 32px; font-size: 16px; display: flex; flex-direction: column; gap: 2px; }
.cite strong { font-weight: 600; }
.cite span { color: var(--muted); }

.partner-names { margin-top: clamp(72px, 9vw, 112px); border-top: 1px solid var(--rule); padding-top: 28px; }
.partner-names h3 { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 26px; }
.partner-names ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 1px solid var(--rule); }
.partner-names li {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 112px; padding: 20px 16px;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.1;
  color: var(--navy);
}
.partner-names li:nth-child(-n+4) { border-top: 1px solid var(--rule); }

/* ---------- Contact ---------- */
.contact { background: var(--stone-2); }
.contact .split { align-items: start; }
.contact .lede { margin-top: 26px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; color: var(--navy); margin-bottom: 8px; }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  font-size: 16px;
  color: var(--night);
  background: var(--stone);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  min-height: 52px;
  transition: border-color .2s, box-shadow .2s;
}
.field select {
  -webkit-appearance: none; appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230E1A33' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  cursor: pointer;
}
.field select:invalid { color: var(--muted); }
.field textarea { min-height: 160px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #B9B8AE; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--night); outline-offset: 2px; border-color: var(--night);
}
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.form-foot small { font-size: 14px; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-foot { padding: clamp(72px, 9vw, 104px) 0 36px; color: var(--on-dark); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.foot-grid .brand span { color: var(--stone); }
.foot-grid p { max-width: 40ch; margin-top: 22px; font-size: 16px; }
.foot-grid h2 { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--sand); margin-bottom: 16px; }
.foot-grid ul { display: grid; gap: 8px; }
.foot-grid a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 16px; padding: 2px 0; transition: color .2s; }
.foot-grid a:hover { color: var(--stone); }
.foot-grid a svg { width: 16px; height: 16px; flex: none; }
.legal {
  margin-top: clamp(56px, 8vw, 88px); padding-top: 24px; border-top: 1px solid var(--rule-dark);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 14px; color: var(--on-dark-muted);
}

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .partner-names ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-names li:nth-child(-n+4) { border-top: 0; }
  .partner-names li:nth-child(-n+2) { border-top: 1px solid var(--rule); }
}

@media (max-width: 900px) {
  :root { --head-h: 68px; }
  .menu-btn { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; top: var(--head-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--stone);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gut) 28px;
    max-height: calc(100vh - var(--head-h)); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { font-family: var(--serif); font-size: 28px; color: var(--night); padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin: 24px 0 0; align-self: flex-start; padding: 15px 26px; }

  .split, .hero-sub, .foot-grid { grid-template-columns: 1fr; }
  .split { align-items: start; }
  .facts, .steps, .regions { grid-template-columns: 1fr; gap: 0; }
  .fact, .step, .region { padding-bottom: 36px; }
  .step { padding-left: 0; }
  .advisor-list { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .hero-top { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .route-art, .route-labels { display: none; }
  .route-v { display: block; position: relative; padding-left: 34px; }
  .route-v::before {
    content: ""; position: absolute; left: 6px; top: 14px; bottom: 14px; width: 1px;
    background: var(--sand); transform-origin: top;
  }
  .route-v li { position: relative; padding: 14px 0 22px; }
  .route-v li::before {
    content: ""; position: absolute; left: -34px; top: 22px;
    width: 13px; height: 13px; border-radius: 50%;
    background: var(--night); border: 1.5px solid var(--sand);
    box-shadow: inset 0 0 0 3px var(--night), inset 0 0 0 7px var(--sand);
  }
  .route-v .role { display: block; font-size: 13px; font-weight: 500; color: var(--sand); }
  .route-v strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; color: var(--stone); }
  .route-v .note { display: block; font-size: 15px; color: var(--on-dark-muted); margin-top: 2px; }

  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 14px; }
  .person h3 { font-size: 20px; margin-top: 14px; }
  .person p { font-size: 14px; }
  .support { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .partner-names li { min-height: 92px; }
  .brand img { height: 34px; }
  .brand span { font-size: 16px; letter-spacing: .13em; }
}

@media (max-width: 680px) and (prefers-reduced-motion: no-preference) {
  .js .route-v::before { transform: scaleY(0); }
  .js .route-v li { opacity: 0; }
  .route.is-live .route-v::before { animation: grow 2.4s .3s var(--ease) forwards; }
  .route.is-live .route-v li { animation: rise .7s var(--ease) forwards; }
  .route.is-live .route-v li:nth-child(1) { animation-delay: .2s; }
  .route.is-live .route-v li:nth-child(2) { animation-delay: 1s; }
  .route.is-live .route-v li:nth-child(3) { animation-delay: 1.8s; }
  @keyframes grow { to { transform: scaleY(1); } }
}

@media (max-width: 400px) {
  .brand { gap: 9px; }
  .brand span { font-size: 14.5px; letter-spacing: .1em; }
  .partner-names li { font-size: 20px; padding: 16px 10px; }
  .actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

abbr[title] { text-decoration: none; border: 0; cursor: help; }
