/* =========================================================
   SWELLBRIDGE DIGITAL — Design System
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700;9..144,800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand palette */
  --navy: #0A1F44;
  --navy-deep: #060F2A;
  --navy-soft: #1A2F5C;
  --electric: #2E6BFF;
  --electric-bright: #4F86FF;
  --electric-soft: #E8EFFF;
  --amber: #D4A24C;
  --amber-soft: #F7EFE0;

  /* Backgrounds */
  --bg: #FBF9F5;
  --bg-warm: #F5F1E8;
  --bg-card: #FFFFFF;
  --bg-section: #F2EEE5;

  /* Text */
  --ink: #0A1F44;
  --ink-soft: #3A4566;
  --ink-mute: #6B7388;
  --ink-faint: #9CA3B8;

  /* Borders */
  --line: #E5DFD2;
  --line-soft: #EEEAD F;
  --line-strong: #C9C0A8;

  /* Type */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 9rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(10, 31, 68, 0.04), 0 1px 1px rgba(10, 31, 68, 0.03);
  --shadow-md: 0 4px 16px rgba(10, 31, 68, 0.06), 0 2px 4px rgba(10, 31, 68, 0.04);
  --shadow-lg: 0 24px 48px rgba(10, 31, 68, 0.08), 0 8px 16px rgba(10, 31, 68, 0.04);
  --shadow-xl: 0 40px 80px rgba(10, 31, 68, 0.12);

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* Background texture — subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.12 0 0 0 0 0.27 0 0 0 0.6 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.025;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}
.container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}
.container-wide {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

/* ===== Typography ===== */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--electric);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--electric);
}
.eyebrow.amber { color: var(--amber); }
.eyebrow.amber::before { background: var(--amber); }
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "opsz" 120;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  letter-spacing: -0.028em;
}
h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -0.02em;
}
h4 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 400;
  color: var(--electric);
  font-variation-settings: "opsz" 144;
}
.display-serif {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

p { color: var(--ink-soft); }
p.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
p.large { font-size: 1.125rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 100px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-electric {
  background: var(--electric);
  color: #fff;
}
.btn-electric:hover {
  background: var(--electric-bright);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(46, 107, 255, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1FBB57;
  transform: translateY(-1px);
}
.btn-arrow { transition: transform 0.25s; }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-lg { padding: 1.15rem 2.25rem; font-size: 1rem; }

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 245, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-logo-mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy);
  border-radius: 8px;
  color: #fff;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: var(--electric);
  border-radius: 2px;
}
.nav-cta {
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
}
.nav-toggle {
  display: none;
  width: 32px; height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Mobile nav: hidden everywhere by default */
.nav-mobile {
  display: none;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    background: var(--bg);
    padding: 2rem;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 99;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-mobile.open { display: flex; }
  .nav-mobile a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--ink);
    padding: 0.5rem 0;
  }
}

/* ===== Hero patterns ===== */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 10vw, 7rem);
  position: relative;
  overflow: hidden;
}
.hero-decoration {
  position: absolute;
  pointer-events: none;
  opacity: 0.5;
}

/* ===== Sections ===== */
section { position: relative; }
.section-pad { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-pad-sm { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-dark {
  background: var(--navy);
  color: #F5F1E8;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark p { color: rgba(245, 241, 232, 0.75); }
.section-dark .eyebrow { color: var(--amber); }
.section-dark .eyebrow::before { background: var(--amber); }
.section-warm { background: var(--bg-warm); }
.section-cream { background: var(--bg-section); }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--electric-soft);
}

/* ===== Footer ===== */
.footer {
  background: var(--navy-deep);
  color: rgba(245, 241, 232, 0.7);
  padding: 5rem 0 2.5rem;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer-brand h3 {
  color: #fff;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.footer-brand p {
  color: rgba(245, 241, 232, 0.6);
  font-size: 0.95rem;
  max-width: 320px;
}
.footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-links a {
  font-size: 0.93rem;
  color: rgba(245, 241, 232, 0.6);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--amber); }
.footer-bottom {
  border-top: 1px solid rgba(245, 241, 232, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(245, 241, 232, 0.4);
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Pill / Tag ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--electric-soft);
  color: var(--electric);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 100px;
}
.pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.pill.dark {
  background: var(--navy);
  color: #fff;
}

/* ===== Decorative star (Swellbridge mark) ===== */
.star-mark {
  display: inline-block;
  width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L13.5 9 L24 12 L13.5 15 L12 24 L10.5 15 L0 12 L10.5 9 Z'/></svg>") no-repeat center;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 0 L13.5 9 L24 12 L13.5 15 L12 24 L10.5 15 L0 12 L10.5 9 Z'/></svg>") no-repeat center;
}

/* Utility */
.text-center { text-align: center; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 3rem; }
.mb-sm { margin-bottom: 1rem; }
.mb-md { margin-bottom: 2rem; }
.mb-lg { margin-bottom: 3rem; }
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .container, .container-narrow, .container-wide { padding: 0 1.25rem; }
}

/* ===== Mobile: hide hero collage to prevent overflow ===== */
@media (max-width: 900px) {
  .hero-collage { display: none; }
}

/* ===== Small phone nav fix ===== */
@media (max-width: 600px) {
  .nav-inner {
    padding: 1rem 1.25rem;
    gap: 0;
    justify-content: space-between;
  }
  .nav-toggle {
    display: flex !important;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
  }
  .nav-toggle span {
    width: 22px;
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
  }
  .nav-cta { display: none !important; }
  .nav-links { display: none !important; }
}
