/* ═══════════════════════════════════════════════════════════════
   brasa — base.css
   Shared shell: design tokens, reset, header, mobile drawer,
   focus styles, reduced-motion overrides. Loaded on every page.
   ═══════════════════════════════════════════════════════════════ */

/* ── The Seasons — brand logo font ── */
@font-face {
  font-family: 'The Seasons';
  src: url('../fonts/TheSeasons.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ─────────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────────── */
:root {
  /* Colors */
  --color-royal-blue:   #0039A6;
  --color-cream:        #FFFFFF;
  --color-terracotta:   #C2703E;
  --color-white:        #FFFFFF;
  --color-black:        #0A0A0A;
  --color-grey-light:   #EAEAEA;
  --color-overlay:      rgba(10, 10, 10, 0.45);

  /* Typography */
  --font-display: 'The Seasons', 'Poppins', Georgia, 'Times New Roman', serif;
  --font-body:    'Poppins', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Spacing */
  --header-height: 64px;
  --page-gutter:   clamp(20px, 4vw, 48px);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.5s var(--ease-out-expo);

  /* Product photography — every shot is 4500×6000 px ⇒ 3:4 portrait */
  --product-shot-ratio: 3 / 4;

  /* Straight geometry — no rounded corners on UI chrome */
  --radius: 0;

  --frame-tint: rgba(255, 255, 255, 0.95);
  --frame-line: var(--frame-tint);
}

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

html {
  scroll-behavior: smooth;
  /* Fixed header overlays the top of the viewport; hash links land below it */
  scroll-padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-black);
  background-color: var(--color-white);
  overflow-x: hidden;
  padding-top: var(--header-height);
}

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

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

img, video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.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;
}

/* ─────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-gutter);
  background-color: var(--frame-tint);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform var(--transition-smooth),
              background-color 0.4s ease,
              box-shadow 0.3s ease;
  will-change: transform;
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.06);
}

.header--solid    { background-color: var(--frame-tint); }
.header--scrolled { box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.06); }
.header--hidden   { transform: translateY(-100%); }

/* Transparent header variant — for pages whose hero is full-bleed media */
.header--transparent {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header--transparent .logo,
.header--transparent .nav-desktop__link {
  color: var(--color-white);
}

.header--transparent .cart-button svg,
.header--transparent .hamburger__line {
  stroke: var(--color-white);
  background-color: var(--color-white);
}

.header--transparent .hamburger__line {
  background-color: var(--color-white);
}

/* ── Logo ── */
.logo {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-royal-blue);
  transition: color 0.4s ease, opacity 0.3s ease;
}
.header--solid .logo { color: var(--color-royal-blue); }
.logo:hover { opacity: 0.7; }

/* ── Desktop Navigation ── */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
}

.nav-desktop__link {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #212121;
  padding: 4px 0;
  transition: color 0.4s ease;
}

.header--solid .nav-desktop__link { color: #212121; }
.nav-desktop__link:hover { color: var(--color-royal-blue); }

/* ── Cart Button ── */
.cart-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: relative;
}

.cart-button svg {
  width: 20px;
  height: 20px;
  stroke: #212121;
  stroke-width: 1.5;
  fill: none;
  transition: stroke 0.4s ease;
}

.header--solid .cart-button svg { stroke: #212121; }
.cart-button:hover svg { stroke: var(--color-royal-blue); }

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 6px;
  z-index: 1100;
}

.hamburger__line {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--color-black);
  transition: transform 0.4s var(--ease-out-expo),
              opacity 0.3s ease,
              background-color 0.4s ease;
  transform-origin: center;
}

.header--solid .hamburger__line { background-color: var(--color-black); }

.hamburger--active .hamburger__line:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger--active .hamburger__line:nth-child(2) { opacity: 0; }
.hamburger--active .hamburger__line:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ─────────────────────────────────────────────
   MOBILE DRAWER
   ───────────────────────────────────────────── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-white);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--page-gutter) 60px;
  transform: translateX(100%);
  transition: transform 0.6s var(--ease-out-expo);
  visibility: hidden;
}

.mobile-drawer--open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-drawer__overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mobile-drawer__overlay--visible {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-drawer__link {
  font-family: var(--font-body);
  font-size: clamp(24px, 5.5vw, 32px);
  font-weight: 400;
  letter-spacing: 0.005em;
  color: #212121;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-grey-light);
  transition: color 0.35s ease;
  opacity: 0;
  transform: translateX(30px);
}

.mobile-drawer--open .mobile-drawer__link {
  opacity: 1;
  transform: translateX(0);
  transition: color 0.35s ease,
              opacity 0.5s var(--ease-out-expo),
              transform 0.5s var(--ease-out-expo);
}

.mobile-drawer--open .mobile-drawer__link:nth-child(1) { transition-delay: 0.10s; }
.mobile-drawer--open .mobile-drawer__link:nth-child(2) { transition-delay: 0.15s; }
.mobile-drawer--open .mobile-drawer__link:nth-child(3) { transition-delay: 0.20s; }
.mobile-drawer--open .mobile-drawer__link:nth-child(4) { transition-delay: 0.25s; }

.mobile-drawer__link:hover { color: var(--color-royal-blue); }

.mobile-drawer__footer {
  margin-top: auto;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(10, 10, 10, 0.4);
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────
   RESPONSIVE — header + drawer
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .hamburger   { display: flex; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-desktop      { gap: 24px; }
  .nav-desktop__link { font-size: 12px; }
}

@media (min-width: 1440px) {
  :root { --header-height: 72px; }
}

/* ─────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .header,
  .mobile-drawer { transition: none; }
}

/* ─────────────────────────────────────────────
   FOCUS STYLES
   ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-royal-blue);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* ─────────────────────────────────────────────
   FOOTER — full width, minimal (single product)
   ───────────────────────────────────────────── */
.site-footer {
  width: 100%;
  background: var(--color-white);
  border-top: 1px solid var(--color-grey-light);
  padding: clamp(28px, 4vw, 40px) var(--page-gutter);
}

.site-footer__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #3A3A3A;
}

.site-footer__logo {
  font-family: var(--font-display);
  font-size: 1.15em;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-royal-blue);
  text-decoration: none;
}

.site-footer__logo:hover { opacity: 0.8; }

.site-footer__sep {
  color: #C9C9C9;
  font-weight: 300;
  user-select: none;
}

.site-footer__muted {
  font-weight: 300;
  color: #6B6B6B;
}

.site-footer__link {
  color: #3A3A3A;
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-footer__link:hover { color: var(--color-terracotta); }

.site-footer__copy {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #8A8A8A;
  margin: 0;
}
