/* ==========================================================================
   Geek Treats Lexington — global stylesheet
   ========================================================================== */

:root {
  /* Palette (locked brand colors — BC1-BC4) */
  --color-teal: #4AC0BE;        /* BC1 — primary/nav/buttons */
  --color-lavender: #C4AED4;    /* BC2 */
  --color-lavender-light: #E3D4E8; /* BC3 — light background tint */
  --color-teal-dark: #2E6B66;   /* BC4 — footer/dark teal */
  --color-cream: #FFFDF7;
  --color-bg: #FAF9F6;
  --color-text: #3A3A3A;
  --color-white: #FFFFFF;

  /* Typography (from live SiteSwan build) */
  --font-title: 'Lobster Two', cursive;
  --font-body: 'Josefin Slab', serif;
  --font-nav: 'Josefin Sans', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --radius: 31px;
  --radius-card: 16px;
  --shadow-btn: 0px 4px 12px 1.28px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--color-teal-dark);
  margin-top: 0;
}

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

a {
  color: inherit;
}

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

/* Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--font-nav);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn-primary {
  background-color: var(--color-teal);
  color: var(--color-white);
}

.btn-secondary {
  background-color: var(--color-lavender);
  color: var(--color-white);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-teal-dark);
  border: 1px solid var(--color-teal-dark);
  box-shadow: none;
}

.btn-dark {
  background-color: var(--color-teal-dark);
  color: var(--color-white);
}

.cta-center {
  text-align: center;
  margin-top: 16px;
}

/* Header
   ========================================================================== */
.site-header {
  background-color: var(--color-cream);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}

.brand-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.875rem;
  color: var(--color-teal-dark);
}

.brand-tagline {
  font-family: var(--font-nav);
  font-size: 0.875rem;
  color: var(--color-text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-nav);
  font-size: 1.0625rem;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.nav-link.is-active,
.nav-link:hover {
  border-bottom-color: var(--color-teal);
}

.header-cta {
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-text);
}

/* Sections
   ========================================================================== */
section {
  padding: 64px 24px;
}

.hero {
  text-align: center;
  background-color: var(--color-lavender-light);
  padding-top: 72px;
}

.hero h1, .hero h2 {
  max-width: 860px;
  margin: 0 auto 20px;
}
.hero h1 {
  font-size: 4rem;
}
.hero h2 {
  font-size: 3rem;
}

.hero p {
  font-family: var(--font-nav);
  font-size: 1.25rem;
}

/* Split section — photo + copy side by side (Welcome / Our Story / etc.) */
.split-section {
  background-color: var(--color-cream);
}

.split-section--tinted {
  background-color: var(--color-lavender-light);
}

.split-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
}

.split-inner.reverse {
  flex-direction: row-reverse;
}

.split-photo {
  flex: 0 0 42%;
  min-width: 0;
}

.split-photo img {
  border-radius: var(--radius-card);
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

.split-copy {
  flex: 1 1 0;
  min-width: 0;
}

.split-copy h2 {
  font-size: 3rem;
  margin-bottom: 16px;
}

.split-copy p {
  font-size: 1.1875rem;
  line-height: 1.7;
}

.split-copy .btn {
  margin-top: 16px;
}

.section-title-centered {
  text-align: center;
  margin-bottom: 32px;
  font-size: 3.5rem;
}

/* Mini gallery teaser grid (Home "Cookies, Cakes, and More") */
.mini-gallery {
  background-color: var(--color-lavender-light);
  text-align: center;
}

.mini-gallery--light {
  background-color: var(--color-cream);
}

.mini-gallery h2 {
  font-size: 2.5rem;
  margin-bottom: 32px;
}

.mini-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.mini-gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.mini-gallery-cta {
  background-color: transparent;
  margin-top: 64px;
  margin-bottom: 40px;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Bakers grid (About page) */
.bakers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 700px;
  margin: 0 auto;
}

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

.baker-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 20%;
  width: 100%;
  margin-bottom: 12px;
  /* Scalloped, cookie-cutter edge. The shape lives in /images/scallop-mask.svg
     (turn it by changing the rotate() number in that file). To go back to rounded
     corners, delete the mask line and add border-radius: var(--radius-card) again. */
  mask: url("/images/scallop-mask.svg") center / 100% 100% no-repeat;
}

.baker-card h3 {
  font-size: 1.375rem;
  margin-bottom: 4px;
}

.baker-card p {
  font-family: var(--font-nav);
  margin: 0;
}

