/*
 * styles.css — Ambient Interiors UK Ambient Affiliate Site
 *
 * TABLE OF CONTENTS
 * =================
 * 1.  CSS Custom Properties (variables)
 * 2.  Base Reset & Box Model
 * 3.  Base Typography
 * 4.  Grain Texture Overlay
 * 5.  Navigation
 * 6.  Mobile Navigation
 * 7.  Hero Section (Homepage)
 * 8.  Section Headers & Dividers
 * 9.  Latest Collection Section (Homepage)
 * 10. Product Cards
 * 11. Product Grid Layout
 * 12. Collections Grid (Homepage)
 * 13. Collection Card
 * 14. Email Signup Section
 * 15. Footer
 * 16. Collection / Video Pages
 * 17. 404 Page
 * 18. Loading State
 * 19. Utility Classes
 * 20. Scroll Animations
 * 21. Responsive — Tablet (max-width: 900px)
 * 22. Responsive — Mobile (max-width: 600px)
 */

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (VARIABLES)
   All colours, typography, spacing, and transitions defined here.
   Change these values to retheme the entire site.
   ========================================================================== */

:root {
  /* --- Colour Palette --- */
  --bg-primary:        #0d0b0a;   /* Near-black background with warm undertone */
  --bg-secondary:      #141210;   /* Slightly lighter background for sections */
  --bg-card:           #1a1714;   /* Product and collection card backgrounds */
  --bg-card-hover:     #201d19;   /* Card background on hover */
  --bg-nav:            rgba(13, 11, 10, 0.85); /* Translucent nav background */

  --accent:            #c8903c;   /* Primary gold/amber accent — used for CTAs, borders, highlights */
  --accent-light:      #d9a55a;   /* Lighter accent for hover states */
  --accent-glow:       rgba(200, 144, 60, 0.18); /* Soft glow for card hover shadows */

  --text-primary:      #f0ebe4;   /* Warm white for headings */
  --text-secondary:    #a09589;   /* Muted warm grey for body copy */
  --text-muted:        #6b6259;   /* Dimmer grey for labels, metadata */
  --text-accent:       #c8903c;   /* Accent-coloured text */

  --border-subtle:     rgba(200, 144, 60, 0.12); /* Very faint gold border */
  --border-accent:     rgba(200, 144, 60, 0.35); /* Stronger accent border */
  --border-card:       rgba(255, 255, 255, 0.05); /* Faint card border */

  /* --- Typography --- */
  --font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:   'DM Sans', system-ui, -apple-system, sans-serif;

  --text-xs:     0.75rem;    /* 12px */
  --text-sm:     0.875rem;   /* 14px */
  --text-base:   1rem;       /* 16px */
  --text-lg:     1.125rem;   /* 18px */
  --text-xl:     1.25rem;    /* 20px */
  --text-2xl:    1.5rem;     /* 24px */
  --text-3xl:    1.875rem;   /* 30px */
  --text-4xl:    2.25rem;    /* 36px */
  --text-5xl:    3rem;       /* 48px */
  --text-6xl:    3.75rem;    /* 60px */
  --text-7xl:    5rem;       /* 80px */

  /* --- 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 */

  /* --- Layout --- */
  --max-width:       1200px;
  --nav-height:      72px;
  --border-radius:   6px;
  --border-radius-lg: 12px;

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-crawl:  600ms ease;
}


/* ==========================================================================
   2. BASE RESET & BOX MODEL
   ========================================================================== */

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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


/* ==========================================================================
   3. BASE TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

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


/* ==========================================================================
   4. GRAIN TEXTURE OVERLAY
   A fixed, subtle film-grain effect rendered via CSS SVG filter.
   This creates the tactile, cinematic quality of the site.
   ========================================================================== */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}


/* ==========================================================================
   5. NAVIGATION
   Sticky top bar with blur/transparency backdrop.
   Becomes slightly more opaque after scrolling.
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.nav.scrolled {
  background: rgba(13, 11, 10, 0.96);
  border-bottom-color: var(--border-accent);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-8);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand / logo wordmark */
.nav__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__brand-name {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--text-primary);
  letter-spacing: 0.04em;
  line-height: 1;
}

