/* ============================================================
   OASIA — design tokens
   A calm, dignified brand for mortgage debtor support.
   Distinct from REVIRAI (B2B burgundy) — Oasia is B2C, warm.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300..700;1,8..60,400&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Surfaces — warm cream paper */
  --bg:           #F4EFE5;      /* page bg, warm ivory */
  --bg-2:         #FBF8F1;      /* card / paper */
  --bg-3:         #ECE5D3;      /* muted band */
  --bg-deep:      #11302D;      /* dark CTA / footer */

  /* Ink */
  --ink:          #1A2030;      /* primary text, deep slate-navy */
  --ink-2:        #5A6273;      /* secondary text */
  --ink-3:        #8C8F99;      /* tertiary, meta */
  --ink-inv:      #F8F4EA;      /* text on dark */

  /* Brand — petrol green, the "oasis" color */
  --petrol:       #1F4F4B;      /* primary brand / actions */
  --petrol-dark:  #143836;
  --petrol-soft:  rgba(31, 79, 75, 0.08);
  --petrol-line:  rgba(31, 79, 75, 0.18);

  /* Accent — warm terracotta, used sparingly (max ~3 places per page) */
  --terra:        #B7654A;
  --terra-soft:   rgba(183, 101, 74, 0.10);

  /* Lines / borders */
  --line:         #E1D8C2;       /* paper line */
  --line-strong:  #C9BFA5;
  --line-dark:    rgba(248, 244, 234, 0.15);

  /* Semantic */
  --success:      #4A7C4E;
  --warning:      #B07A2E;

  /* Type */
  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-sans:    "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Radii — Oasia is warmer than Revirai. Soft, not sharp. */
  --r-sm:    6px;
  --r-md:    12px;
  --r-lg:    20px;
  --r-xl:    28px;
  --r-pill:  9999px;

  /* Shadows — soft warm shadows */
  --shadow-sm:    0 1px 2px rgba(40, 30, 12, 0.04);
  --shadow-md:    0 6px 24px -8px rgba(40, 30, 12, 0.10), 0 2px 6px rgba(40, 30, 12, 0.04);
  --shadow-lg:    0 24px 60px -20px rgba(20, 56, 54, 0.25), 0 8px 24px -12px rgba(40, 30, 12, 0.10);
  --shadow-xl:    0 40px 80px -24px rgba(20, 56, 54, 0.30), 0 16px 40px -16px rgba(40, 30, 12, 0.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "ss01" 1;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

h1 { font-size: clamp(44px, 5.5vw, 76px); letter-spacing: -0.025em; }
h2 { font-size: clamp(34px, 3.6vw, 52px); letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 1.8vw, 28px); letter-spacing: -0.015em; }
h4 { font-size: 18px; line-height: 1.3; }

p { margin: 0; color: var(--ink-2); }

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

button { font-family: var(--font-sans); }

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section-tight { padding: 64px 0; }

.section-paper { background: var(--bg-2); }
.section-band  { background: var(--bg-3); }
.section-dark  { background: var(--bg-deep); color: var(--ink-inv); }
.section-dark p { color: rgba(248, 244, 234, 0.7); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--ink-inv); }

/* ============================================================
   Eyebrow / chip / label
   ============================================================ */

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--petrol);
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--petrol);
}
.eyebrow.terra { color: var(--terra); }
.eyebrow.terra::before { background: var(--terra); }
.eyebrow.light { color: rgba(248, 244, 234, 0.7); }
.eyebrow.light::before { background: var(--terra); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  font-size: 13px; font-weight: 500;
  background: var(--petrol-soft);
  color: var(--petrol);
  border-radius: var(--r-pill);
}

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

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 15px; font-weight: 600;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: var(--font-sans);
}
.btn-lg { padding: 18px 28px; font-size: 16px; }
.btn-sm { padding: 10px 16px; font-size: 14px; }

.btn-primary {
  background: var(--petrol); color: #fff;
  box-shadow: 0 8px 24px -12px rgba(20, 56, 54, 0.5);
}
.btn-primary:hover { background: var(--petrol-dark); transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(20, 56, 54, 0.55); }

.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--ink); }

.btn-soft {
  background: var(--petrol-soft); color: var(--petrol);
}
.btn-soft:hover { background: rgba(31, 79, 75, 0.14); }

.btn-light {
  background: rgba(248, 244, 234, 0.10); color: var(--ink-inv);
  border-color: rgba(248, 244, 234, 0.25);
}
.btn-light:hover { background: rgba(248, 244, 234, 0.18); }

.btn-link {
  background: transparent; color: var(--petrol);
  padding: 4px 0;
}
.btn-link:hover { color: var(--petrol-dark); }

/* ============================================================
   Card
   ============================================================ */

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-flat { background: transparent; border: 1px solid var(--line); }
.card-tinted { background: var(--petrol-soft); border-color: var(--petrol-line); }

/* Decorative — paper grain */
.grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(40,30,12,0.07) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
}

/* ============================================================
   Wordmark
   ============================================================ */

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.wordmark .dot {
  color: var(--petrol);
  font-family: var(--font-sans);
}
.wordmark-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}

/* ============================================================
   Animations
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes softPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.08); opacity: 0.3; }
}

.fade-up { animation: fadeUp 0.7s cubic-bezier(.2,.7,.2,1) both; }
.fade-in { animation: fadeIn 0.7s ease-out both; }

/* ============================================================
   Helpers
   ============================================================ */

