/* ==========================================================================
   RIDA AFROZ — DESIGN SYSTEM
   Core tokens, resets, typography scale, and utility classes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   -------------------------------------------------------------------------- */

:root {
  /* ── Brand Colors ── */
  --color-primary:      #2E3603;   /* Dark Olive — primary text & accents */
  --color-bg-light:     #EDEBDD;   /* Soft Cream — page background */
  --color-white:        #FFFFFF;   /* Pure White — card highlights */

  /* ── Extended Palette (derived from brand) ── */
  --color-primary-90:   #3a4404;   /* primary +10% lightness */
  --color-primary-70:   #4f5c06;   /* primary +20% lightness */
  --color-primary-20:   rgba(46, 54, 3, 0.20);
  --color-primary-10:   rgba(46, 54, 3, 0.10);
  --color-primary-05:   rgba(46, 54, 3, 0.05);

  --color-bg-dark:      #1c2102;   /* Very dark olive for dark backgrounds */
  --color-bg-mid:       #e5e3d3;   /* Slightly deeper cream for subtle contrast */
  --color-bg-card:      #f5f4ec;   /* Card surface — between cream and white */

  --color-text-primary: #1c2102;   /* Headings */
  --color-text-body:    #3d4215;   /* Body copy */
  --color-text-muted:   #6b7028;   /* Muted / captions */
  --color-text-light:   rgba(46, 54, 3, 0.55);

  --color-border:       rgba(46, 54, 3, 0.18);
  --color-border-light: rgba(46, 54, 3, 0.09);

  /* ── Typography ── */
  --font-display:   'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:      'Jost', system-ui, -apple-system, sans-serif;

  --text-xs:   0.72rem;    /* 11.5px */
  --text-sm:   0.875rem;   /* 14px   */
  --text-base: 1rem;       /* 16px   */
  --text-md:   1.125rem;   /* 18px   */
  --text-lg:   1.25rem;    /* 20px   */
  --text-xl:   1.5rem;     /* 24px   */
  --text-2xl:  2rem;       /* 32px   */
  --text-3xl:  2.75rem;    /* 44px   */
  --text-4xl:  3.75rem;    /* 60px   */
  --text-5xl:  5rem;       /* 80px   */

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;

  --leading-tight:  1.15;
  --leading-snug:   1.35;
  --leading-base:   1.6;
  --leading-loose:  1.85;

  --tracking-tight:  -0.03em;
  --tracking-normal:  0em;
  --tracking-wide:    0.06em;
  --tracking-widest:  0.18em;

  /* ── Spacing Scale ── */
  --space-1:  0.25rem;    /* 4px  */
  --space-2:  0.5rem;     /* 8px  */
  --space-3:  0.75rem;    /* 12px */
  --space-4:  1rem;       /* 16px */
  --space-5:  1.25rem;    /* 20px */
  --space-6:  1.5rem;     /* 24px */
  --space-8:  2rem;       /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */
  --space-32: 8rem;       /* 128px */

  /* ── Radius ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-xs:  0 1px 3px rgba(46, 54, 3, 0.08);
  --shadow-sm:  0 2px 8px rgba(46, 54, 3, 0.10);
  --shadow-md:  0 6px 24px rgba(46, 54, 3, 0.12);
  --shadow-lg:  0 16px 48px rgba(46, 54, 3, 0.15);
  --shadow-xl:  0 32px 80px rgba(46, 54, 3, 0.20);

  /* ── Motion ── */
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:   cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast:   150ms;
  --duration-base:   280ms;
  --duration-slow:   480ms;
  --duration-xslow:  700ms;

  /* ── Layout ── */
  --container-max: 1200px;
  --container-pad: clamp(1rem, 5vw, 3rem);
  --nav-height:    100px;
}


/* --------------------------------------------------------------------------
   2. GLOBAL RESET
   -------------------------------------------------------------------------- */

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

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

body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-text-body);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}

/* Focus-visible ring for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Screen-reader only utility */
.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;
}


/* --------------------------------------------------------------------------
   3. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */

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

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}


/* --------------------------------------------------------------------------
   4. TYPOGRAPHY UTILITIES
   -------------------------------------------------------------------------- */

.section-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}

.section-subtitle {
  font-size: var(--text-md);
  font-weight: var(--weight-light);
  color: var(--color-text-light);
  max-width: 48ch;
  line-height: var(--leading-loose);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-20));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}


/* --------------------------------------------------------------------------
   5. BUTTON SYSTEM
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  transition:
    background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Filled primary */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-bg-light);
  border: 1.5px solid var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-90);
  border-color: var(--color-primary-90);
  box-shadow: var(--shadow-md);
}

/* Ghost (transparent with border) */
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* Outline — for nav/secondary */
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}

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

/* Inverted (on dark bg) */
.btn-inverse {
  background: var(--color-bg-light);
  color: var(--color-primary);
  border: 1.5px solid var(--color-bg-light);
}

.btn-inverse:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

/* Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
}

.btn-icon {
  font-size: 0.65em;
  opacity: 0.7;
}


/* --------------------------------------------------------------------------
   6. ANIMATIONS (Keyframes)
   -------------------------------------------------------------------------- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(-3deg); }
  50%       { transform: translateY(-12px) rotate(-3deg); }
}

@keyframes linePulse {
  0%, 100% { height: 24px; opacity: 0.5; }
  50%       { height: 48px; opacity: 1; }
}

@keyframes revealUp {
  from {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    clip-path: inset(0% 0 0 0);
    transform: translateY(0);
  }
}

/* Intersection Observer animation trigger */
.anim-hidden {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.anim-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-delay-1 { transition-delay: 100ms; }
.anim-delay-2 { transition-delay: 200ms; }
.anim-delay-3 { transition-delay: 300ms; }