.nav__brand-tagline {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

/* Navigation links (desktop) */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

/* Subscribe button in nav */
.nav__subscribe {
  font-size: var(--text-sm);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: var(--space-2) var(--space-5);
  border-radius: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav__subscribe:hover {
  background: var(--accent);
  color: var(--bg-primary);
}


/* ==========================================================================
   6. MOBILE NAVIGATION
   Hamburger toggle and full-screen mobile menu overlay.
   ========================================================================== */

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text-primary);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Hamburger "open" state — transforms to X */
.nav__hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile overlay menu */
.nav__mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: rgba(13, 11, 10, 0.98);
  backdrop-filter: blur(12px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.nav__mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-link {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.nav__mobile-link:hover {
  color: var(--accent);
}


/* ==========================================================================
   7. HERO SECTION (HOMEPAGE)
   Full-viewport cinematic hero with background thumbnail and headline.
   ========================================================================== */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background image layer — the YouTube thumbnail */
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-secondary); /* Fallback while image loads */
  transform: scale(1.05); /* Slight oversizing for the subtle parallax effect */
  transition: transform 8s ease;
}

/* Multi-layer gradient overlay — creates the cinematic depth */
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg-primary) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(13, 11, 10, 0.4) 0%, transparent 40%),
    linear-gradient(to right, rgba(13, 11, 10, 0.6) 0%, transparent 60%);
}

/* Fallback gradient when no thumbnail is available */
.hero__bg--fallback {
  background: radial-gradient(ellipse at 30% 60%, #2a1f0f 0%, #141210 40%, #0d0b0a 100%);
}

/* Hero content container */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  width: 100%;
  padding: 0 var(--space-8);
  padding-top: var(--nav-height);
}

/* Pre-headline eyebrow label */
.hero__eyebrow {
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);

  /* Staggered load animation */
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

/* Main headline — the emotional centrepiece */
.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-4xl), 7vw, var(--text-7xl));
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 700px;
  margin-bottom: var(--space-6);

  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease forwards;
  animation-delay: 0.4s;
}

/* Accent line below headline */
.hero__accent-line {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--space-6);

  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  animation: expandLine 0.8s ease forwards;
  animation-delay: 0.7s;
}

/* Sub-headline */
.hero__sub {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.65;
  margin-bottom: var(--space-10);

  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.8s;
}

/* Inline email form in hero */
.hero__form {
  display: flex;
  gap: var(--space-2);
  max-width: 420px;

  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 1s;
}

.hero__form input[type="email"] {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  border-radius: 2px;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.hero__form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.hero__form input[type="email"]:focus {
  border-color: var(--accent);
  background: rgba(200, 144, 60, 0.06);
}

.hero__form button {
  background: var(--accent);
  color: var(--bg-primary);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  white-space: nowrap;
  transition: background var(--transition-fast);
}

.hero__form button:hover {
  background: var(--accent-light);
}

/* Scroll indicator at the base of the hero */
.hero__scroll {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 1.6s;
}

.hero__scroll span {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease infinite;
  animation-delay: 2s;
}


/* ==========================================================================
   8. SECTION HEADERS & DIVIDERS
   ========================================================================== */

/* Container for all page sections */
.section {
  padding: var(--space-24) 0;
}

.section--tight {
  padding: var(--space-16) 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* Section heading group — eyebrow + title + rule */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header__eyebrow {
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.section-header__title {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.section-header__rule {
  width: 36px;
  height: 2px;
  background: var(--accent);
}

/* Thin full-width accent divider between sections */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 0;
}

/* Alternate background for sections */
.section--alt {
  background: var(--bg-secondary);
}


/* ==========================================================================
   9. LATEST COLLECTION SECTION (HOMEPAGE)
   Shows the most recent video embed and its product grid.
   ========================================================================== */

.latest-collection {
  background: var(--bg-secondary);
}

/* Responsive YouTube embed container (16:9) */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin-bottom: var(--space-12);
  border-radius: var(--border-radius);
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Collection description text */
.collection-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-10);
  line-height: 1.75;
}


/* ==========================================================================
   10. PRODUCT CARDS
   ========================================================================== */

/* Base product card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow),
    border-color var(--transition-slow);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-accent), 0 8px 24px var(--accent-glow);
  border-color: var(--border-accent);
}

/* Product image — square crop */
.product-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-primary);
}

