/* ============================================================
   Carlos Rossi — portfolio
   Visual system ported 1:1 from Velora's landing design tokens
   (src/styles/tokens.css + src/app/globals.css @theme block).
   Brand: navy ink #1B3A6B on warm cream #FAF6EE.
   Type: Fraunces (editorial serif display) + DM Sans (body).
   Static, no build step. GSAP ScrollTrigger via CDN for reveals.
   ============================================================ */

/* ---- Design tokens (Velora-aligned) ---- */
:root {
  /* surfaces */
  --color-bg: #FAF6EE;          /* warm cream — Velora app canvas */
  --color-bg-deep: #0F1F35;     /* deep navy hero ground */
  --color-surface: #FFFFFF;     /* cards */
  --color-surface-subtle: #F1EBDD;

  /* ink ramp (navy at decreasing opacity) */
  --color-ink: #1B3A6B;
  --color-ink-80: rgba(27, 58, 107, 0.80);
  --color-ink-60: rgba(27, 58, 107, 0.60);
  --color-ink-40: rgba(27, 58, 107, 0.40);
  --color-line: rgba(27, 58, 107, 0.12);
  --color-line-strong: rgba(27, 58, 107, 0.22);
  --color-tint: rgba(27, 58, 107, 0.04);
  --color-tint-2: rgba(27, 58, 107, 0.07);

  /* on-dark (cream ink over navy) */
  --color-cream: #FAF6EE;
  --color-cream-deep: #F1EBDD;
  --color-cream-80: rgba(250, 246, 238, 0.80);
  --color-cream-60: rgba(250, 246, 238, 0.62);
  --color-cream-line: rgba(250, 246, 238, 0.14);

  /* accent — Velora "market closing" green for money/positive proof */
  --color-green: #2D7D5F;
  --color-green-soft: #E0EEE7;
  --color-green-on-dark: #7FCFA3;

  /* type */
  --font-serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* radii (Velora editorial scale) */
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* shadows (Velora warm navy-tinted) */
  --shadow-sm: 0 2px 8px rgba(15, 31, 53, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 31, 53, 0.08);
  --shadow-lg: 0 24px 48px rgba(15, 31, 53, 0.12);
  --shadow-hero: 0 30px 60px rgba(15, 31, 53, 0.18);

  /* motion (Velora easings) */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.2, 0.7, 0.2, 1);

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(27, 58, 107, 0.16); }

.serif { font-family: var(--font-serif); font-optical-sizing: auto; }
.mono { font-family: var(--font-mono); }

/* ---- Layout helpers ---- */
.wrap {
  margin-inline: auto;
  width: 100%;
  max-width: var(--maxw);
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(80px, 12vw, 150px); }
.section--tight { padding-block: clamp(56px, 8vw, 96px); }
.divider-top { border-top: 1px solid var(--color-line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-ink-60);
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-ink);
}
.eyebrow.on-dark { color: var(--color-cream-60); }
.eyebrow.on-dark::before { background: var(--color-cream); }

.section-head {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-bottom: clamp(40px, 7vw, 72px);
}
@media (min-width: 880px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    align-items: end;
    gap: 2rem;
  }
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-wrap: balance;
}
.section-sub {
  align-self: end;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.55;
  color: var(--color-ink-80);
  text-wrap: pretty;
}

/* ---- Buttons (Velora pill primitives) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    background-color 0.2s var(--ease-out),
    opacity 0.2s var(--ease-out);
}
.btn-primary {
  background: var(--color-ink);
  color: var(--color-bg);
  box-shadow:
    0 1px 0 rgba(27, 58, 107, 0.10),
    0 10px 24px -12px rgba(27, 58, 107, 0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  opacity: 0.94;
  box-shadow:
    0 1px 0 rgba(27, 58, 107, 0.10),
    0 18px 32px -14px rgba(27, 58, 107, 0.55);
}
.btn-primary:active { transform: translateY(0); }

.btn-on-dark {
  background: var(--color-cream);
  color: var(--color-bg-deep);
  box-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.6);
}
.btn-on-dark:hover { transform: translateY(-1px); background: var(--color-cream-deep); }
.btn-on-dark:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-line-strong);
}
.btn-ghost:hover { background: var(--color-tint); transform: translateY(-1px); }

.btn-ghost.on-dark { color: var(--color-cream); border-color: var(--color-cream-line); }
.btn-ghost.on-dark:hover { background: rgba(250, 246, 238, 0.08); }

.btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* small text link with arrow (Velora surface-card CTA) */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-ink-40);
  transition: text-decoration-color 0.2s var(--ease-out), gap 0.2s var(--ease-out);
}
.link-arrow:hover { text-decoration-color: var(--color-ink); gap: 0.65rem; }
.link-arrow svg { transition: transform 0.2s var(--ease-out); }

