/* ============================================================
   base.css — Design system inspired by tars.pro layout patterns
   Container: 1024px sections, 848px card grids, 630px headings
   Spacing: 80px mobile, 140px desktop vertical rhythm
   Cards: 16px radius, subtle shadows
   ============================================================ */

/* ---------- 1. Design Tokens ---------- */

:root {
  /* Text */
  --text-primary: #1D1D1F;
  --text-body: #3D3D3D;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --text-muted: #AEAEB2;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-secondary: #FAFAFA;
  --surface-tertiary: #F5F5F7;

  /* Borders */
  --border: #E5E5EA;
  --border-light: #F0F0F0;

  /* Accent — Apple blue */
  --accent: #007AFF;
  --accent-hover: #0062D9;
  --accent-light: #EFF6FF;
  --accent-text: #1A6FE0;

  /* Button */
  --btn-primary: #1D1D1F;
  --btn-primary-hover: #000000;
  --btn-primary-text: #FFFFFF;

  /* Semantic */
  --success: #34C759;
  --warning: #FF9500;
  --danger: #FF3B30;

  /* Brand */
  --brand-gold: #FFC201;

  /* macOS chrome */
  --mac-red: #FF5F57;
  --mac-yellow: #FEBC2E;
  --mac-green: #28C840;

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radii — tars.pro uses 16px for cards */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 100px;

  /* Spacing — 8px grid, tars.pro-aligned */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;
  --space-5xl: 104px;
  --space-6xl: 140px;
}


/* ---------- 2. Reset ---------- */

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

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; }


/* ---------- 3. Typography ---------- */

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-body);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.15;
}

/* Display: ~48px — section headers (tars.pro h1 equivalent) */
.text-display {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Heading: ~32px — sub-section headers */
h2, .text-heading {
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.025em;
}

/* Title: ~22px — card headers */
h3, .text-title {
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.02em;
}

/* Subtitle: ~18px */
h4, .text-subtitle {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Body large — like tars.pro body-text-l */
.text-body-l {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Body medium — like tars.pro body-text-m */
.text-body-m {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Body small */
.text-body-s {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Gradient text — tars.pro gradient-text-black */
.gradient-text {
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ---------- 4. Layout ---------- */

/* Container: 1024px max like tars.pro sections */
.container {
  max-width: 1024px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* Wide container: 1234px like tars.pro hero */
.container-wide {
  max-width: 1234px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* Narrow container: 630px like tars.pro section headings */
.container-narrow {
  max-width: 630px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Section: 80px mobile, 140px desktop — tars.pro rhythm */
.section {
  padding: var(--space-4xl) 0;
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-6xl) 0;
  }
}

/* Section header block */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  max-width: 630px;
  margin: 0 auto var(--space-2xl);
}

@media (min-width: 1024px) {
  .section-header {
    margin-bottom: var(--space-3xl);
  }
}

.section-header p {
  max-width: 510px;
}


/* ---------- 5. Buttons — tars.pro style ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease-out, transform 100ms ease-out;
}

.btn:active { transform: scale(0.97); }

/* Primary — dark, pill-shaped (tars.pro primary) */
.btn-primary {
  background-color: var(--btn-primary);
  color: var(--btn-primary-text);
  font-size: 15px;
  padding: 14px 28px;
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
}

/* Large primary */
.btn-lg {
  font-size: 16px;
  padding: 16px 36px;
}

/* Outline */
.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  font-size: 15px;
  padding: 14px 28px;
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  background-color: var(--surface-tertiary);
}

/* Accent */
.btn-accent {
  background-color: var(--accent);
  color: white;
  font-size: 15px;
  padding: 14px 28px;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
}


/* ---------- 6. Cards — tars.pro 16px radius ---------- */

.card {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  will-change: transform, box-shadow;
}

/* Dark card — like tars.pro card-black */
.card-dark {
  background-color: var(--text-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-dark h3,
.card-dark h4 {
  color: white;
}

.card-dark p {
  color: rgba(255, 255, 255, 0.7);
}


/* ---------- 7. Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--surface-tertiary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.badge-accent {
  color: var(--accent-text);
  background-color: var(--accent-light);
}


/* ---------- GSAP reveal helper ---------- */

.reveal { visibility: hidden; }


/* ---------- 8. Responsive ---------- */

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