.product-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-crawl);
}

.product-card:hover .product-card__image-wrap img {
  transform: scale(1.04);
}

/* Product card text content */
.product-card__body {
  padding: var(--space-5) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.product-card__name {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

.product-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.product-card__price {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  color: var(--accent);
  font-weight: 600;
}

/* "Shop on Amazon" CTA button */
.btn-shop {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--accent);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
}

.btn-shop:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

/* Small arrow icon in the button */
.btn-shop::after {
  content: '→';
  font-style: normal;
  transition: transform var(--transition-fast);
}

.btn-shop:hover::after {
  transform: translateX(3px);
}

/* Featured product card (first card in grid — wider) */
.product-card--featured {
  flex-direction: row;
}

.product-card--featured .product-card__image-wrap {
  width: 45%;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.product-card--featured .product-card__body {
  padding: var(--space-8) var(--space-8);
  justify-content: center;
}

.product-card--featured .product-card__name {
  font-size: var(--text-2xl);
}

.product-card--featured .product-card__description {
  font-size: var(--text-base);
}


/* ==========================================================================
   11. PRODUCT GRID LAYOUT
   Asymmetric grid: first card is featured (spans 2 columns), rest are normal.
   ========================================================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: var(--space-6);
}

/* First child (featured) spans full width */
.products-grid .product-card--featured {
  grid-column: 1 / -1;
}


/* ==========================================================================
   12. COLLECTIONS GRID (HOMEPAGE)
   Thumbnail cards for all videos — sorted newest first.
   ========================================================================== */

.collections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}


/* ==========================================================================
   13. COLLECTION CARD (Homepage thumbnails)
   ========================================================================== */

.collection-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow),
    border-color var(--transition-slow);
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-accent);
  border-color: var(--border-accent);
}

/* Thumbnail image container (16:9) */
.collection-card__thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: var(--bg-secondary);
}

.collection-card__thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-crawl);
}

.collection-card:hover .collection-card__thumbnail img {
  transform: scale(1.05);
}

/* Gradient overlay on thumbnail */
.collection-card__thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 11, 10, 0.7) 0%, transparent 60%);
  pointer-events: none;
}

/* Collection name badge overlay on the thumbnail */
.collection-card__badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 2;
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.collection-card__body {
  padding: var(--space-5) var(--space-6);
}

.collection-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.collection-card__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Fallback when thumbnail hasn't loaded */
.collection-card__thumbnail--no-image {
  background: radial-gradient(ellipse at 40% 50%, #2a1f0f, #141210);
}


/* ==========================================================================
   14. EMAIL SIGNUP SECTION
   Full-width mid-page section with standalone email form.
   ========================================================================== */

.email-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  padding: var(--space-24) var(--space-8);
}

.email-section__eyebrow {
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.email-section__title {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.email-section__sub {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto var(--space-8);
}

/* Email form wrapper */
.email-section__form {
  display: flex;
  gap: var(--space-3);
  max-width: 460px;
  margin: 0 auto;
  justify-content: center;
}

.email-section__form input[type="email"] {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  border-radius: 2px;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.email-section__form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.email-section__form input[type="email"]:focus {
  border-color: var(--accent);
  background: rgba(200, 144, 60, 0.06);
}

.email-section__form button {
  background: var(--accent);
  color: var(--bg-primary);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  white-space: nowrap;
  transition: background var(--transition-fast);
}

.email-section__form button:hover {
  background: var(--accent-light);
}

/* Success/error message after form submission */
.email-section__message {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  display: none;
}

.email-section__message--success {
  color: var(--accent);
}

.email-section__message--error {
  color: #e07070;
}


/* ==========================================================================
   15. FOOTER
   ========================================================================== */

.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) var(--space-8) var(--space-10);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer__brand-name {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.footer__brand-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 260px;
}

.footer__heading {
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--text-secondary);
}

/* Bottom bar — disclosure + copyright */
.footer__bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__disclosure {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.65;
  font-style: italic;
  max-width: 680px;
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--text-muted);
}