/* ---- Badges / chips ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid var(--color-line);
  background: var(--color-tint);
  color: var(--color-ink-80);
}
.badge-green {
  background: var(--color-green-soft);
  color: var(--color-green);
  border-color: rgba(45, 125, 95, 0.18);
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.on-dark {
  background: rgba(250, 246, 238, 0.10);
  color: var(--color-cream);
  border-color: rgba(250, 246, 238, 0.18);
}

/* ============================================================
   NAV — Velora sticky frosted header
   ============================================================ */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, backdrop-filter 0.3s, border-color 0.3s;
}
#nav.solid {
  background: rgba(250, 246, 238, 0.80);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-bottom-color: var(--color-line);
}
.nav-inner {
  margin-inline: auto;
  max-width: var(--maxw);
  height: 72px;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-mark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}
.nav-links { display: none; gap: 2.25rem; }
@media (min-width: 760px) { .nav-links { display: flex; } }
.nav-links a {
  font-size: 0.9375rem;
  color: var(--color-ink-80);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-ink); }
.nav-cta { display: inline-flex; align-items: center; }
.nav-cta .btn { min-height: 42px; padding: 0 1.25rem; font-size: 0.9375rem; }

/* ============================================================
   HERO — giant Fraunces wordmark + italic role line (Velora Hero)
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: clamp(72px, 10vw, 110px);
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(27, 58, 107, 0.05), transparent 60%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg) 55%, rgba(27, 58, 107, 0.04) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(300px, 440px); }
}
.hero-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(3.4rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--color-ink);
}
.hero-role {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--color-ink-80);
  margin-top: 0.55rem;
}
.hero-pitch {
  max-width: 40ch;
  margin-top: clamp(24px, 4vw, 38px);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--color-ink-80);
  text-wrap: pretty;
}
.hero-pitch strong { font-weight: 600; color: var(--color-ink); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: clamp(28px, 4vw, 40px);
}
.hero-avail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  font-size: 0.875rem;
  color: var(--color-ink-60);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 0 0 rgba(45, 125, 95, 0.5);
  animation: pulse 2.2s var(--ease-soft) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 125, 95, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(45, 125, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 125, 95, 0); }
}

/* ============================================================
   SERVICES — Velora surface cards
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
@media (min-width: 820px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: clamp(28px, 3.2vw, 40px);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  background: var(--color-tint);
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out), border-color 0.35s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--color-line-strong);
  box-shadow: 0 18px 44px -16px rgba(27, 58, 107, 0.22);
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-price {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.015em;
  color: var(--color-ink);
}
.card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--color-ink);
}
.card-desc {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-ink-80);
  text-wrap: pretty;
}
.card-meta { font-size: 0.875rem; color: var(--color-ink-60); margin-top: auto; }

/* ============================================================
   CASE STUDY — Velora, dark navy band (deck hero treatment)
   ============================================================ */
.case {
  background: var(--color-bg-deep);
  color: var(--color-cream);
  position: relative;
  overflow: hidden;
}
.case::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 60% at 80% 0%, rgba(127, 207, 163, 0.10), transparent 55%);
  pointer-events: none;
}
.case .wrap { position: relative; }
.case-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.case-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--color-cream);
  text-wrap: balance;
}
.case-lead {
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--color-cream-80);
  max-width: 60ch;
  text-wrap: pretty;
}
.case-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--color-cream-line);
  border: 1px solid var(--color-cream-line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (min-width: 760px) { .case-grid { grid-template-columns: repeat(3, 1fr); } }
.case-cell {
  background: var(--color-bg-deep);
  padding: clamp(24px, 3vw, 34px);
}
.case-cell h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--color-cream);
  margin-bottom: 0.7rem;
}
.case-cell p { font-size: 0.9375rem; line-height: 1.6; color: var(--color-cream-80); }
.case-actions { margin-top: clamp(36px, 5vw, 52px); display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ============================================================
   STACK — chip wall grouped by domain
   ============================================================ */
.stack-groups { display: grid; gap: clamp(28px, 4vw, 40px); }
@media (min-width: 820px) { .stack-groups { grid-template-columns: 1fr 1fr; } }
.stack-group { border-top: 1px solid var(--color-line); padding-top: 1.6rem; }
.stack-group h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-ink-60);
  margin-bottom: 1.1rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-ink-80);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.chip:hover { border-color: var(--color-line-strong); color: var(--color-ink); transform: translateY(-2px); }