.muted { color: var(--ink-2); }
.meta  { color: var(--ink-3); font-size: 13px; }
.mono  { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); }
.lead  { font-size: 19px; line-height: 1.6; color: var(--ink-2); }

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

hr.rule {
  border: none; height: 1px; background: var(--line);
  margin: 32px 0;
}

/* ============================================================
   Custom: scrollbar (light)
   ============================================================ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ============================================================
   RESPONSIVE — tablet & mobile
   Desktop styles are above and untouched.
   Inline styles are overridden via !important only on small screens.
   ============================================================ */

/* ---------- Tablet (≤ 1024px) ---------- */
@media (max-width: 1024px) {
  .container, .container-narrow { padding: 0 24px; }
  .section { padding: 72px 0; }
  .section-tight { padding: 48px 0; }

  /* Header: hide phone button on tablet, keep nav + CTA */
  .header-tel { display: none !important; }
  .header-bar { padding: 16px 24px !important; gap: 16px !important; }
  .header-nav { gap: 16px !important; }

  /* Process: 4 cols → 2 cols, hide horizontal connector */
  .process-steps { grid-template-columns: repeat(2, 1fr) !important; gap: 32px !important; }
  .process-connector { display: none !important; }

  /* Principles: 3 cols → 2 cols, fix dividers */
  .principles-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .principle-cell {
    border-right: 1px solid var(--line) !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .principle-cell[data-i="1"] { border-right: none !important; }
  .principle-cell[data-i="3"] { border-right: none !important; }
  .principle-cell[data-i="4"] { border-bottom: none !important; }
  .principle-cell[data-i="5"] { border-right: none !important; border-bottom: none !important; }

  /* Footer: 4 cols → 2 cols */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
}

/* ---------- Mobile (≤ 768px) ---------- */
@media (max-width: 768px) {
  html, body { font-size: 15px; }

  .container, .container-narrow { padding: 0 20px; }

  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }

  /* Type scale */
  h1 { font-size: clamp(36px, 8.5vw, 48px) !important; }
  h2 { font-size: clamp(28px, 6.5vw, 36px) !important; }
  h3 { font-size: clamp(20px, 4.8vw, 24px) !important; }

  .lead { font-size: 16px; line-height: 1.55; }

  /* Header: hide nav + cta + tel, show burger only */
  .header-bar { padding: 14px 20px !important; gap: 12px !important; }
  .header-nav { display: none !important; }
  .header-tel { display: none !important; }
  .header-cta { display: none !important; }
  .header-burger { display: inline-flex !important; }
  .mobile-menu { display: flex !important; }

  /* Buttons */
  .btn { padding: 12px 18px; font-size: 14px; }
  .btn-lg { padding: 14px 22px; font-size: 15px; }
  .btn-sm { padding: 9px 14px; font-size: 13px; }

  /* Hero stacks */
  .hero-section { padding-top: 110px !important; padding-bottom: 56px !important; }
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    min-height: auto !important;
  }
  .hero-grid h1 { font-size: clamp(40px, 9.5vw, 56px) !important; }
  .hero-grid h1 br { display: none; }
  .hero-grid .card { max-width: 100% !important; width: 100% !important; }

  /* Situations: tabs already scroll. Stack the panel */
  .situation-panel {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  .situation-headline { font-size: 26px !important; }

  /* Process intro 2-col → 1 col */
  .process-intro {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    margin-bottom: 40px !important;
  }
  .process-steps {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* Virtual lawyer */
  .lawyer-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .lawyer-features { grid-template-columns: 1fr !important; }

  /* Principles */
  .principles-intro {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    align-items: start !important;
  }
  .principles-grid { grid-template-columns: 1fr !important; }
  .principle-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    min-height: auto !important;
    padding: 24px !important;
  }
  .principle-cell[data-i="5"] { border-bottom: none !important; }

  /* Team */
  .team-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .team-stats { gap: 24px !important; flex-wrap: wrap; }
  .team-stats > div { flex: 1 1 30%; }

  /* CTA + footer */
  .cta-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .footer-bottom > div:last-child { flex-wrap: wrap !important; gap: 12px !important; }

  /* Assistant FAB & panel — full-width-ish on mobile */
  .assistant-fab {
    bottom: 16px !important;
    right: 16px !important;
    padding: 6px 18px 6px 6px !important;
  }
  .assistant-fab > div:first-child {
    width: 44px !important;
    height: 44px !important;
  }
  .assistant-panel {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: auto !important;
    border-radius: var(--r-xl) var(--r-xl) 0 0 !important;
    max-height: 88vh !important;
  }
}

/* ---------- Small mobile (≤ 480px) ---------- */
@media (max-width: 480px) {
  .container, .container-narrow { padding: 0 16px; }
  .section { padding: 48px 0; }

  .hero-section { padding-top: 96px !important; }

  /* Smaller avatar in hero */
  .hero-grid > div:last-child > div > div:first-child {
    transform: scale(0.78);
    transform-origin: center top;
    margin-bottom: -40px;
  }

  /* CTA section avatar smaller */
  .cta-grid video { width: 100% !important; }

  /* Team stats stacked */
  .team-stats { flex-direction: column !important; gap: 16px !important; }
  .team-stats > div { flex: none !important; }

  /* Tighter situation tabs */
  .situation-headline { font-size: 22px !important; }
}