/* ==========================================================================
   16. COLLECTION / VIDEO PAGES
   Styles for the individual /pages/[slug].html pages.
   ========================================================================== */

/* Page header section at the top of a collection page */
.collection-page-header {
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-12);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.collection-page-header .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.collection-page__video {
  /* video embed handled by .video-embed class */
}

.collection-page__info {
  padding: var(--space-4) 0;
}

.collection-page__eyebrow {
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.collection-page__title {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.collection-page__rule {
  width: 36px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--space-5);
}

.collection-page__description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-6);
}

.collection-page__youtube-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: var(--space-2) var(--space-4);
  border-radius: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.collection-page__youtube-link:hover {
  color: var(--accent);
  border-color: var(--border-accent);
}

/* Back to collections link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-12);
  transition: color var(--transition-fast);
}

.back-link::before {
  content: '←';
}

.back-link:hover {
  color: var(--accent);
}


/* ==========================================================================
   17. 404 PAGE
   ========================================================================== */

.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
}

.page-404__inner {
  max-width: 520px;
}

.page-404__number {
  font-family: var(--font-serif);
  font-size: 120px;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: var(--space-4);
  letter-spacing: -0.04em;
}

.page-404__title {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.page-404__text {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--accent);
  color: var(--bg-primary);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--transition-fast);
}

.btn-home:hover {
  background: var(--accent-light);
}


/* ==========================================================================
   18. LOADING STATE
   Shown while JavaScript fetches products.json.
   ========================================================================== */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  flex-direction: column;
  gap: var(--space-4);
}

.loading__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: loadingPulse 1.2s ease infinite;
}

.loading__dots {
  display: flex;
  gap: var(--space-2);
}

.loading__dots .loading__dot:nth-child(2) { animation-delay: 0.2s; }
.loading__dots .loading__dot:nth-child(3) { animation-delay: 0.4s; }

.loading__text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


/* ==========================================================================
   19. UTILITY CLASSES
   ========================================================================== */

/* Visually hidden but accessible to screen readers */
.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;
}

/* Text colour utilities */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }

/* Spacing helpers */
.mt-8  { margin-top: var(--space-8); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }


/* ==========================================================================
   20. SCROLL ANIMATIONS
   Elements with [data-animate] start hidden and fade in when they enter the viewport.
   Triggered by IntersectionObserver in main.js.
   ========================================================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay for grids — children get increasing delays */
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }
[data-animate-delay="5"] { transition-delay: 0.5s; }


/* ==========================================================================
   21. KEYFRAME ANIMATIONS
   ========================================================================== */

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

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

@keyframes expandLine {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.3); }
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.2); }
}


/* ==========================================================================
   22. RESPONSIVE — TABLET (max-width: 900px)
   ========================================================================== */

@media (max-width: 900px) {

  /* Hide desktop nav links, show hamburger */
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__mobile-menu {
    display: flex;
  }

  /* Hero adjustments */
  .hero__content {
    padding: 0 var(--space-6);
    padding-top: var(--nav-height);
  }

  /* Switch product grid to 2 columns */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Featured card becomes full-width column layout */
  .product-card--featured {
    flex-direction: column;
  }

  .product-card--featured .product-card__image-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  /* Collection grid 2 columns */
  .collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Collection page header stack */
  .collection-page-header .container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  /* Footer 2-column */
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}


/* ==========================================================================
   23. RESPONSIVE — MOBILE (max-width: 600px)
   ========================================================================== */

@media (max-width: 600px) {

  :root {
    --space-8: 1.25rem; /* Tighten horizontal padding on small screens */
  }

  /* Single column layouts */
  .products-grid {
    grid-template-columns: 1fr;
  }

  .collections-grid {
    grid-template-columns: 1fr;
  }

  /* Email form stacks vertically */
  .hero__form,
  .email-section__form {
    flex-direction: column;
  }

  .hero__form button,
  .email-section__form button {
    width: 100%;
    padding: var(--space-4);
  }

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

  /* Section padding reduced */
  .section {
    padding: var(--space-16) 0;
  }
}
