/* ============================================================
   LAGRETO — Design System
   Light editorial · lavender-tinted · purple accent
   Fraunces (display) · Inter (body) · JetBrains Mono (labels)
   ============================================================ */

/* ── FONTS (self-hosted) ─────────────────────────────────── */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/fraunces.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url('fonts/fraunces-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/inter.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono.woff2') format('woff2');
}

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* surfaces */
  --bg: #F5F2FB;          /* page background — soft lavender white */
  --bg-deep: #ECE6F8;     /* alternating / deeper section */
  --bg-0: rgba(245, 242, 251, 0); /* transparent bg — for smooth gradients */
  --surface: #FFFFFF;     /* cards */
  --surface-2: #FBFAFE;   /* subtle card */
  --ink-invert: #FFFFFF;

  /* ink */
  --ink: #1B1726;         /* primary text — purple-black */
  --ink-soft: #4A4358;    /* secondary text */
  --muted: #7A7388;       /* tertiary / labels on light */

  /* lines */
  --line: #E7E1F2;
  --line-strong: #D6CCEC;

  /* brand */
  --accent: #6C3BAA;
  --accent-2: #DF91DF;
  --accent-deep: #4E2A82;
  --accent-soft: rgba(108, 59, 170, 0.08);
  --accent-soft-2: rgba(108, 59, 170, 0.14);
  --grad: linear-gradient(135deg, #6C3BAA 0%, #DF91DF 100%);
  --grad-soft: linear-gradient(135deg, rgba(108,59,170,0.12) 0%, rgba(223,145,223,0.12) 100%);

  /* type */
  --display: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, monospace;

  /* layout */
  --pad-x: clamp(20px, 5vw, 72px);
  --section-y: clamp(80px, 11vw, 168px);
  --maxw: 1320px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(223,145,223,0.10) 0%, transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(108,59,170,0.07) 0%, transparent 42%);
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

