/* Amparo — Landing (redesign)
   Tokens mirror apps/web/src/theme.ts. Any color/type change should update both. */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-Variable.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-Italic.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --brand-50: #F5F6F0;
  --brand-100: #E9ECD8;
  --brand-200: #D3DBAF;
  --brand-300: #B8C77F;
  --brand-400: #9AB34D;
  --brand-500: #7C9A2E;
  --brand-600: #617A20;
  --brand-700: #4A5E19;
  --brand-800: #374512;
  --brand-900: #26300D;

  --neutral-bg: #FAF8F2;
  --neutral-surface: #FFFFFF;
  --neutral-border: #E7E0D2;
  --neutral-fg: #262019;
  --neutral-fg-muted: #6B6255;

  --font: 'Plus Jakarta Sans', sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --max-w: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html { scroll-behavior: auto; }
section, .hero { scroll-margin-top: 84px; }

body {
  font-family: var(--font);
  background: var(--neutral-bg);
  color: var(--neutral-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }

h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  max-width: 20ch;
  margin-bottom: var(--space-4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease-in-out), background-color .35s var(--ease-in-out),
    border-color .35s var(--ease-in-out), box-shadow .35s var(--ease-in-out), color .35s var(--ease-in-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); transition-duration: .12s; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-full { width: 100%; }

.btn-solid { background: var(--neutral-fg); color: var(--neutral-bg); box-shadow: 0 0 0 0 transparent; }
.btn-solid:hover { background: var(--brand-700); box-shadow: 0 10px 24px -12px rgb(38 32 25 / 0.45); }

.btn-accent { background: var(--brand-500); color: var(--neutral-fg); box-shadow: 0 0 0 0 transparent; }
.btn-accent:hover { background: var(--brand-400); box-shadow: 0 10px 24px -12px rgb(124 154 46 / 0.4); }

.btn-ghost { background: transparent; color: var(--neutral-fg); border-color: var(--neutral-border); }
.btn-ghost:hover { border-color: var(--neutral-fg); }

.btn-outline { background: transparent; color: var(--neutral-fg); border-color: var(--neutral-fg); }
.btn-outline:hover { background: var(--neutral-fg); color: var(--neutral-bg); }

/* Nav */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--neutral-bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutral-border);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo img { border-radius: 8px; }

.nav-links { display: flex; align-items: center; gap: var(--space-4); }
.nav-links a:not(.btn) {
  position: relative;
  font-size: 15px;
  color: var(--neutral-fg-muted);
  transition: color .3s var(--ease-in-out);
}
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--brand-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-in-out);
}
.nav-links a:not(.btn):hover { color: var(--neutral-fg); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-login { font-weight: 600; color: var(--neutral-fg) !important; }

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--neutral-fg);
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  padding: var(--space-6) 0 var(--space-8);
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 85% 8%, rgb(124 154 46 / 0.16), transparent 70%),
    radial-gradient(45% 45% at 8% 95%, rgb(154 179 77 / 0.12), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-6);
  align-items: center;
}
.hero-content h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  margin-bottom: var(--space-3);
}
.hero-content p {
  font-size: 18px;
  color: var(--neutral-fg-muted);
  max-width: 46ch;
  margin-bottom: var(--space-4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.hero-note { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--neutral-fg-muted); }
.hero-note i { color: var(--brand-500); font-size: 16px; }

.hero-visual { overflow: hidden; border-radius: var(--radius-lg); }
.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgb(38 32 25 / 0.25);
  transition: transform .6s var(--ease-in-out);
}
.hero-visual:hover img { transform: scale(1.04); }

/* Quick wins */
.quick-wins { padding: var(--space-5) 0; border-top: 1px solid var(--neutral-border); border-bottom: 1px solid var(--neutral-border); }
.quick-wins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.win-item {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-2);
  margin: calc(var(--space-2) * -1);
  border-radius: var(--radius-sm);
  transition: background-color .4s var(--ease-in-out);
}
.win-item:hover { background: var(--brand-50); }
.win-item i { font-size: 24px; color: var(--brand-600); flex-shrink: 0; margin-top: 2px; transition: transform .4s var(--ease-in-out); }
.win-item:hover i { transform: scale(1.15) rotate(-4deg); }
.win-item p { font-size: 15px; color: var(--neutral-fg-muted); }
.win-item strong { color: var(--neutral-fg); }

