/* ============================================================
   FivePage Studio — Global System
   ============================================================ */

:root {
  /* Color — Dark Navy + Ice Blue */
  --bg: #0B1020;
  --bg-1: #131A2A;
  --bg-2: #1C2540;
  --ink: #F8FAFC;
  --ink-mute: #9EA0A8;
  --ink-dim: #64748B;
  --indigo: #A5B4FC;
  --indigo-soft: #7DD3FC;
  --amber: #F59E0B;
  --green: #10B981;
  --green-bright: #34D399;
  --whatsapp: #25D366;

  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.13);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.06);

  /* Type */
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Motion */
  --tilt: 14deg;

  /* Radius */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
}

* { box-sizing: border-box; }

/* App-feel: no tap flash, no callout, no text selection on UI chrome */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

html {
  height: 100%;
  height: -webkit-fill-available;
}

/* Root app wrapper — height chain so fixed children can resolve 100% */
#root, #root > div {
  height: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Prevent iOS overscroll bounce on the root */
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(165, 180, 252, 0.10), transparent 60%),
    radial-gradient(900px 700px at -10% 30%,  rgba(125, 211, 252, 0.06), transparent 65%),
    radial-gradient(1000px 900px at 50% 110%, rgba(165, 180, 252, 0.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--indigo-soft); color: #0B1020; }

/* ============================================================
   Type
   ============================================================ */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--indigo);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-1px);
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.05; font-weight: 800; }

.h-display {
  font-size: clamp(36px, 9vw, 88px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.h-display em {
  font-style: italic;
  font-weight: 500;
  font-family: "Plus Jakarta Sans", serif;
  color: var(--indigo-soft);
  letter-spacing: -0.02em;
}

.h-section {
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.h-section em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-mute);
}

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-mute);
  max-width: 56ch;
  line-height: 1.55;
}

.mono-num {
  font-family: var(--mono);
  font-feature-settings: "tnum" 1;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding: clamp(32px, 4vw, 64px) 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--hairline);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), background 0.2s, border-color 0.2s, box-shadow 0.25s;
  white-space: nowrap;
  position: relative;
}

.btn-primary {
  background: var(--indigo-soft);
  color: #0B1020;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 10px 30px -10px rgba(125,211,252,0.55);
}
.btn-primary:hover { background: #A5D8F5; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 14px 36px -10px rgba(125,211,252,0.65); }

.btn-outline {
  background: transparent;
  color: var(--indigo-soft);
  border: 1px solid rgba(125,211,252,0.35);
}
.btn-outline:hover { border-color: rgba(125,211,252,0.6); background: rgba(125,211,252,0.06); }

.btn-ghost {
  color: var(--ink-mute);
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--ink); }

.btn .arr { transition: transform 0.25s; }
.btn:hover .arr { transform: translateX(3px); }

/* ============================================================
   Cards / Glass
   ============================================================ */

