/* ===========================================================
   Relevo Lab — shared styles (used by subpages)
   Mirrors the homepage system: tokens, nav, footer, cards,
   badge, cursor, motion. Subpages add their own page-level
   styles on top.
   =========================================================== */

:root {
  --bg: #0A0A0A;
  --card: #131313;
  --card-hover: #181818;
  --fg: #F5F3EF;
  --fg-muted: rgba(245, 243, 239, 0.66);
  --fg-dim: rgba(245, 243, 239, 0.42);
  --fg-faint: rgba(245, 243, 239, 0.22);
  --accent: #6BAF97;
  --accent-glow: rgba(107, 175, 151, 0.18);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.18);
  --maxw: 1120px;
  --pad: clamp(24px, 5vw, 64px);
  --serif: "Cormorant Garamond", "Iowan Old Style", "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, rgba(107,175,151,0) 0%, var(--accent) 50%, rgba(107,175,151,0.4) 100%);
  z-index: 1000;
  pointer-events: none;
  transition: width 0.05s linear;
}

/* ---------- Cursor ---------- */
.cursor-follower {
  position: fixed; top: 0; left: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107,175,151,0.85) 0%, rgba(107,175,151,0.25) 45%, transparent 70%);
  pointer-events: none;
  z-index: 199;
  opacity: 0;
  transform: translate(-50%, -50%) translate3d(var(--cx, 0px), var(--cy, 0px), 0);
  transition: opacity 220ms cubic-bezier(.22,.61,.36,1);
  mix-blend-mode: screen;
  will-change: transform, opacity;
}
.cursor-follower.is-on { opacity: 1; }
.cursor-follower.on-card { opacity: 0; }
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 140px; height: 140px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 199;
  background: radial-gradient(circle, rgba(107,175,151,0.32) 0%, rgba(107,175,151,0.10) 38%, transparent 70%);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s cubic-bezier(.22,.61,.36,1);
  opacity: 0;
  will-change: transform, opacity;
}
.cursor-glow.on-card { opacity: 1; }
@media (hover: none), (max-width: 720px) {
  .cursor-follower, .cursor-glow { display: none; }
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  user-select: none;
}
.wordmark .rel {
  font-family: "GFS Didot", "Cormorant Garamond", serif;
  font-weight: 400;
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.01em;
}
.wordmark .lab {
  font-family: "Poppins", var(--sans);
  font-weight: 300;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.06em;
  transform: translateY(-1px);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  z-index: 100;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-links a:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.nav-links a.active { color: var(--fg); background: rgba(255,255,255,0.04); }
.nav-cta {
  margin-left: 6px;
  background: var(--fg);
  color: var(--bg) !important;
  font-weight: 500 !important;
  padding: 9px 16px !important;
  border-radius: 8px !important;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease !important;
}
.nav-cta:hover { background: var(--accent) !important; color: var(--bg) !important; }
@media (max-width: 760px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- Section base ---------- */
section { position: relative; padding: clamp(80px, 12vw, 140px) var(--pad); }
.container { max-width: var(--maxw); margin: 0 auto; position: relative; }

.section-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: inline-block;
}
.section-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--fg);
  max-width: 820px;
  margin-bottom: 22px;
  text-wrap: balance;
}
.section-title em {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.section-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-muted);
  max-width: 660px;
  font-weight: 300;
  margin-bottom: 56px;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.22,.61,.36,1), transform 700ms cubic-bezier(.22,.61,.36,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero badge (used on subpage hero) ---------- */
@property --badge-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes badgeShimmer { to { --badge-angle: 360deg; } }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(107, 175, 151, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(107, 175, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(107, 175, 151, 0); }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  margin-bottom: 32px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: rgba(245, 243, 239, 0.66);
  letter-spacing: -0.005em;
  background:
    linear-gradient(rgba(14, 14, 14, 0.92), rgba(14, 14, 14, 0.92)) padding-box,
    conic-gradient(
      from var(--badge-angle, 0deg),
      rgba(255, 255, 255, 0.06) 0deg,
      rgba(255, 255, 255, 0.06) 70deg,
      rgba(107, 175, 151, 0.95) 95deg,
      rgba(255, 255, 255, 0.06) 130deg,
      rgba(255, 255, 255, 0.06) 360deg
    ) border-box;
  animation: badgeShimmer 5.5s linear infinite;
}
.hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6BAF97;
  flex-shrink: 0;
  animation: pulse 2.4s ease infinite;
}

/* ---------- Card ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 30px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.22,.61,.36,1), border-color 0.4s ease, background 0.35s ease, box-shadow 0.4s ease;
}
.card:hover, .card.is-active {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--card-hover);
  box-shadow: 0 0 0 1px rgba(107,175,151,0.35), 0 12px 40px -20px rgba(107,175,151,0.35);
}
.card-spotlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(107,175,151,0.10), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover .card-spotlight { opacity: 1; }
.card.is-active .card-spotlight {
  opacity: 0.9;
  background: radial-gradient(420px circle at 50% 40%, rgba(107,175,151,0.12), transparent 60%);
}
.card-sweep {
  position: absolute;
  top: 0; bottom: 0;
  left: -40%;
  width: 60%;
  background: linear-gradient(90deg, transparent, rgba(107,175,151,0.12), transparent);
  opacity: 0;
  pointer-events: none;
}
.card.in-view .card-sweep { animation: sweep 1.4s cubic-bezier(.22,.61,.36,1) forwards; }
@keyframes sweep {
  0%   { opacity: 0; left: -40%; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; left: 110%; }
}
.card-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-label .micro-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
.card h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--fg);
  margin-bottom: 16px;
  text-wrap: balance;
}
.card h3 em {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  color: var(--accent);
}
.card p, .card .body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-muted);
  font-weight: 300;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(107,175,151,0.35);
  padding-bottom: 2px;
  width: fit-content;
  transition: border-color 0.25s ease, gap 0.25s ease;
}
.card-link:hover { border-color: var(--accent); gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-primary .arrow { transition: transform 0.3s ease; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-secondary { background: transparent; color: var(--fg); border-color: rgba(245,243,239,0.35); }
.btn-secondary:hover { border-color: var(--fg); background: rgba(245,243,239,0.04); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 48px var(--pad) 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-row.bottom {
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding-top: 24px;
  font-size: 12.5px;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
}
.foot-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot-tag {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--fg-dim);
  font-size: 15px;
}
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.foot-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.2s ease;
}
.foot-links a:hover { color: var(--fg); }
.foot-built {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--fg-muted);
  font-size: 14px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
