/* ─────────────────────────────────────────────
   WeDefineApps — main.css
   Base styles, CSS variables, typography, utilities
───────────────────────────────────────────── */

:root {
  --primary:            #F8822E;
  --primary-dark:       #E06A18;
  --primary-light:      #FFF0E6;
  --primary-ultra-light:#FFF8F3;
  --bg:                 #FFFFFF;
  --surface:            #FAFAF9;
  --surface-2:          #F5F4F1;
  --text-primary:       #1A1A1A;
  --text-secondary:     #5C5C5C;
  --text-muted:         #9A9A9A;
  --border:             #E8E6E1;
  --dark:               #111111;
  --dark-surface:       #1C1C1C;
  --radius-sm:          6px;
  --radius-md:          12px;
  --radius-lg:          20px;
  --shadow-sm:          0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:          0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:          0 8px 32px rgba(0,0,0,0.10);
  --font:               'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition:         all 0.2s ease;
  --container-max:      1200px;
  --container-pad:      clamp(1rem, 4vw, 2rem);
}

/* ── 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);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
ul, ol { list-style: none; }

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-secondary); line-height: 1.75; }

/* ── Section Patterns ── */
.section { padding: clamp(4rem, 8vw, 6rem) 0; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}
.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.75;
}

/* ── Colour Utilities ── */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.bg-surface { background: var(--surface); }
.bg-surface-2 { background: var(--surface-2); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 100px;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.4;
}
.btn svg, .btn i { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(248,130,46,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-white:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.btn-lg { font-size: 15px; padding: 13px 28px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Focus styles ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Animate on scroll ── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Stagger delays ── */
.stagger-1 { transition-delay: 0ms; }
.stagger-2 { transition-delay: 80ms; }
.stagger-3 { transition-delay: 160ms; }
.stagger-4 { transition-delay: 240ms; }
.stagger-5 { transition-delay: 320ms; }
.stagger-6 { transition-delay: 400ms; }

/* ── Divider ── */
.divider { width: 100%; height: 1px; background: var(--border); }

/* ── Responsive grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Lucide icon sizing ── */
[data-lucide] { display: inline-block; }