/* Features / bento */
.features { padding: var(--space-8) 0; }
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: var(--space-3);
}
.bento-cell {
  position: relative;
  overflow: hidden;
  background: var(--neutral-surface);
  border: 1px solid var(--neutral-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 108px;
  transition: transform .45s var(--ease-in-out), box-shadow .45s var(--ease-in-out), border-color .45s var(--ease-in-out);
}
.bento-cell:hover {
  transform: translateY(-6px);
  border-color: var(--brand-300);
  box-shadow: 0 24px 44px -24px rgb(38 32 25 / 0.28);
}
.bento-large:hover { border-color: var(--brand-700); }

/* Spotlight that tracks the cursor, set via JS (--mx/--my) on mousemove */
.bento-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgb(124 154 46 / 0.16), transparent 70%);
  opacity: 0;
  transition: opacity .45s var(--ease-in-out);
  pointer-events: none;
}
.bento-cell:hover::before { opacity: 1; }
.bento-large::before {
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.1), transparent 70%);
}
.bento-cell > * { position: relative; z-index: 1; }
.bento-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bento-cell i {
  font-size: 20px;
  color: var(--brand-600);
  flex-shrink: 0;
  transition: transform .45s var(--ease-in-out);
}
.bento-cell:hover i { transform: scale(1.12); }
.bento-cell h3 { font-size: 17px; margin: 0; }
.bento-cell p { color: var(--neutral-fg-muted); font-size: 14px; max-width: 42ch; }

.bento-large {
  grid-row: 1 / 4;
  justify-content: flex-end;
  padding: var(--space-4);
  background: linear-gradient(160deg, var(--neutral-fg) 0%, var(--brand-800) 55%, var(--brand-900) 100%);
  color: var(--neutral-bg);
  min-height: 100%;
  border-color: var(--neutral-fg);
}
.bento-large .bento-head { margin-bottom: var(--space-2); }
.bento-large i { font-size: 26px; }
.bento-large h3 { font-size: 20px; }
.bento-large i { color: var(--brand-300); }
.bento-large p { color: var(--brand-100); }

.bento-tint { background: var(--brand-50); border-color: var(--brand-100); }

/* Portal (split) */
.portal { padding: var(--space-8) 0; background: var(--neutral-surface); border-top: 1px solid var(--neutral-border); border-bottom: 1px solid var(--neutral-border); }
.portal-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: var(--space-6); align-items: center; }
.portal-visual { overflow: hidden; border-radius: var(--radius-lg); max-width: 280px; }
.portal-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .6s var(--ease-in-out);
}
.portal-visual:hover img { transform: scale(1.04); }
.portal-content p { color: var(--neutral-fg-muted); font-size: 17px; max-width: 48ch; margin-bottom: var(--space-3); }
.portal-list { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.portal-list li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.portal-list i { color: var(--brand-600); font-size: 20px; flex-shrink: 0; }

/* Pricing */
.pricing { padding: var(--space-8) 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); align-items: stretch; }
.pricing-card {
  background: var(--neutral-surface);
  border: 1px solid var(--neutral-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .45s var(--ease-in-out), box-shadow .45s var(--ease-in-out);
}
.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 44px -24px rgb(38 32 25 / 0.28);
}
.pricing-featured {
  border-color: var(--brand-500);
  border-width: 2px;
  transform: scale(1.03);
  box-shadow: 0 24px 48px -28px rgb(124 154 46 / 0.35);
}
.pricing-featured:hover { transform: scale(1.03) translateY(-6px); }
@media (max-width: 900px) {
  .pricing-featured, .pricing-featured:hover { transform: none; }
}
.pricing-badge {
  position: absolute;
  top: -13px;
  left: var(--space-4);
  background: var(--brand-500);
  color: var(--neutral-fg);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.pricing-badge-soon { background: var(--neutral-border); color: var(--neutral-fg); }
.pricing-card h3 { font-size: 18px; margin-bottom: var(--space-1); }
.price { font-size: 34px; font-weight: 800; margin-bottom: 6px; }
.price span { font-size: 15px; font-weight: 500; color: var(--neutral-fg-muted); }
.price-quote { font-size: 22px; }
.pricing-desc { color: var(--neutral-fg-muted); font-size: 14px; margin-bottom: var(--space-3); min-height: 40px; }
.pricing-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--space-4); flex-grow: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.pricing-features i { color: var(--brand-600); margin-top: 3px; flex-shrink: 0; }
.pricing-features-soon i { color: var(--neutral-fg-muted); }
.pricing-features-soon li { color: var(--neutral-fg-muted); }

