/* @font-face {
  font-family: "Kelin Eator";
  src: url("../assets/fonts/KelinEator.woff2") format("woff2"),
       url("../assets/fonts/KelinEator.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
} */

/* ==========================================================
   CALA CREATIVE AGENCY — Global Design System
   v1.0.0 — Dallas Fort Worth, TX
   ========================================================== */

/* --- Design Tokens --- */
:root {
  /* === Brand Colors === */
  --cream: #f8f7f2;
  --sand: #ede8df;
  --sand-deep: #ddd6ca;
  --light-brown: #574944;
  --brown: #3d302b;
  --green: #EBD391;
  --green-dark: #d1ba7b;
  --green-light: #fbf7e8;
  --mist: #b8c4c8;
  --mist-light: #d4dde1;
  --ink: #1a1614;
  --white: #fff;

  /* Semantic aliases */
  --bg-primary: var(--cream);
  --bg-alt: var(--sand);
  --bg-dark: var(--ink);
  --bg-brown: var(--light-brown);
  --text-primary: var(--ink);
  --text-muted: var(--light-brown);
  --text-light: var(--cream);
  --accent: var(--green);

  /* === Typography === */
  --font-display: "Outfit", "DM Sans", "Helvetica Neue", sans-serif;
  --font-serif: "Cormorant Garamond", "Georgia", serif;
  --font-sans: "DM Sans", "Helvetica Neue", sans-serif;
  --font-script: "Monsieur La Doulaise", "Halimum", "Brush Script MT", cursive;

  /* Fluid type scale */
  --text-xs: clamp(0.625rem, 0.5vw + 0.5rem, 0.75rem);
  --text-sm: clamp(0.8rem, 0.5vw + 0.65rem, 0.875rem);
  --text-base: clamp(0.9375rem, 0.4vw + 0.8rem, 1rem);
  --text-lg: clamp(1.0625rem, 0.5vw + 0.9rem, 1.25rem);
  --text-xl: clamp(1.25rem, 1vw + 1rem, 1.5rem);
  --text-2xl: clamp(1.5rem, 2vw + 1rem, 2rem);
  --text-3xl: clamp(1.875rem, 2.5vw + 1rem, 2.5rem);
  --text-4xl: clamp(2.25rem, 3vw + 1rem, 3.25rem);
  --text-5xl: clamp(2.75rem, 4vw + 1rem, 4.25rem);
  --text-6xl: clamp(3.25rem, 5.5vw + 1rem, 5.5rem);
  --text-hero: clamp(3.5rem, 7.5vw + 1rem, 8rem);

  /* === Spacing === */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  /* Section vertical padding */
  --section-py: clamp(5rem, 10vw, 10rem);
  --section-py-sm: clamp(3rem, 6vw, 6rem);

  /* === Layout === */
  --container-max: 1280px;
  --container-px: clamp(1.5rem, 5vw, 5rem);

  /* === Borders === */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 40px;
  --radius-full: 9999px;
  --border-color: rgb(87 73 68 / 15%);

  /* === Shadows === */
  --shadow-sm:
    0 1px 3px rgb(26 22 20 / 6%), 0 1px 2px rgb(26 22 20 / 4%);
  --shadow-md:
    0 4px 16px rgb(26 22 20 / 8%), 0 2px 6px rgb(26 22 20 / 4%);
  --shadow-lg:
    0 12px 40px rgb(26 22 20 / 10%), 0 4px 12px rgb(26 22 20 / 6%);
  --shadow-xl:
    0 24px 64px rgb(26 22 20 / 14%), 0 8px 24px rgb(26 22 20 / 8%);

  /* === Transitions === */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 180ms;
  --dur-base: 300ms;
  --dur-slow: 500ms;
  --dur-slower: 700ms;
  --dur-slowest: 1000ms;

  /* === Z-index === */
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
}

/* ==========================================================
   RESET
   ========================================================== */

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  font-size: 16px;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
}

img,
video,
svg,
picture {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================
   TYPOGRAPHY BASE — Fluid & Overflow Protected
   ========================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

p {
  max-width: 68ch;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

strong {
  font-weight: 600;
}

/* Display — hero headline */
.type-display {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* Display serif — section headings */
.type-h1 {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.type-h2 {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.type-h3 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.type-h4 {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Body large */
.type-body-lg {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-muted);
}

/* Body */
.type-body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
}

/* Label / eyebrow */
.type-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-brown);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.type-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--green);
  flex-shrink: 0;
}

/* Light variant */
.type-label--light {
  color: var(--mist-light);
}

.type-label--light::before {
  background: var(--mist-light);
}

/* ==========================================================
   LAYOUT
   ========================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.section {
  padding-block: var(--section-py);
  position: relative;
  z-index: 2;
  background-color: var(--bg-primary);
}

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

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

/* Flex */
.flex {
  display: flex;
}

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

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

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

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

.gap-2 {
  gap: var(--sp-2);
}

.gap-4 {
  gap: var(--sp-4);
}

.gap-6 {
  gap: var(--sp-6);
}

.gap-8 {
  gap: var(--sp-8);
}

/* Stack */
.stack {
  display: flex;
  flex-direction: column;
}

.stack > * + * {
  margin-top: var(--sp-6);
}

.stack--sm > * + * {
  margin-top: var(--sp-3);
}

.stack--lg > * + * {
  margin-top: var(--sp-12);
}

/* ==========================================================
   COLOUR SCHEME UTILITIES
   ========================================================== */

.bg-cream {
  background-color: var(--cream);
}

.bg-sand {
  background-color: var(--sand);
}

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

.bg-brown {
  background-color: var(--bg-brown);
}

.bg-green {
  background-color: var(--green);
}

.text-cream {
  color: var(--cream);
}

.text-ink {
  color: var(--ink);
}

.text-brown {
  color: var(--light-brown);
}

.text-green {
  color: var(--green);
}

.text-muted {
  color: var(--text-muted);
}

/* ==========================================================
   GRAIN TEXTURE OVERLAY
   ========================================================== */

.grain {
  position: relative;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

/* ==========================================================
   DIVIDERS
   ========================================================== */

.divider {
  width: 100%;
  height: 1px;
  background: var(--border-color);
}

.divider--green {
  background: var(--green);
  width: 40px;
  height: 2px;
}

/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

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

.skip-link {
  position: fixed;
  top: var(--sp-4);
  left: var(--sp-4);
  background: var(--green);
  color: var(--cream);
  padding: var(--sp-2) var(--sp-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 1000;
  transform: translateY(-200%);
  transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ==========================================================
   ARCHITECTURAL BREAKPOINTS & RESPONSIVE GRID LOGIC
   ========================================================== */

/* Tablet / iPad (768px - 1024px) */
@media (width <= 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Mobile & Tablet Portrait (<= 768px) */
@media (width <= 768px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  /* Optical alignment on narrow screens */
  .text-center-mobile {
    text-align: center !important;
  }
}

/* Mobile Small (<= 480px) */
@media (width <= 480px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }
}