/* ============================================================
   CONTACT — closing band on tint (Velora ClosingCTA)
   ============================================================ */
.contact {
  background: var(--color-tint);
  border-top: 1px solid var(--color-line);
  text-align: center;
}
.contact-inner { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.contact-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  max-width: 18ch;
  text-wrap: balance;
}
.contact-sub { max-width: 52ch; color: var(--color-ink-80); font-size: 1.0625rem; line-height: 1.6; }
.contact-meta { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; color: var(--color-ink-60); margin-top: 0.4rem; }

/* ============================================================
   FOOTER (Velora footer row)
   ============================================================ */
footer {
  border-top: 1px solid var(--color-line);
  padding-block: 2.5rem 3rem;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.5rem;
  font-size: 0.875rem;
  color: var(--color-ink-60);
}
.foot-row .sep { color: var(--color-ink-40); }
.foot-row a { transition: color 0.2s; }
.foot-row a:hover { color: var(--color-ink); }
.foot-mail { margin-left: auto; }

/* ============================================================
   SCROLL REVEAL — base state for GSAP; safe fallback if JS/GSAP absent
   ============================================================ */
[data-reveal], [data-hero] { opacity: 1; }
.js [data-reveal] { opacity: 0; transform: translateY(18px); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* hero items are driven by the GSAP timeline (gsap.from) — keep them
   visible as the base so no-GSAP / fallback paths never blank the hero. */
.js [data-hero] { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .pulse-dot { animation: none; }
  .btn, .card, .chip, .link-arrow { transition: none !important; }
}

/* ============================================================
   SKIP LINK — a11y
   ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius-md) 0;
  font-size: 0.9375rem;
}
.skip-link:focus { left: 0; }

/* ============================================================
   HERO — side proof panel: a "terminal" card echoing Velora's
   live MCP surface. Quiet evidence, navy-on-cream, no spectacle.
   ============================================================ */
.hero-lead { max-width: 46rem; }
.hero .wrap { width: 100%; }

.hero-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-card-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface-subtle);
}
.hero-card-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-ink-40); }
.hero-card-bar .label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-ink-60);
}
.hero-card-body {
  padding: 1.2rem 1.25rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--color-ink-80);
}
.hero-card-body .mut { color: var(--color-ink-40); }
.hero-card-body .key { color: var(--color-ink); font-weight: 500; }
.hero-card-body .ok { color: var(--color-green); font-weight: 600; }
.hero-card-body .row { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   PROOF — real product screenshots in editorial browser / device frames
   ============================================================ */
.proof { margin: 0; }
.proof-wide { margin-top: clamp(8px, 2vw, 20px); }
.proof figcaption,
.proof-pair figcaption {
  margin-top: 0.95rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-cream-60);
  max-width: 62ch;
}

/* browser chrome frame */
.browser {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-cream-line);
  background: #0c1a2e;
  box-shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.55);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  background: rgba(250, 246, 238, 0.05);
  border-bottom: 1px solid var(--color-cream-line);
}
.browser-bar .tl { width: 10px; height: 10px; border-radius: 50%; background: rgba(250,246,238,0.22); }
.browser-bar .url {
  margin-left: 0.6rem;
  font-size: 0.75rem;
  color: var(--color-cream-60);
  letter-spacing: 0.03em;
}
.browser img { width: 100%; height: auto; display: block; }

/* secondary pair: desktop browser + phone device */
.proof-pair {
  margin-top: clamp(20px, 3vw, 36px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}
@media (min-width: 860px) {
  .proof-pair { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: end; }
}

/* phone device frame */
.proof-phone { justify-self: center; max-width: 280px; }
.device {
  border-radius: 30px;
  padding: 8px;
  background: linear-gradient(160deg, #16273f, #0a1626);
  border: 1px solid var(--color-cream-line);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.6);
}
.device img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  border: 1px solid rgba(250, 246, 238, 0.06);
}

/* push the case-grid down a touch after the proof block */
.case .case-grid { margin-top: clamp(40px, 6vw, 64px); }

.services-rate { margin-top: 1.6rem; }
.services-rate strong { color: var(--color-ink); }

/* ============================================================
   COPY-EMAIL — microinteraction button
   ============================================================ */
.copy-email {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.copy-email .copy-label { transition: color 0.2s var(--ease-out); }
.copy-email.copied {
  border-color: rgba(45, 125, 95, 0.45);
  background: var(--color-green-soft);
  color: var(--color-green);
}
.contact-actions { justify-content: center; margin-top: 0.4rem; }