/* Closing emotional line band */
.closing-band {
  background-color: var(--color-lavender-light);
  text-align: center;
}

.closing-band h2 {
  font-size: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.4;
}

.closing-band .cta-heading {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.closing-band .cta-subtext {
  font-family: var(--font-nav);
  font-size: 1.125rem;
  margin-bottom: 28px;
}

.closing-band .closing-line {
  margin-bottom: 32px;
}

/* Page header (non-home pages)
   ========================================================================== */
.page-header {
  background-color: var(--color-lavender-light);
  text-align: center;
  padding: 56px 24px;
}

.page-header h1 {
  font-size: 4rem;
  margin: 0;
}

/* Footer
   ========================================================================== */
.site-footer {
  background-color: var(--color-teal-dark);
  color: var(--color-white);
  padding: 56px 24px 24px;
}

.site-footer h3 {
  color: var(--color-white);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6rem;
}

.footer-col {
  flex: 0 1 auto;
  max-width: 420px;
}

.footer-col h3 {
  font-size: 1.125rem;
  margin-bottom: 12px;
}

.footer-col p {
  font-family: var(--font-nav);
  font-size: 0.9375rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-nav);
}

.contact-list li {
  margin-bottom: 10px;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-nav);
  font-size: 0.875rem;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  text-decoration: none;
}

.social-links a:hover {
  background-color: var(--color-teal);
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a,
.footer-link {
  text-decoration: none;
  color: var(--color-white);
}

.footer-nav a:hover,
.footer-link:hover {
  text-decoration: underline;
}

.copyright {
  width: 100%;
  text-align: center;
  opacity: 0.85;
  margin: 8px 0 0;
}

.copyright a {
  color: var(--color-white);
}

/* Page header with photo background (Cookies & Cakes / Gallery / Start Your Order banners) */
.page-header.has-photo {
  background-color: var(--color-teal-dark);
  background-image: linear-gradient(rgba(46, 107, 102, 0.32), rgba(46, 107, 102, 0.32)), url('/images/page-banner-placeholder.jpg');
  background-size: cover;
  background-position: center;
  padding: 100px 24px;
}

.page-header.has-photo h1 {
  color: var(--color-white);
}

.page-header.has-photo p {
  font-family: var(--font-nav);
  color: var(--color-white);
}

#home .hero.has-photo {
  background-color: var(--color-teal-dark);
  background-image: linear-gradient(rgba(46, 107, 102, 0.5), rgba(46, 107, 102, 0.5)), url('/images/home-banner.jpg');
  background-size: cover;
  background-position: center;
}

#home .hero.has-photo h1 {
  color: var(--color-white);
}

#home .hero.has-photo p {
  font-family: var(--font-nav);
  color: var(--color-white);
}

#about .page-header.has-photo {
  background-image: linear-gradient(rgba(46, 107, 102, 0.32), rgba(46, 107, 102, 0.32)), url('/images/about-banner.jpg');
  background-position: top;
}

#cookies-cakes .page-header.has-photo {
  background-image: linear-gradient(rgba(46, 107, 102, 0.32), rgba(46, 107, 102, 0.32)), url('/images/cookies-cakes-more-banner.jpg');
}

#gallery .page-header.has-photo {
  background-image: linear-gradient(rgba(46, 107, 102, 0.32), rgba(46, 107, 102, 0.32)), url('/images/gallery-banner.jpg');
}

#start-your-order .page-header.has-photo {
  background-image: linear-gradient(rgba(46, 107, 102, 0.32), rgba(46, 107, 102, 0.32)), url('/images/start-your-order-banner.jpg');
}

.page-header.thank-you {
  background-color: var(--color-lavender-light);
  padding: 96px 24px;
}

.page-header.thank-you p {
  font-family: var(--font-nav);
  margin: 12px 0 28px;
  font-size: 1.125rem;
}

/* Product grid (Cookies & Cakes) — static cards: photo with label,
   dark flavor-list panel underneath, no flip interaction */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.product-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-btn);
  background-color: #2b1b12;
}

.product-card-photo {
  position: relative;
  aspect-ratio: 1 / 1;
}

.product-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-photo h2 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 16px;
  font-size: 1.5rem;
  color: var(--color-white);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
}

.product-card-list {
  background-color: #2b1b12;
  color: #d9bd90;
  font-family: var(--font-nav);
  font-size: 0.9375rem;
  padding: 20px 18px;
}

