/* ===========================
   A4 Estudio — Global Styles
   Design System Tokens + Base
   =========================== */

/* ---- DESIGN TOKENS ---- */
:root {
  /* Colors */
  --color-black: #1a1a1a;
  --color-white: #ffffff;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-500: #737373;
  --color-gray-700: #404040;
  --color-gray-900: #171717;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --text-xs: 13px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: clamp(1.5rem, 3vw, 2rem);
  --text-3xl: clamp(2rem, 5vw, 3rem);
  --text-4xl: clamp(2.5rem, 6vw, 4rem);
  --text-display: clamp(2.5rem, 7vw, 5rem);

  /* Font weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 60px;
  --space-2xl: 80px;
  --space-3xl: 120px;

  /* Layout */
  --header-height: 80px;
  --container-padding: 60px;
  --section-padding: 100px;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 50px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-white);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Override WordPress global styles that may constrain width */
body .wp-site-blocks,
body .entry-content,
body .is-layout-constrained {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ---- BASE ELEMENTS ---- */
a {
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.7;
}

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

ul, ol {
  list-style: none;
}

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

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-light);
  line-height: 1.2;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  font-family: var(--font-body);
  line-height: 1.7;
}

.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-muted { color: var(--color-gray-500); }
.text-center { text-align: center; }

/* ---- BUTTONS ---- */

/* Primary: dark bg, white text, pill shape */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  opacity: 0.85;
}

/* Secondary: white bg, dark text */
.btn-secondary {
  background: var(--color-white);
  color: var(--color-black);
}

.btn-secondary:hover {
  opacity: 0.85;
}

/* Outline: transparent bg, border */
.btn-outline {
  background: transparent;
  color: var(--color-black);
  border: 1px solid var(--color-gray-300);
}

.btn-outline:hover {
  border-color: var(--color-black);
  opacity: 1;
}

/* Ghost: just text with underline */
.btn-ghost {
  background: transparent;
  color: var(--color-black);
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--color-gray-300);
  padding-bottom: 6px;
}

.btn-ghost:hover {
  border-color: var(--color-black);
  opacity: 1;
}

/* Button sizes */
.btn-sm {
  font-size: var(--text-sm);
  padding: 8px 20px;
}

.btn-lg {
  font-size: var(--text-lg);
  padding: 16px 36px;
}

/* Inverted (for dark backgrounds) */
.btn-primary.btn-inverted {
  background: var(--color-white);
  color: var(--color-black);
}

.btn-outline.btn-inverted {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline.btn-inverted:hover {
  border-color: var(--color-white);
}

.btn-ghost.btn-inverted {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-ghost.btn-inverted:hover {
  border-color: var(--color-white);
}

/* ---- LAYOUT ---- */

/* Full-width section with inner padding */
.section {
  width: 100%;
  padding: var(--section-padding) var(--container-padding);
}

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

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-white);
}

.section-light {
  background: var(--color-gray-100);
}

/* Page content starts below fixed header */
.page-main {
  padding-top: var(--header-height);
}

/* Section header pattern */
.section-header {
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--color-gray-500);
  font-size: var(--text-lg);
  max-width: 600px;
}

/* ---- CARDS ---- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: var(--space-md);
}

.card-body h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

.card-body p {
  color: var(--color-gray-500);
  font-size: var(--text-sm);
}

/* ---- GRID ---- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

/* ---- DIVIDER ---- */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-gray-200);
  border: none;
}

.divider-dark {
  background: rgba(255, 255, 255, 0.08);
}

/* ---- SCREEN READER ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 768px) {
  :root {
    --container-padding: 24px;
    --header-height: 64px;
    --section-padding: 60px;
    --space-xl: 40px;
    --space-2xl: 48px;
    --space-3xl: 60px;
  }

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

@media (max-width: 480px) {
  :root {
    --container-padding: 16px;
    --space-xl: 32px;
    --space-2xl: 40px;
    --space-3xl: 48px;
  }

  .btn-lg {
    padding: 14px 28px;
    font-size: var(--text-base);
  }
}
