/* ============================================================
   BASE.CSS — Reset, Custom Properties, Typography, Utilities
   Officerio Static Demo
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background-color: var(--white);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.25s ease;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ---------- Custom Properties ---------- */
:root {
  /* Colors */
  --brand: #0FA8DB;
  --brand-hover: #0D9AC4;
  --brand-light: #E0F4FB;
  --dark: #0D1B2A;
  --body: #374151;
  --grey: #6B7280;
  --light-grey: #9CA3AF;
  --tint: #F0F9FF;
  --border: #E5E7EB;
  --white: #FFFFFF;
  --orange: #EA580C;
  --green: #065F46;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-accent: 'Nunito', sans-serif;

  /* Spacing */
  --section-py: 80px;
  --section-px: 60px;
  --hero-pt: 120px;
  --card-padding: 32px;
  --btn-py: 16px;
  --btn-px: 36px;

  /* Radii */
  --radius-card: 10px;
  --radius-btn: 6px;
  --radius-badge: 8px;
  --radius-tag: 4px;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-card: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 32px rgba(15,168,219,0.12);

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Typography Scale ---------- */

/* Hero H1 — Page titles */
.h1-hero {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.1;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.h1-hero--white {
  color: var(--white);
}

.h1-hero--large {
  font-weight: 800;
  font-size: clamp(42px, 6vw, 72px);
}

/* Section H2 */
.h2-section {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.2;
  color: var(--dark);
}

/* Card H3 */
.h3-card {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.4;
  color: var(--dark);
}

/* Stat Numbers */
.stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(38px, 4vw, 52px);
  color: var(--brand);
  line-height: 1;
}

/* Overline / Label */
.overline {
  font-family: var(--font-accent);
  font-weight: 200;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--brand);
  line-height: 1.4;
}

/* Body text */
.body-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.8;
  color: var(--body);
}

/* Subtext */
.subtext {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--grey);
}

/* Caption */
.caption {
  font-family: var(--font-accent);
  font-weight: 200;
  font-size: 13px;
  color: var(--light-grey);
}

/* Stat label */
.stat-label {
  font-family: var(--font-accent);
  font-weight: 200;
  font-size: 15px;
  color: var(--grey);
  text-align: center;
}

/* ---------- Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--section-py) 0;
}

.section--tint {
  background-color: var(--tint);
}

.section--dark {
  background-color: var(--dark);
}

.section--brand {
  background-color: var(--brand);
}

.section--white {
  background-color: var(--white);
}

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

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

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm { gap: 16px; }
.gap-md { gap: 24px; }
.gap-lg { gap: 40px; }
.gap-xl { gap: 60px; }

.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* F-Pattern: content-heavy left, lighter right */
.f-pattern {
  display: grid;
  grid-template-columns: 55% 1fr;
  gap: 60px;
  align-items: start;
}

.f-pattern--reversed {
  grid-template-columns: 1fr 55%;
}

.f-pattern--60 {
  grid-template-columns: 60% 1fr;
}

.f-pattern--40-55 {
  grid-template-columns: 40% 1fr;
  gap: 48px;
}

.f-pattern--45-50 {
  grid-template-columns: 45% 1fr;
  gap: 48px;
}

/* Spacing helpers */
.mb-xs { margin-bottom: 8px; }
.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 24px; }
.mb-lg { margin-bottom: 40px; }
.mb-xl { margin-bottom: 60px; }

.mt-xs { margin-top: 8px; }
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 40px; }
.mt-xl { margin-top: 60px; }

/* ---------- Scroll Animation Base Classes ---------- */

/* Fade Up (default scroll-trigger) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

/* Fade Up with stagger — children get delay via JS */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-stagger.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* Slide in from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Slide in from right */
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Text Reveal — word by word */
.text-reveal .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  margin-right: 0.25em;
}

.text-reveal .word-inner {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.5s var(--ease-out);
}

.text-reveal.revealed .word-inner {
  transform: translateY(0);
  opacity: 1;
}

/* Text Reveal — line by line */
.text-reveal-line {
  overflow: hidden;
}

.text-reveal-line .line {
  display: block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.7s var(--ease-out), opacity 0.5s var(--ease-out);
}

.text-reveal-line.revealed .line {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- Responsive Breakpoints ---------- */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-px: 32px;
    --section-py: 60px;
    --hero-pt: 80px;
    --card-padding: 24px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .f-pattern,
  .f-pattern--reversed,
  .f-pattern--60,
  .f-pattern--40-55,
  .f-pattern--45-50 {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --section-px: 20px;
    --section-py: 48px;
    --hero-pt: 60px;
    --card-padding: 20px;
    --btn-px: 24px;
    --btn-py: 12px;
  }

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

  .subtext {
    font-size: 16px;
  }

  .overline {
    font-size: 11px;
  }

  /* Reduce animation intensity on mobile */
  .reveal,
  .reveal-left,
  .reveal-right {
    transform: translateY(20px);
  }
  .reveal-left { transform: translateX(-20px); }
  .reveal-right { transform: translateX(20px); }
}
