/* ==========================================================================
   Telegram Cookies — Brand Stylesheet
   Colors, typography, and visual motifs per Brand Workbook
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Brand colors (Brand Workbook pp. 52-53) */
  --navy: #3A4756;
  --red: #AC252B;
  --paper-white: #E0D7BE;
  --black: #2E2E2E;

  /* Derived web values */
  --cream: #F5F0E6;
  --off-white: #FDFBF7;

  /* French flag (pouch motif only) */
  --flag-blue: #002395;
  --flag-white: #FFFFFF;
  --flag-red: #ED2939;

  /* Tints (20% steps) */
  --navy-80: rgba(58, 71, 86, 0.8);
  --navy-60: rgba(58, 71, 86, 0.6);
  --navy-40: rgba(58, 71, 86, 0.4);
  --navy-20: rgba(58, 71, 86, 0.2);

  /* Spacing */
  --section-pad: 5rem 1.5rem;
  --max-width: 1140px;
}


/* --- @font-face: Self-hosted brand fonts --- */
@font-face {
  font-family: "BN Bergen St";
  src: url("../fonts/BNBergenSt-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BN Bergen St";
  src: url("../fonts/BNBergenSt-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BN Tillsdale";
  src: url("../fonts/BNTillsdale-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BN Tillsdale";
  src: url("../fonts/BNTillsdale-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tay Basal";
  src: url("../fonts/TayBasal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--navy);
  color: var(--paper-white);
  padding: 0.5rem 1rem;
  z-index: 200;
  font-family: "Cutive Mono", monospace;
}

.skip-link:focus {
  top: 0.5rem;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

body {
  font-family: "Cutive Mono", monospace;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--navy);
  background-color: var(--cream);
}

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

address {
  font-style: normal;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--red);
}


/* --- Typography (Brand Workbook pp. 56-61) --- */

/* Google Fonts loaded in HTML: Cutive Mono, Cedarville Cursive */
/* Fallback stacks for proprietary fonts */

.font-bergen {
  font-family: "BN Bergen St", "DM Sans", sans-serif;
}

.font-tillsdale {
  font-family: "BN Tillsdale", "Libre Baskerville", serif;
}

.font-tay {
  font-family: "Tay Basal", "Bebas Neue", sans-serif;
}

.font-hatfield {
  font-family: "Hatfield Park", "Cedarville Cursive", cursive;
}

.font-cursive {
  font-family: "Cedarville Cursive", cursive;
}

.font-mono {
  font-family: "Cutive Mono", monospace;
}

/* Heading hierarchy per brand guide */
h1, .h1 {
  font-family: "BN Bergen St", "DM Sans", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.08;
  color: var(--navy);
}

h2, .h2 {
  font-family: "BN Bergen St", "DM Sans", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.1;
  color: var(--navy);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

h3, .h3 {
  font-family: "BN Tillsdale", "Libre Baskerville", serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--navy);
  font-size: 1.1rem;
}

/* Script accent text */
.script-accent {
  font-family: "Cedarville Cursive", cursive;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--navy);
}

/* Body / mono */
p, li, td {
  font-family: "Cutive Mono", monospace;
  line-height: 1.5;
  letter-spacing: 0.01em;
  max-width: 65ch;
}

.uppercase {
  text-transform: uppercase;
}


/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-pad);
}

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


/* ==========================================================================
   Navigation + Airmail Stripe
   ========================================================================== */
.nav {
  background: var(--navy);
  padding: 0;
}


.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 0 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo img {
  height: 100px;
  width: auto;
}

.nav-logo:hover {
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: "BN Tillsdale", "Libre Baskerville", serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--paper-white);
  opacity: 0.7;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--paper-white);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ==========================================================================
   Hero — pouch as dominant half-screen image
   ========================================================================== */
