/* ============================================================
   Constantin Vermoere — ELEVATION LAYER (v1)
   Loaded after styles.css. Keeps the cream/editorial DNA,
   raises craft: type, rhythm, motion, micro-interactions.
   New homepage components use cv- / hero2- / vx- prefixes so
   nothing here collides with the shared base system.
   ============================================================ */

:root {
  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 0.45s;
  --dur-2: 0.7s;
  --dur-3: 1.1s;
  /* surfaces */
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-s: 0 2px 10px rgba(15, 20, 25, 0.06);
  --shadow-m: 0 18px 44px rgba(15, 20, 25, 0.12);
  --shadow-l: 0 40px 90px rgba(15, 20, 25, 0.18);
  --accent-wash: color-mix(in srgb, var(--accent) 8%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 28%, transparent);
}

html[data-theme="dark"] {
  --shadow-s: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-m: 0 18px 44px rgba(0, 0, 0, 0.5);
  --shadow-l: 0 40px 90px rgba(0, 0, 0, 0.6);
}

/* ---------- motion primitives ---------- */

/* clip + rise reveal, richer than the base .reveal.
   Hidden initial states are gated behind html.js so that, without
   JavaScript, all content stays visible (and there is no flash). */
.cv-rise {
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  will-change: transform, opacity;
}
html.js .cv-rise:not(.in) { opacity: 0; transform: translateY(34px); }

/* line-mask reveal: wrap text in .cv-mask > span */
.cv-mask { display: block; overflow: hidden; }
.cv-mask > span {
  display: block;
  transition: transform var(--dur-3) var(--ease);
  will-change: transform;
}
html.js .cv-mask:not(.in) > span { transform: translateY(110%); }

/* staggered children: set --i on each child */
[data-stagger] > * {
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js [data-stagger]:not(.in) > * { opacity: 0; transform: translateY(26px); }

@media (prefers-reduced-motion: reduce) {
  .cv-rise, .cv-mask > span, [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   HERO (cinematic)
   ============================================================ */

.hero2 {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 6vw, 80px);
  overflow: clip;
}

/* giant ghosted wordmark behind everything (Runway-inspired) */
.hero2-watermark {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: clamp(7rem, 27vw, 24rem);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--ink);
  opacity: 0.035;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
html[data-theme="dark"] .hero2-watermark { opacity: 0.05; }

/* soft radial wash to give the hero depth */
.hero2::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 80%;
  background: radial-gradient(60% 60% at 70% 20%, var(--accent-wash), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero2-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  min-height: min(76vh, 760px);
}

.hero2-eyebrow { margin-bottom: 26px; }

.hero2-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 10.5vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  margin: 0 0 30px;
}
.hero2-title em { font-style: normal; color: var(--accent); }

.hero2-lede {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 34px;
}

/* stats strip */
.hero2-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(22px, 4vw, 48px);
  margin-bottom: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero2-stat { display: flex; flex-direction: column; gap: 4px; }
.hero2-stat b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.hero2-stat span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.hero2-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero2-socials {
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero2-socials a { text-decoration: none; color: var(--ink-mute); transition: color 0.2s ease; position: relative; }
.hero2-socials a::after {
  content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.hero2-socials a:hover { color: var(--accent); }
.hero2-socials a:hover::after { transform: scaleX(1); transform-origin: left; }

/* portrait, framed, with a drifting accent plate behind */
.hero2-portrait { position: relative; justify-self: end; width: 100%; max-width: 420px; }
.hero2-portrait::before {
  content: '';
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-m);
  z-index: 0;
  transition: transform var(--dur-2) var(--ease);
}
.hero2-portrait:hover::before { transform: translate(6px, 6px); }
.hero2-portrait .frame {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-m);
}
.hero2-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform var(--dur-3) var(--ease);
}
.hero2-portrait:hover img { transform: scale(1.06); }

/* corner caption on the portrait */
.hero2-portrait .tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  backdrop-filter: blur(6px);
  padding: 7px 12px;
  border-radius: 999px;
}

/* scroll cue */
.hero2-scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
}
.hero2-scroll i {
  width: 1px; height: 34px; background: var(--line); position: relative; overflow: hidden;
}
.hero2-scroll i::after {
  content: ''; position: absolute; top: -34px; left: 0; width: 1px; height: 34px;
  background: var(--accent); animation: cvScroll 2.1s var(--ease-in-out) infinite;
}
@keyframes cvScroll { to { top: 34px; } }

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

