/* ============================================================
   ANNABI COOKIES — main.css
   Shared design system: tokens, reset, typography, layout,
   buttons, nav, footer, animations, responsive breakpoints.
   All page-specific styles live in their own CSS files.
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */

:root {
  /* Colour palette */
  --peach:       #FFD9C2;
  --peach-mid:   #F0C4A8;   /* hover/active state for peach elements */
  --peach-deep:  #E8B99A;   /* darker accent on peach backgrounds */
  --off-white:   #FAF6F1;
  --warm-grey:   #F2EEEB;
  --grey-light:  #D4D4D4;
  --grey-mid:    #6B6B6B;
  --black:       #0A0A0A;
  --white:       #FFFFFF;

  /* Semantic surface aliases */
  --surface-page:     var(--white);
  --surface-subtle:   var(--off-white);
  --surface-warm:     var(--warm-grey);
  --surface-dark:     var(--black);
  --surface-accent:   var(--peach);

  /* Typography */
  --font-heading:  'DM Sans', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --font-script:   'Dancing Script', cursive;

  /* Note: Inter is loaded as a fallback but DM Sans is the primary.
     Both are in the Google Fonts import below. */

  /* Spacing scale (8-point grid) */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;
  --space-28:  112px;

  /* Border radius */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-xl:   32px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:   0 8px 28px rgba(0,0,0,0.08);
  --shadow-lg:   0 24px 60px rgba(0,0,0,0.11);
  --shadow-xl:   0 32px 80px rgba(0,0,0,0.14);

  /* Transitions */
  --ease:        0.22s ease;
  --ease-slow:   0.5s ease;

  /* Layout */
  --container-max:  1180px;
  --container-pad:  28px;

  /* Nav */
  --nav-height:     100px;
}


/* ============================================================
   2. GOOGLE FONTS IMPORT
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;0,9..40,900;1,9..40,400&family=Dancing+Script:wght@700&family=Inter:wght@400;500&display=swap');


/* ============================================================
   3. RESET & BASE
   ============================================================ */

*, *::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-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  background: var(--surface-page);
  color: var(--black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

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


/* ============================================================
   4. TYPOGRAPHY SCALE
   ============================================================ */

/* Display / Hero headings */
.t-display {
  font-family: var(--font-heading);
  font-size: clamp(52px, 6.5vw, 92px);
  font-weight: 900;
  line-height: 0.97;
  letter-spacing: -0.025em;
}

/* Section headings */
.t-h1 {
  font-family: var(--font-heading);
  font-size: clamp(38px, 4.5vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.t-h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.t-h3 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.t-h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Body sizes */
.t-body-lg { font-size: 18px; line-height: 1.7; }
.t-body    { font-size: 16px; line-height: 1.75; }
.t-body-sm { font-size: 14px; line-height: 1.65; }

/* UI / Label text */
.t-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.42;
}

/* Script accent */
.t-script {
  font-family: var(--font-script);
  font-size: 34px;
}


/* ============================================================
   5. LAYOUT UTILITIES
   ============================================================ */

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

/* Section vertical padding defaults */
.section {
  padding-block: var(--space-28);
}

.section--md {
  padding-block: var(--space-24);
}

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

/* Centred section heading block */
.section-head {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-head .t-label {
  display: block;
  margin-bottom: var(--space-3);
}


/* ============================================================
   6. BUTTONS
   ============================================================ */

/* Primary filled button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--ease),
    color var(--ease),
    border-color var(--ease),
    transform var(--ease),
    box-shadow var(--ease);
  -webkit-user-select: none;
  user-select: none;
}

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

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

/* Filled dark (default) */
.btn--dark {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn--dark:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

/* Filled peach */
.btn--peach {
  background: var(--peach);
  color: var(--black);
  border-color: var(--peach);
}

.btn--peach:hover {
  background: var(--peach-mid);
  border-color: var(--peach-mid);
}

/* Ghost / outline */
.btn--ghost {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}

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

/* Ghost light (for dark backgrounds) */
.btn--ghost-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.btn--ghost-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

/* Small variant */
.btn--sm {
  font-size: 13px;
  padding: 10px 22px;
}

/* Full-width */
.btn--full {
  width: 100%;
}


/* ============================================================
   7. NAVIGATION
   ============================================================ */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  z-index: 999;
  transition: box-shadow var(--ease);
}

/* Add via JS when scrolled */
#nav.scrolled {
  box-shadow: 0 4px 28px rgba(0,0,0,0.07);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  position: relative;
}

/* Logo */
.nav-logo img {
  height: 90px;
  width: auto;
  display: block;
}

/* Centred nav links */
.nav-links {
  display: flex;
  gap: 32px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  transition: opacity var(--ease);
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 0.45;
}

.nav-links a.active {
  font-weight: 700;
}

/* Right-side nav actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Icon button (cart, etc.) */
.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--black);
  transition: background var(--ease);
}

.nav-icon-btn:hover {
  background: rgba(0,0,0,0.05);
}

/* CTA button in nav — reuses .btn styles but slightly smaller */
.nav-cta {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease), transform var(--ease);
}

.nav-cta:hover {
  background: #222;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger → X transform when open */
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  z-index: 998;
  padding: 28px var(--container-pad);
  flex-direction: column;
  gap: 22px;
  /* Slide-down animation */
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: opacity var(--ease);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  opacity: 0.5;
}

/* Push page content below fixed nav */
.nav-offset {
  padding-top: var(--nav-height);
}


/* ============================================================
   8. FOOTER
   ============================================================ */

#footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--space-20);
  padding-bottom: var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: var(--space-16);
}

/* Brand column */
.footer-brand img {
  height: 80px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-5);
}

.footer-brand p {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.42);
  line-height: 1.7;
  max-width: 210px;
}

/* Link columns */
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: var(--space-5);
}

.footer-col ul li {
  margin-bottom: 13px;
}

.footer-col ul li a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: color var(--ease);
}

.footer-col ul li a:hover {
  color: var(--white);
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
}

/* Social icons */
.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--white);
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease);
}

.footer-socials a:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}


/* ============================================================
   9. SCROLL REVEAL ANIMATION
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Staggered delays */
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }


/* ============================================================
   10. SHARED UTILITY CLASSES
   ============================================================ */

/* Text colour helpers */
.text-peach   { color: var(--peach); }
.text-muted   { color: rgba(0,0,0,0.52); }
.text-white   { color: var(--white); }
.text-muted-white { color: rgba(255,255,255,0.55); }

/* Background helpers */
.bg-peach     { background: var(--peach); }
.bg-black     { background: var(--black); }
.bg-off-white { background: var(--off-white); }
.bg-warm-grey { background: var(--warm-grey); }

/* Spacing helpers */
.mt-auto { margin-top: auto; }
.mb-0    { margin-bottom: 0 !important; }

/* Visually hidden (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: 0;
}


/* ============================================================
   11. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet — 860px and below */
@media (max-width: 860px) {

  /* Nav: hide desktop links, show hamburger */
  .nav-links    { display: none; }
  .nav-cta      { display: none; }
  .hamburger    { display: flex; }

  /* Footer: 2-column grid */
  .footer-grid  { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Mobile — 520px and below */
@media (max-width: 520px) {

  :root {
    --container-pad: 20px;
  }

  /* Footer: single column */
  .footer-grid  { grid-template-columns: 1fr; }
}