.flavor-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.flavor-list li {
  padding: 7px 0;
  text-align: center;
  border-top: 1px dashed rgba(217, 189, 144, 0.35);
}

.flavor-list--top li:first-child {
  border-top: none;
}

.flavor-list--more {
  display: none;
}

.product-card.is-expanded .flavor-list--more {
  display: block;
}

.product-grid {
  align-items: start;
}

.flavor-toggle {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 6px 0;
  background: none;
  border: none;
  color: #d9bd90;
  font-family: var(--font-nav);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
}

.flavor-toggle:hover {
  color: var(--color-white);
}

.toggle-label--mobile,
.toggle-label--less {
  display: none;
}

.product-card.is-expanded .toggle-label--desktop,
.product-card.is-expanded .toggle-label--mobile {
  display: none;
}

.product-card.is-expanded .toggle-label--less {
  display: inline;
}

@media (max-width: 899px) {
  .toggle-label--desktop {
    display: none;
  }

  .toggle-label--mobile {
    display: inline;
  }

  .product-card:not(.is-expanded) .flavor-list--top {
    display: none;
  }

  .product-card:not(.is-expanded) .flavor-toggle {
    margin-top: 0;
  }
}

#start-your-order .split-copy h2 {
  font-size: 3.5rem;
}

/* About  page-specific overrides */
#about .split-copy h2 {
  text-align: center;
}
/* Cookies & Cakes page-specific overrides */
#cookies-cakes .split-copy h2 {
  font-size: 2.75rem;
}

#cookies-cakes .split-inner {
  align-items: stretch;
}

#cookies-cakes .split-photo {
  position: relative;
  min-height: 320px;
}

#cookies-cakes .split-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* Masonry photo grid (Gallery) — CSS columns, natural aspect ratios.
   main.js rebuilds it into round-robin columns so left-to-right order is kept. */
.masonry-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  column-count: 4;
  column-gap: 0.75rem;
}

.masonry-grid img {
  width: 100%;
  display: block;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  break-inside: avoid;
}

.masonry-grid.is-ready {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  column-count: auto;
}

.masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.masonry-grid.is-ready img {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .masonry-grid {
    column-count: 1;
  }
}

/* Gallery page-specific type sizes (desktop max, scaling down on small screens) */
#gallery .page-header.has-photo h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
}

#gallery .gallery-intro {
  text-align: center;
}

#gallery .gallery-intro h2 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 16px;
}

#gallery .gallery-lead {
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.4;
  max-width: 900px;
  margin: 0 auto 24px;
}

.pill-list {
  font-family: var(--font-nav);
  font-size: 1rem;
  max-width: 760px;
  margin: 16px auto 0;
  text-align: center;
}

/* Contact / Start Your Order form
   ========================================================================== */
.contact-section {
  background-color: var(--color-cream);
}

.contact-intro {
  font-size: 1.75rem;
  max-width: 700px;
  margin: 0 auto 32px;
  text-align: center;
}

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 0.9375rem;
}

.req {
  color: var(--color-teal-dark);
}

.hint {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-text);
  opacity: 0.75;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  background-color: var(--color-white);
  color: var(--color-text);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--color-teal);
  outline-offset: 1px;
}

.field-note {
  margin: 0;
  font-family: var(--font-nav);
  font-size: 0.875rem;
}

.field-note a {
  color: var(--color-teal-dark);
  font-weight: 600;
}

.checkbox-group {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.checkbox-group legend {
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0;
  margin-bottom: 8px;
}

.checkbox-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.form-group .checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 1rem;
  cursor: pointer;
}

.checkbox-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--color-teal-dark);
}

.hidden-field {
  display: none;
}

.contact-form .btn {
  align-self: flex-start;
}

/* Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .split-inner {
    flex-direction: column;
  }

  .split-inner.reverse {
    flex-direction: column;
  }

  .mini-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    gap: 2.5rem;
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-cream);
    flex-direction: column;
    align-items: flex-end;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 10;
  }

  .site-nav.is-open {
    display: flex;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .header-cta {
    order: 3;
    flex: 1 0 100%;
    text-align: center;
    margin-top: 12px;
  }

  .hero h1, .hero h2 {
    font-size: 2.125rem;
  }

  .brand-logo {
    width: 60px;
    height: 60px;
  }

  .brand-name {
    font-size: 1.5rem;
  }
}

@media (max-width: 380px) {
  .header-inner {
    padding: 12px 16px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .hero h1, .hero h2 {
    font-size: 1.75rem;
  }

  .container,
  section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