/* ── TYPE ───────────────────────────────────────────────── */
.display {
  font-family: var(--display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.h-xl {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 8.2vw, 138px);
  line-height: 0.94;
  letter-spacing: -0.03em;
}
.h-lg {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 5.2vw, 78px);
  line-height: 1.0;
  letter-spacing: -0.025em;
}
.h-md {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.h-sm {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.serif-italic { font-style: italic; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
}
.body-lg { font-size: 19px; line-height: 1.6; color: var(--ink-soft); }
.muted { color: var(--muted); }

/* mono label — the numbered/section tag aesthetic */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.label-muted { color: var(--muted); }
.idx {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section-sm { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); }
.bg-deep { background: var(--bg-deep); } /* fallback for older browsers */
/* ── SCROLL-DRIVEN BACKGROUND ───────────────────────────── */
/* Modern browsers: body background flows continuously with scroll.
   Sections become transparent — the page is one living canvas. */
@supports (animation-timeline: scroll()) {
  .bg-deep { background: transparent; }

  @keyframes page-breathe {
    0%   { background-color: #F5F2FB; }
    25%  { background-color: #ECE6F8; }
    50%  { background-color: #F5F2FB; }
    75%  { background-color: #ECE6F8; }
    100% { background-color: #F5F2FB; }
  }

  body {
    animation-name: page-breathe;
    animation-duration: 1ms; /* replaced by scroll timeline */
    animation-timing-function: linear;
    animation-timeline: scroll(root);
    animation-fill-mode: both;
  }
}

.divider { height: 1px; background: var(--line); border: 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head .label { display: flex; align-items: center; gap: 12px; }
.section-head .label::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ── NAV ────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), padding 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(245, 242, 251, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: 14px; padding-bottom: 14px;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links > li > a {
  display: inline-block;
  padding: 9px 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 450;
  border-radius: 100px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links > li > a:hover { color: var(--ink); background: var(--accent-soft); }
.nav-links a.active { color: var(--accent); }

.has-dropdown { position: relative; }
.has-dropdown::after {
  content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 18px;
}
.dropdown {
  position: absolute;
  top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 50px -24px rgba(27,23,38,0.22);
  padding: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.has-dropdown:hover .dropdown { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.dropdown a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 11px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.16s var(--ease);
}
.dropdown a:hover { background: var(--accent-soft); }
.dropdown a strong { font-size: 14.5px; font-weight: 550; color: var(--ink); }
.dropdown a span { font-size: 12.5px; color: var(--muted); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink);
  color: #fff !important;
  padding: 11px 20px !important;
  border-radius: 100px;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease) !important;
}
.nav-cta:hover { background: var(--accent) !important; transform: translateY(-1px); }

.nav-phone {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  font-size: 12.5px !important;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-soft) !important;
  text-decoration: none;
  padding: 7px 14px !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 100px !important;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease) !important;
}
.nav-phone:hover {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

.footer-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.22s var(--ease);
}
.footer-phone:hover { color: var(--accent); }
.footer-phone svg { opacity: 0.65; flex-shrink: 0; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; z-index: 1001; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  padding: 96px var(--pad-x) 40px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(-100%);
  transition: transform 0.45s var(--ease);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  font-family: var(--display);
  font-size: 30px; font-weight: 400;
  color: var(--ink); text-decoration: none;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.mobile-menu a.sub { font-family: var(--sans); font-size: 17px; padding-left: 16px; color: var(--ink-soft); }
.mobile-menu .btn { margin-top: 20px; justify-content: center; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 28px;
  border-radius: 100px;
  font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn svg { transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 16px 34px -16px rgba(108,59,170,0.6); }
.btn-grad { background: var(--grad); color: #fff; }
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -16px rgba(108,59,170,0.6); }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-ghost { color: var(--ink); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--accent); }
.btn-lg { padding: 18px 34px; font-size: 16px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; text-decoration: none; color: var(--accent);
  font-size: 15px;
}
.link-arrow svg { transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translate(4px, -4px); }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 3vw, 44px);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), background 0.3s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -34px rgba(27,23,38,0.28); border-color: var(--line-strong); }
/* service product cards: whole card lights up on hover (matches homepage service rows) */
.tier:hover, .addon:hover { background: var(--accent-soft); }

.feature-row {
  display: flex; gap: 12px; align-items: baseline;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 15px; color: var(--ink-soft);
}
.feature-row:first-child { border-top: 0; }
.feature-row .tick {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 10px; transform: translateY(2px);
}

.price {
  font-family: var(--display);
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 400; letter-spacing: -0.02em; line-height: 1;
}
.price-sub { font-size: 14px; color: var(--muted); font-family: var(--sans); }
.price-setup { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

/* ── FOOTER ─────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 96px); padding-bottom: 36px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.footer-brand .h-md { margin-bottom: 18px; max-width: 16ch; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-col a { display: block; text-decoration: none; color: var(--ink-soft); font-size: 15px; padding: 6px 0; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.footer-bottom img { height: 20px; opacity: 0.9; }

/* ── ANIMATED ABSTRACT (pure CSS, zero assets) ──────────── */
/* HOST > .blob-stage[data-parallax] > .blob ×3
   Living lavender gradient cluster: drifts, morphs and rotates. */
.blob-stage { position: absolute; inset: 0; pointer-events: none; overflow: visible; will-change: transform; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(11px) saturate(108%);
  mix-blend-mode: multiply;
  will-change: transform, translate, border-radius;
}
.blob.b1 {
  width: 60%; height: 60%; top: 4%; left: 12%;
  background: radial-gradient(circle at 36% 34%, #D98BE6 0%, #7C44C4 46%, rgba(108,59,170,0.18) 66%, transparent 78%);
  animation: blobMorph1 11s ease-in-out infinite, blobDrift1 14s ease-in-out infinite;
}
.blob.b2 {
  width: 52%; height: 52%; top: 24%; left: 42%;
  background: radial-gradient(circle at 58% 42%, #9A5FE0 0%, #5A2EA0 48%, rgba(78,42,130,0.18) 68%, transparent 80%);
  animation: blobMorph2 13s ease-in-out infinite, blobDrift2 17s ease-in-out infinite;
}
.blob.b3 {
  width: 40%; height: 40%; top: 46%; left: 8%;
  background: radial-gradient(circle at 50% 50%, #C79AF2 0%, #8453C8 50%, rgba(108,59,170,0.16) 70%, transparent 82%);
  animation: blobMorph1 15s ease-in-out infinite reverse, blobDrift2 13s ease-in-out infinite;
}
@keyframes blobMorph1 {
  0%,100% { border-radius: 60% 40% 35% 65% / 55% 35% 65% 45%; transform: rotate(0deg) scale(1); }
  50%     { border-radius: 35% 65% 60% 40% / 45% 60% 40% 55%; transform: rotate(180deg) scale(1.12); }
}
@keyframes blobMorph2 {
  0%,100% { border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%; transform: rotate(0deg) scale(1.06); }
  50%     { border-radius: 65% 35% 40% 60% / 40% 60% 45% 55%; transform: rotate(-170deg) scale(0.92); }
}
@keyframes blobDrift1 { 0%,100% { translate: 0 0; } 50% { translate: 12% -10%; } }
@keyframes blobDrift2 { 0%,100% { translate: 0 0; } 50% { translate: -11% 12%; } }

/* full-bleed hero background variant — blobs spread across the whole header */
/* bottom: -200px extends the stage below the hero so blobs bleed naturally into the page */
.hero-blobs {
  z-index: 0;
  overflow: visible;
  top: 0; left: 0; right: 0;
  bottom: -200px; /* override inset:0 from .blob-stage */
}
.hero-blobs .blob { filter: blur(18px) saturate(106%); opacity: 0.42; }
.hero-blobs .blob.b1 { width: 52%; height: 100%; top: -10%; left: -12%; }
.hero-blobs .blob.b2 { width: 48%; height: 96%; top:   2%; left:  26%; }
.hero-blobs .blob.b3 { width: 46%; height: 96%; top:  -6%; left:  56%; }
.hero-blobs .blob.b4 {
  width: 42%; height: 90%; top: 8%; left: 78%;
  background: radial-gradient(circle at 50% 50%, #B98BEE 0%, #6C3BAA 50%, rgba(108,59,170,0.15) 70%, transparent 82%);
  animation: blobMorph2 14s ease-in-out infinite, blobDrift1 16s ease-in-out infinite;
}

/* keep hero content above the blob field */
#hero, .page-hero { position: relative; }
#hero > .wrap, .page-hero > .wrap { position: relative; z-index: 1; }

/* ── REVEAL / MOTION ────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(34px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  nav .nav-cta { display: none; }
  nav .nav-phone { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── A11Y ───────────────────────────────────────────────── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