.glass {
  background: var(--glass-strong);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(11, 16, 32, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--hairline);
  background: rgba(11, 16, 32, 0.92);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 16px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-logo {
  height: 140px;
  width: auto;
  display: block;
  filter: invert(1);
  opacity: 0.92;
  transition: opacity 0.2s;
}
.brand-logo:hover { opacity: 1; }
@media (max-width: 600px) { .brand-logo { height: 88px; } }
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
  display: grid; place-items: center;
  color: white;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 12px -4px rgba(125,211,252,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-mute);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); background: rgba(255,255,255,0.06); }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ============================================================
   Bottom tab bar — app-like mobile navigation
   ============================================================ */

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  display: none; /* shown only on mobile via media query */
  grid-template-columns: repeat(4, 1fr);
  background: rgba(11, 16, 32, 0.94);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid var(--hairline);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 760px) {
  .bottom-nav { display: grid; }
  /* Lift WA button above the tab bar */
  .wa-stick { bottom: calc(72px + env(safe-area-inset-bottom) + 12px); }
  /* Extra footer breathing room so content clears the tab bar */
  .footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
/* Hide tab bar on home route — Swiper dot navigation is used instead */
[data-route="home"] .bottom-nav { display: none !important; }

/* Hide tab bar in landscape — viewport is too short */
@media (orientation: landscape) and (max-height: 500px) {
  .bottom-nav { display: none !important; }
  .wa-stick { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: 64px; }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px 12px;
  color: var(--ink-dim);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item.active {
  color: var(--indigo-soft);
}
.bottom-nav-item svg {
  transition: transform 0.2s cubic-bezier(.2,.8,.2,1);
}
.bottom-nav-item.active svg {
  transform: translateY(-2px);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  padding: 48px 0 80px;
  color: var(--ink-mute);
  font-size: 14px;
}

/* Card wrapper */
/* Outer wrapper: tape containing block — overflow visible so tapes paint freely */
.footer-card-outer {
  position: relative;
  margin-bottom: 20px;
}

.footer-card {
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 40px 40px 36px;
}

/* Tape decorations — center-origin transforms keep visual within layout box (no overflow risk) */
.footer-tape {
  position: absolute;
  width: 70px;
  height: 59px;
  color: var(--indigo-soft);
  opacity: 0.65;
  pointer-events: none;
  z-index: 2;
}
.footer-tape--tl {
  top: -6px;
  left: -6px;
  /* natural orientation */
}
.footer-tape--tr {
  top: -6px;
  right: -6px;
  transform: scaleX(-1);
  /* transform-origin defaults to 50% 50% — mirrors within layout box */
}
.footer-tape--bl {
  bottom: -6px;
  left: -6px;
  transform: scaleY(-1);
}
.footer-tape--br {
  bottom: -6px;
  right: -6px;
  transform: scale(-1, -1);
}

/* Inner layout: brand hard-left, nav hard-right */
.footer-card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.footer-brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 220px;
}
.footer-logo-link {
  display: inline-flex;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.footer-logo-link:hover { opacity: 1; }
.footer-brand-desc {
  color: var(--ink-mute);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

/* Nav columns — row of columns, pushed to the right */
.footer-nav {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-col h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin: 0 0 14px;
  font-family: var(--mono);
  font-weight: 500;
}
.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--ink-mute);
  font-size: 13px;
  transition: color 0.2s;
  white-space: nowrap;
}
.footer-col a:hover { color: var(--ink); }

/* Bottom bar: [copyright + legal links] left | [social icons] right */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-copy {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  white-space: nowrap;
}
.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-legal a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  transition: color 0.2s;
  white-space: nowrap;
}
.footer-legal a:hover { color: var(--ink); }

.footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
}
.footer-social-link {
  color: var(--ink-dim);
  display: grid;
  place-items: center;
  transition: color 0.2s;
}
.footer-social-link:hover { color: var(--ink); }

/* Legacy classes kept in case referenced elsewhere */
.footer-b { display: flex; flex-direction: column; margin-bottom: 48px; }
.footer-grid { display: grid; gap: 32px; }
.footer-grid h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink); margin: 0 0 14px; font-family: var(--mono); font-weight: 500; }
.footer-grid a { display: block; padding: 4px 0; transition: color 0.2s; }
.footer-grid a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .footer-card { padding: 28px 24px; }
  .footer-card-body { flex-direction: column; gap: 28px; }
  .footer-brand { max-width: 100%; }
  .footer-nav { gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-bottom-left { gap: 4px; }
}

@media (max-width: 480px) {
  .footer-nav { gap: 20px; }
  .footer-col a { font-size: 14px; }
}

/* ============================================================
   WhatsApp sticky
   ============================================================ */

.wa-stick {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: var(--whatsapp);
  color: #052E1F;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 12px 32px -8px rgba(37,211,102,0.5), 0 0 0 1px rgba(255,255,255,0.15) inset;
  animation: waBounce 0.8s 1s cubic-bezier(.2,1.6,.4,1) both;
}
.wa-stick:hover { transform: translateY(-2px); transition: transform 0.2s; }
.wa-stick svg { width: 22px; height: 22px; }
@keyframes waBounce {
  0% { transform: translateY(40px) scale(0.7); opacity: 0; }
  60% { transform: translateY(-6px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@media (max-width: 600px) {
  .wa-stick { padding: 14px; }
  .wa-stick .wa-label { display: none; }
}

/* ============================================================
   Reveal on scroll
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(.2,.8,.2,1), transform 0.8s cubic-bezier(.2,.8,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Pills / badges
   ============================================================ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.pill-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green-bright);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.pill-green::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.pill-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.pill-indigo {
  background: rgba(165, 180, 252, 0.12);
  color: var(--indigo-soft);
  border: 1px solid rgba(165, 180, 252, 0.28);
}
.pill-mute {
  background: rgba(255,255,255,0.05);
  color: var(--ink-mute);
  border: 1px solid var(--hairline);
}

/* ============================================================
   Magnetic / interactive
   ============================================================ */

.magnetic { display: inline-block; transition: transform 0.2s cubic-bezier(.2,.8,.2,1); }

/* ============================================================
   Hairline grid backdrop (decorative)
   ============================================================ */

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(165,180,252,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(165,180,252,0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent 70%);
  pointer-events: none;
}