/* Security */
.security { padding: var(--space-8) 0; }
.security-content { text-align: center; }
.security-content h2 { margin-left: auto; margin-right: auto; }
.security-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); text-align: left; margin-top: var(--space-4); }
.security-item { display: flex; gap: var(--space-2); }
.security-item i { font-size: 26px; color: var(--brand-600); flex-shrink: 0; transition: transform .4s var(--ease-in-out); }
.security-item:hover i { transform: scale(1.15) rotate(-4deg); }
.security-item h3 { font-size: 16px; margin-bottom: 4px; }
.security-item p { font-size: 14px; color: var(--neutral-fg-muted); }

/* Final CTA */
.final-cta { padding: var(--space-8) 0; background: var(--neutral-fg); color: var(--neutral-bg); text-align: center; }
.final-cta h2 { color: var(--neutral-bg); margin-left: auto; margin-right: auto; }
.final-cta p { color: color-mix(in srgb, var(--neutral-bg) 75%, transparent); max-width: 46ch; margin: 0 auto var(--space-4); }

/* Dedication */
.dedication { padding: var(--space-8) 0; }
.dedication-grid { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-4); align-items: center; }
.dedication-image { border-radius: var(--radius-md); aspect-ratio: 1; object-fit: cover; }
.dedication p { font-style: italic; font-size: 17px; color: var(--neutral-fg-muted); line-height: 1.7; }

/* Footer */
.footer { padding: var(--space-6) 0 var(--space-4); border-top: 1px solid var(--neutral-border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-4); }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-brand span { font-weight: 700; }
.footer-brand p { width: 100%; color: var(--neutral-fg-muted); font-size: 14px; margin-top: 6px; }
.footer-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--neutral-fg-muted); margin-bottom: var(--space-2); }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 14px; color: var(--neutral-fg-muted); }
.footer-col a:hover { color: var(--neutral-fg); }
.footer-bottom { border-top: 1px solid var(--neutral-border); padding-top: var(--space-3); font-size: 13px; color: var(--neutral-fg-muted); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Only the scroll-triggered page entrance (.reveal) is gated here: content
   sweeping in as you scroll is the classic vestibular-motion trigger WCAG
   2.3.3 targets. Hover/click micro-feedback (button lift, card shadow, nav
   underline, eased anchor scroll) is small-scale and interaction-initiated,
   so it stays on regardless, matching how macOS/Windows "reduce motion"
   itself still keeps button and control feedback alive. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid, .portal-grid { grid-template-columns: 1fr; }
  .portal-visual { order: -1; }
  .bento { grid-template-columns: 1fr; }
  .bento-large { grid-row: auto; min-height: 260px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .security-list { grid-template-columns: 1fr; }
  .quick-wins-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dedication-grid { grid-template-columns: 1fr; text-align: center; }
  .dedication-image { margin: 0 auto; width: 140px; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--neutral-bg);
    border-bottom: 1px solid var(--neutral-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3);
    gap: var(--space-2);
    display: none;
  }
  .nav-links.active { display: flex; }
  .nav-links a.btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
