/* ============================================================
   PAPA IN PROGRESS — Design System
   Tokens, typography, utilities
   ============================================================ */

/* --- Color Tokens --- */
:root {
  /* Primary palette */
  --color-navy:       #1E3A5F;   /* Ocean Ink — primary, authority */
  --color-navy-dark:  #142840;   /* Deep navy for hover states */
  --color-navy-light: #2A4F80;   /* Lighter navy for accents */

  /* Accent */
  --color-clay:       #C4876A;   /* Warm Clay — warmth, energy */
  --color-clay-dark:  #A36B52;   /* Hover state */
  --color-clay-light: #D9A88A;   /* Muted accent */

  /* Neutral backgrounds */
  --color-linen:      #F5F0E8;   /* Main background */
  --color-cloud:      #FAFAF7;   /* Card / elevated surfaces */
  --color-sand:       #D4C5A9;   /* Borders, dividers */
  --color-sand-light: #EDE4D3;   /* Subtle section backgrounds */

  /* Supporting */
  --color-sky:        #B8C9D9;   /* Misty Sky — decorative */
  --color-periwinkle: #8B9DC3;   /* Dusty Periwinkle — secondary accent */
  --color-forest:     #4A6741;   /* Forest Green — avatar/decorative accent */

  /* Text */
  --color-text:       #1A1A1A;
  --color-text-muted: #5A5A5A;
  --color-text-light: #8A8A8A;
  --color-text-invert:#FAFAF7;

  /* Semantic */
  --color-success:    #2D7A4F;
  --color-error:      #C0392B;
  --color-warning:    #E67E22;

  /* Warm tints */
  --color-clay-tint:  #F0DDD0;   /* Very light clay — warm section backgrounds */

  /* --- Typography --- */
  --font-display: 'Fraunces', Georgia, serif;    /* Editorial serif — hero headlines */
  --font-heading: 'Barlow', 'Barlow Condensed', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Type scale */
  --text-xs:    0.75rem;   /* 12px */
  --text-sm:    0.875rem;  /* 14px */
  --text-base:  1rem;      /* 16px */
  --text-lg:    1.125rem;  /* 18px */
  --text-xl:    1.25rem;   /* 20px */
  --text-2xl:   1.5rem;    /* 24px */
  --text-3xl:   1.875rem;  /* 30px */
  --text-4xl:   2.25rem;   /* 36px */
  --text-5xl:   3rem;      /* 48px */
  --text-6xl:   3.75rem;   /* 60px */
  --text-7xl:   4.5rem;    /* 72px */

  /* Line heights */
  --leading-tight:  1.2;
  --leading-snug:   1.375;
  --leading-normal: 1.6;
  --leading-relaxed:1.75;

  /* Letter spacing */
  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.05em;
  --tracking-wider:   0.1em;
  --tracking-widest:  0.15em;

  /* --- Spacing --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;

  /* --- Border radius --- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:  0 1px 3px rgba(30, 58, 95, 0.08);
  --shadow-md:  0 4px 16px rgba(30, 58, 95, 0.10);
  --shadow-lg:  0 8px 32px rgba(30, 58, 95, 0.14);
  --shadow-xl:  0 16px 48px rgba(30, 58, 95, 0.18);

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* --- Layout --- */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-linen);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */

.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }
.text-5xl  { font-size: var(--text-5xl); }
.text-6xl  { font-size: var(--text-6xl); }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-black    { font-weight: 900; }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: var(--tracking-widest); }
.tracking-wider  { letter-spacing: var(--tracking-wider); }

.text-navy   { color: var(--color-navy); }
.text-clay   { color: var(--color-clay); }
.text-muted  { color: var(--color-text-muted); }
.text-light  { color: var(--color-text-light); }
.text-invert { color: var(--color-text-invert); }
.text-white  { color: #fff; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-sm  { max-width: var(--container-sm); }
.container-md  { max-width: var(--container-md); }
.container-lg  { max-width: var(--container-lg); }
.container-2xl { max-width: var(--container-2xl); }

.section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section-sm {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

/* Flex */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: var(--space-2); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* Grid */
.grid          { display: grid; }
.grid-2        { grid-template-columns: repeat(2, 1fr); }
.grid-3        { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-clay);
  color: #fff;
  box-shadow: 0 4px 16px rgba(196, 135, 106, 0.35);
}

.btn-primary:hover {
  background: var(--color-clay-dark);
  box-shadow: 0 6px 24px rgba(196, 135, 106, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--color-navy);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: var(--color-navy-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
}

.btn-outline:hover {
  background: var(--color-navy);
  color: #fff;
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

.btn-block { width: 100%; }

/* Loading state */
.btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--space-2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-cloud);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-sand);
  padding: var(--space-8);
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-navy {
  background: var(--color-navy);
  color: var(--color-text-invert);
  border-color: var(--color-navy-light);
}

.card-featured {
  border: 2px solid var(--color-clay);
  position: relative;
}

/* ============================================================
   SECTION LABELS / EYEBROWS
   ============================================================ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-clay);
  margin-bottom: var(--space-4);
  padding-left: var(--space-3);
  border-left: 3px solid var(--color-clay);
}

.eyebrow-navy {
  color: var(--color-navy);
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.badge-clay {
  background: rgba(196, 135, 106, 0.15);
  color: var(--color-clay-dark);
}

.badge-navy {
  background: rgba(30, 58, 95, 0.1);
  color: var(--color-navy);
}

.badge-success {
  background: rgba(45, 122, 79, 0.12);
  color: var(--color-success);
}

/* ============================================================
   DIVIDERS
   ============================================================ */

.divider {
  width: 60px;
  height: 4px;
  background: var(--color-clay);
  border-radius: var(--radius-full);
  margin: var(--space-6) 0;
}

.divider-center {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form-input {
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-cloud);
  border: 2px solid var(--color-sand);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--color-navy);
}

.form-input::placeholder {
  color: var(--color-text-light);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--color-error);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */

@media (max-width: 768px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .text-5xl { font-size: var(--text-4xl); }
  .text-6xl { font-size: var(--text-5xl); }
  .text-7xl { font-size: var(--text-5xl); }

  .hide-mobile { display: none; }
}

@media (max-width: 1024px) {
  .hide-tablet { display: none; }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-linen); }
::-webkit-scrollbar-thumb {
  background: var(--color-sand);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-clay); }

/* ============================================================
   SELECTION
   ============================================================ */

::selection {
  background: rgba(196, 135, 106, 0.3);
  color: var(--color-text);
}

/* ============================================================
   LEGAL / DISCLAIMER BANNER
   ============================================================ */

.disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
  padding: var(--space-4);
  border: 1px solid var(--color-sand);
  border-radius: var(--radius-md);
  background: var(--color-sand-light);
}