@media (max-width: 920px) {
  .hero2-inner { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
  .hero2-portrait { justify-self: start; max-width: 360px; order: -1; }
  .hero2-scroll { display: none; }
}

/* ============================================================
   SECTION RHYTHM + HEADING WATERMARK NUMERALS
   ============================================================ */

.cv-section-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 52px;
}
.cv-index {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ============================================================
   VENTURES — showcase
   ============================================================ */

/* feature (SMOVE.CITY) device showcase with parallax plates */
.vx-feature {
  position: relative;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(36px, 5vw, 60px) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.vx-feature h3 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.02;
  margin: 16px 0 16px;
}
.vx-feature .vx-lede { color: var(--ink-soft); max-width: 42ch; margin-bottom: 24px; font-size: 1.05rem; }
.vx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.vx-chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.vx-feature:hover .vx-chip { border-color: var(--accent-line); }

/* single current app graphic (matches the live smove.city hero) */
.vx-appshot { position: relative; }
.vx-appshot img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--dur-2) var(--ease);
  will-change: transform;
}
.vx-feature:hover .vx-appshot img { transform: translateY(-6px) scale(1.012); }
@media (max-width: 920px) { .vx-appshot { max-width: 540px; } }

.vx-phones {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  perspective: 1200px;
}
.vx-phones img {
  width: 100%;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-m);
  object-fit: cover;
  object-position: top;
  aspect-ratio: 9 / 19;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
  will-change: transform;
}
.vx-phones img:nth-child(1) { transform: translateY(16px); }
.vx-phones img:nth-child(3) { transform: translateY(16px); }
.vx-feature:hover .vx-phones img:nth-child(1) { transform: translateY(6px) rotate(-1.2deg); }
.vx-feature:hover .vx-phones img:nth-child(2) { transform: translateY(-8px); box-shadow: var(--shadow-l); }
.vx-feature:hover .vx-phones img:nth-child(3) { transform: translateY(6px) rotate(1.2deg); }

.vx-view {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
}
.vx-view .arr { transition: transform 0.3s var(--ease); }
.vx-feature:hover .vx-view { color: var(--accent); border-color: var(--accent); gap: 14px; }
.vx-feature:hover .vx-view .arr { transform: translateX(4px); }

/* index rows, elevated */
.vx-list { border-top: 1px solid var(--line); margin-top: 8px; }
.vx-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px 168px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 26px 20px;
  margin: 0 -20px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-m);
  text-decoration: none;
  overflow: hidden;
  transition: background 0.35s var(--ease);
}
.vx-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s var(--ease);
}
.vx-row:hover { background: var(--white); }
.vx-row:hover::before { transform: scaleY(1); transform-origin: top; }

.vx-row .vx-num { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-mute); }
.vx-row .vx-thumb-wrap { width: 168px; height: 108px; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); }
.vx-row .vx-thumb {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.5s var(--ease);
}
.vx-row:hover .vx-thumb { transform: scale(1.06); }
.vx-row .vx-name { font-family: var(--serif); font-size: 1.65rem; line-height: 1.1; }
.vx-row .vx-sub { display: block; font-family: var(--sans); font-size: 0.95rem; color: var(--ink-mute); margin-top: 2px; }
.vx-row .vx-role {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); display: inline-flex; align-items: center; gap: 10px;
}
.vx-row .vx-role .arr { opacity: 0; transform: translateX(-6px); transition: all 0.3s var(--ease); color: var(--accent); }
.vx-row:hover .vx-role .arr { opacity: 1; transform: translateX(0); }

@media (max-width: 920px) {
  .vx-feature { grid-template-columns: 1fr; }
  .vx-phones { max-width: 460px; }
  .vx-row { grid-template-columns: 38px 108px 1fr; gap: 16px; row-gap: 6px; }
  .vx-row .vx-thumb-wrap { width: 108px; height: 72px; }
  .vx-row .vx-name { font-size: 1.35rem; }
  .vx-row .vx-role { grid-column: 2 / -1; }
}

/* ============================================================
   MICRO-INTERACTIONS (global polish, safe for all pages)
   ============================================================ */

/* magnetic buttons get a smooth transform transition (JS moves them) */
.btn { transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--ease); }

/* refined image hover on existing timeline/news thumbs */
.tl-photo, .news-item img { will-change: transform; }

/* section divider watermark (optional, used between major sections) */
.cv-divider {
  position: relative;
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* ============================================================
   CONTACT — elevated
   ============================================================ */

.cv-contact { position: relative; overflow: clip; }
.cv-contact .cv-bigmark {
  position: absolute;
  left: 50%; bottom: -8%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(6rem, 22vw, 20rem);
  line-height: 0.8;
  color: var(--ink);
  opacity: 0.03;
  pointer-events: none;
  white-space: nowrap;
}