.hero {
  background: var(--navy);
  color: var(--paper-white);
  min-height: calc(100vh - 66px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-inner {
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0 3rem 4rem 0;
  max-width: 600px;
  margin-left: auto;
}

.hero .script-accent {
  font-size: 1.6rem;
  color: var(--paper-white);
}

.hero h1 {
  font-family: "Tay Basal", "Bebas Neue", sans-serif;
  font-weight: 400;
  color: var(--paper-white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.02em;
  margin: 0;
}

.hero-subline {
  font-family: "BN Tillsdale", "Libre Baskerville", serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.1rem;
  color: var(--paper-white);
}

.hero-supporting {
  font-family: "Cutive Mono", monospace;
  font-size: 1rem;
  color: var(--paper-white);
}

.hero-image {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  align-self: stretch;
  overflow: hidden;
  padding: 0;
}

.hero-image img {
  height: 110vh;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 12px 48px rgba(0, 0, 0, 0.35));
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* Press logos inside hero */
.hero-press {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
  background: var(--navy);
}

.hero-press a {
  display: block;
  line-height: 0;
}

.hero-press img {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1) sepia(1) saturate(0.1) hue-rotate(10deg) brightness(1.5);
  opacity: 1;
  transition: opacity 0.2s ease;
}

.hero-press a:hover img {
  opacity: 0.7;
}


/* --- Buttons --- */
.btn {
  font-family: "BN Tillsdale", "Libre Baskerville", serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 2rem;
  min-height: 44px;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--red);
  color: var(--paper-white);
  border: 2px solid var(--red);
}

.btn-primary:hover {
  background: #8e1f24;
  border-color: #8e1f24;
  color: var(--paper-white);
}

.btn-secondary {
  background: transparent;
  color: var(--paper-white);
  border: 2px solid var(--paper-white);
}

.btn-secondary:hover {
  background: var(--paper-white);
  color: var(--navy);
}


/* ==========================================================================
   The Cookie Section — redesigned with stacked cookies illustration
   ========================================================================== */
.cookie-section {
  background: var(--cream);
  padding: var(--section-pad);
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.cookie-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.cookie-image {
  display: flex;
  justify-content: center;
}

.cookie-image img {
  max-width: 300px;
  width: 100%;
  height: auto;
}

.cookie-script {
  font-family: "Cedarville Cursive", cursive;
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.ingredient-list {
  font-family: "Tay Basal", "Bebas Neue", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.no-artificial {
  font-family: "BN Tillsdale", "Libre Baskerville", serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--navy);
  margin-top: 0.25rem;
}

.cookie-body {
  max-width: 55ch;
  margin: 0 0 2rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Value stamp badge (from brand assets) */
.stamp-badge-img {
  transform: rotate(-6deg);
}


/* ==========================================================================
   Airmail Stripe Divider
   ========================================================================== */
.airmail-stripe {
  height: 14px;
  background: repeating-linear-gradient(
    135deg,
    var(--navy) 0px,
    var(--navy) 14px,
    var(--cream) 14px,
    var(--cream) 28px,
    var(--red) 28px,
    var(--red) 42px,
    var(--cream) 42px,
    var(--cream) 56px
  );
}


/* ==========================================================================
   Where to Buy
   ========================================================================== */
.find-section {
  background: var(--off-white);
  padding: var(--section-pad);
}

.find-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.find-inner h2 {
  font-family: "Tay Basal", "Bebas Neue", sans-serif;
  font-weight: 400;
  margin-bottom: 1rem;
}

.find-proof {
  font-size: 0.9rem;
  color: var(--navy);
  margin: 0 auto 2.5rem;
  max-width: 50ch;
}

.map-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  border: 2px solid var(--navy);
  background: var(--cream);
  overflow: hidden;
  position: relative;
}

.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.map-container.active .map-overlay {
  display: none;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-link {
  margin-top: 1.5rem;
}


/* ==========================================================================
   Our Story
   ========================================================================== */
.story-section {
  background: var(--cream);
  padding: var(--section-pad);
}

.story-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.story-header {
  max-width: 740px;
  margin: 0 auto 2rem;
  position: relative;
  padding-right: 170px;
}

.story-stamp {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(6deg);
  width: 150px;
  height: auto;
}

.story-content {
  max-width: 740px;
  margin: 0 auto;
}

.story-text {
  flex: 1;
}

.story-text p {
  font-family: "Cutive Mono", monospace;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: none;
  color: var(--navy);
}

p.story-signature {
  font-family: "Cedarville Cursive", cursive !important;
  font-size: 1.2rem;
  color: var(--navy);
  margin-top: 1rem;
  text-align: right;
}

/* Georges portrait as postage stamp */
.story-portrait {
  flex-shrink: 0;
  width: 140px;
}

.portrait-stamp {
  transform: rotate(3deg);
}

.portrait-stamp img {
  width: 100%;
  height: auto;
}




/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--navy);
  color: var(--paper-white);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo img {
  height: 50px;
  width: auto;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  color: var(--paper-white);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-social svg {
  flex-shrink: 0;
  vertical-align: middle;
}

.footer-ig-label {
  font-family: "BN Tillsdale", "Libre Baskerville", serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  padding-top: 2px;
}

.footer-social a:hover {
  color: var(--paper-white);
  opacity: 1;
}

.footer-contact {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--paper-white);
}

.footer-contact a {
  color: var(--paper-white);
}

.footer-tagline {
  font-family: "Cedarville Cursive", cursive;
  font-size: 1.2rem;
  color: var(--paper-white);
  margin-top: 0.5rem;
}


/* ==========================================================================
   Responsive — Mobile First
   ========================================================================== */

/* Small phones (375px default — base styles above) */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .ingredients {
    grid-template-columns: repeat(3, 1fr);
  }

  .story-content {
    flex-direction: row;
  }

  .story-portrait {
    display: block;
  }

  h2, .h2 {
    font-size: 2.25rem;
  }

  .nav-links {
    gap: 2.5rem;
  }
}

/* Desktop (1200px+) */
@media (min-width: 1200px) {
  .hero h1 {
    font-size: 3.8rem;
  }

  .hero-text {
    padding: 0 3rem 4rem 5rem;
  }

  h2, .h2 {
    font-size: 2.5rem;
  }

  .cookie-body {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Mobile-specific overrides */
@media (max-width: 767px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
  }

  .nav-logo {
    padding-left: 1.5rem;
    max-width: none;
    margin-left: 0;
  }

  .nav-right {
    padding-right: 1.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    border-top: 1px solid var(--navy-60);
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-text {
    padding: 0 1.5rem 2rem;
    align-items: center;
    text-align: center;
    max-width: none;
    margin-left: 0;
    order: 2;
  }

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

  .hero-image {
    order: 1;
    padding: 0;
  }

  .hero-image img {
    height: 55vh;
  }

  .story-stamp {
    position: static;
    transform: rotate(6deg);
    margin: 1.5rem auto 0;
    display: block;
    width: 120px;
  }

  .story-header {
    text-align: center;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cookie-layout {
    grid-template-columns: 1fr;
  }

  .cookie-text {
    text-align: center;
  }

  .cookie-text .cookie-script,
  .cookie-text .ingredient-list,
  .cookie-text .no-artificial {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .cookie-image {
    order: -1;
  }

  .cookie-image img {
    max-width: 220px;
  }

  .cookie-body {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .stamp-badge-img {
    margin: 0 auto;
    display: block;
  }
}
