/* Maria Bakes — warm bakery, cream / tan / chocolate / gold */

:root {
  --cream: #f6f1ea;
  --cream-deep: #efe4d2;
  --paper: #fbf7ef;
  --tan: #c9a57a;
  --tan-deep: #b0895e;
  --gold: #9a7b4a;
  --gold-soft: #c4b08a;
  --gold-line: rgba(184, 146, 58, 0.45);
  --chocolate: #3b2417;
  --chocolate-deep: #24150c;
  --cocoa: #6a4a33;
  --ink: #2a1810;
  --muted: #6e5646;
  --white: #fffdf8;
  --shadow: 0 10px 30px rgba(36, 21, 12, 0.08);
  --shadow-soft: 0 8px 24px rgba(36, 21, 12, 0.08);
  --radius: 4px;
  --header-h: 4.25rem;
  --max: 1120px;
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  min-width: 320px;
}

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

a {
  color: var(--chocolate);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--chocolate);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(251, 247, 239, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gold-line);
}

.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--chocolate);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.brand:hover { color: var(--chocolate); }

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid var(--tan);
  background: var(--cream-deep);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  text-decoration: none;
  color: var(--cocoa);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a:hover { color: var(--chocolate); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--chocolate);
  color: var(--cream);
  box-shadow: 0 6px 18px rgba(36, 21, 12, 0.18);
}

.btn-primary:hover {
  background: var(--chocolate-deep);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--chocolate);
  border: 1.5px solid var(--tan);
}

.btn-ghost:hover {
  background: var(--cream-deep);
  color: var(--chocolate);
}

.header-cta {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Hero */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 1rem 2.5rem;
  text-align: center;
}

.hero-logo {
  width: min(220px, 56vw);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(184, 146, 58, 0.35);
  background: var(--white);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--chocolate);
}

.byline {
  margin: 0.45rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--cocoa);
}

.tagline {
  margin: 1.1rem auto 0;
  max-width: 38rem;
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--muted);
}

.hero-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.75rem auto 0;
  color: var(--gold);
}

.flourish span {
  display: block;
  width: 3.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.flourish svg {
  width: 18px;
  height: 18px;
}

/* Featured */

.featured {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0.5rem auto 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.featured a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--cream-deep);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(184, 146, 58, 0.22);
  position: relative;
}

.featured a:nth-child(2) {
  transform: none;
}

.featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured a:hover img,
.featured a:focus-visible img {
  transform: scale(1.04);
}

/* Sections */

.section {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.25rem 0 1rem;
}

.section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 600;
  color: var(--chocolate);
  letter-spacing: 0.04em;
}

.section-head p {
  margin: 0.6rem auto 0;
  max-width: 32rem;
  color: var(--muted);
}

/* Galleries */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.gallery a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4 / 5;
  background: var(--cream-deep);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(59, 36, 23, 0.06);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.gallery a:hover img,
.gallery a:focus-visible img {
  transform: scale(1.05);
  filter: saturate(1.08);
}

.gallery a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(36, 21, 12, 0.18), transparent 42%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery a:hover::after,
.gallery a:focus-visible::after {
  opacity: 1;
}

/* Order */

.order {
  width: min(720px, calc(100% - 2rem));
  margin: 3.5rem auto 2rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gold-line);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
  box-shadow: var(--shadow);
}

.order h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  color: var(--chocolate);
}

.order p {
  margin: 0.7rem auto 1.5rem;
  color: var(--muted);
  max-width: 28rem;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.phone-line {
  margin-top: 1.25rem;
  font-size: 1.05rem;
}

.phone-line a {
  color: var(--chocolate);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--tan);
}

.phone-line a:hover { color: var(--gold); }

.socials {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.socials a {
  display: flex;
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--chocolate);
  background: var(--cream);
  border: 1px solid var(--gold-line);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.socials a svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.socials a:hover {
  background: var(--chocolate);
  color: var(--cream);
  transform: translateY(-2px);
}

/* Footer */

.site-footer {
  margin-top: 3rem;
  padding: 2.25rem 1rem 2.75rem;
  background: var(--chocolate-deep);
  color: var(--cream-deep);
  text-align: center;
}

.site-footer .brand-word {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--cream);
  margin: 0 0 0.35rem;
}

.site-footer p {
  margin: 0.2rem 0;
  font-size: 0.92rem;
  color: rgba(247, 241, 230, 0.72);
}

.site-footer .socials a {
  background: transparent;
  color: var(--cream);
  border-color: rgba(212, 181, 106, 0.35);
}

.site-footer .socials a:hover {
  background: var(--gold);
  color: var(--chocolate-deep);
}

.site-footer .fine {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: rgba(247, 241, 230, 0.45);
}

/* Lightbox */

body.noscroll { overflow: hidden; }

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 14, 8, 0.9);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-image {
  max-width: 94vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: var(--chocolate-deep);
}

.lightbox-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 720px);
  color: var(--cream);
  font-size: 0.92rem;
}

.lightbox-caption {
  margin: 0;
  flex: 1;
  color: rgba(247, 241, 230, 0.88);
}

.lightbox-counter {
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(247, 241, 230, 0.12);
  color: var(--cream);
  border: 1px solid rgba(247, 241, 230, 0.25);
  border-radius: 999px;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gold);
  color: var(--chocolate-deep);
  border-color: var(--gold);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Responsive */

@media (max-width: 900px) {
  .featured a:nth-child(2) { transform: none; }
}

@media (max-width: 760px) {
  .gallery,
  .featured {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-cta .btn-label { display: none; }

  .site-nav a:not(.btn) {
    font-size: 0.8rem;
  }
}

@media (max-width: 520px) {
  .site-header { height: auto; padding: 0.55rem 0; }
  .header-inner { flex-wrap: wrap; }
  .site-nav {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .featured {
    grid-template-columns: 1fr;
    max-width: 22rem;
  }

  .featured a { aspect-ratio: 5 / 4; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

#kids, #events {
  scroll-margin-top: 5.25rem;
}

.gallery a:focus-visible,
.featured a:focus-visible {
  outline-offset: 2px;
}

.socials-hero {
  margin-top: 1.35rem;
}

/* Tabs in header */
.site-nav.tabs a {
  position: relative;
  padding: 0.35rem 0.1rem 0.5rem;
}

.site-nav.tabs a.is-active {
  color: var(--chocolate);
}

.site-nav.tabs a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--gold);
}

/* Home sample cards */
.samples {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.sample {
  display: block;
  text-decoration: none;
  color: var(--chocolate);
  background: var(--white);
  border: 1px solid rgba(184, 146, 58, 0.28);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sample:hover,
.sample:focus-visible {
  color: var(--chocolate);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(36, 21, 12, 0.12);
}

.sample img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--cream-deep);
}

.sample h2 {
  margin: 0;
  padding: 1rem 1rem 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
}

/* Category pages */
.cat-page {
  padding-top: 2.25rem;
}

.section-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 600;
  color: var(--chocolate);
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .samples {
    grid-template-columns: 1fr;
    max-width: 22rem;
  }

  .sample img { aspect-ratio: 5 / 4; }
}

@media (max-width: 520px) {
  .site-nav.tabs {
    justify-content: space-around;
    gap: 0.2rem;
  }

  .site-nav.tabs a {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }
}

/* Language gate */

html:not(.has-lang) body {
  overflow: hidden;
}

#lang-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

html.has-lang #lang-gate,
#lang-gate[hidden] {
  display: none;
}

html.has-lang #lang-gate.is-leaving,
#lang-gate.is-leaving {
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.lang-gate-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(246, 241, 234, 0.94) 0%, rgba(251, 247, 239, 0.97) 100%),
    url("../images/image01.jpg") center / cover no-repeat;
  background-color: var(--cream);
}

.lang-gate-card {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  text-align: center;
  padding: clamp(2.25rem, 5vw, 3rem) clamp(1.4rem, 4vw, 2.4rem) 2.4rem;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
}

.lang-gate-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.2rem;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid var(--tan);
  background: var(--cream-deep);
}

.lang-gate-wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 6vw, 2.9rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--chocolate);
  line-height: 1.1;
}

.lang-gate-line {
  width: 4.5rem;
  height: 1px;
  margin: 1.15rem auto 1.3rem;
  background: var(--gold);
}

.lang-gate-choose {
  margin: 0 0 1.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.lang-gate-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.lang-choice {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--chocolate);
  background: transparent;
  border: 1px solid var(--gold-line);
  padding: 0.85rem 1rem;
  cursor: pointer;
  min-height: 3.15rem;
}

.lang-choice:hover,
.lang-choice:focus-visible {
  background: var(--chocolate);
  color: var(--cream);
  border-color: var(--chocolate);
  outline: none;
}

@media (max-width: 520px) {
  .lang-gate-choices {
    grid-template-columns: 1fr;
  }
}

/* Header language pair — always visible after first choice */

.site-header {
  height: auto;
  min-height: var(--header-h);
  padding: 0.2rem 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-shrink: 0;
  padding-left: 0.9rem;
  margin-left: 0.15rem;
  border-left: 1px solid var(--gold-line);
}

.lang-switch button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.4rem 0.15rem 0.55rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--cocoa);
  position: relative;
  line-height: 1;
  min-height: 2.4rem;
}

.lang-switch button:hover {
  color: var(--chocolate);
}

.lang-switch button.is-active {
  color: var(--chocolate);
}

.lang-switch button.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2rem;
  height: 1.5px;
  background: var(--gold);
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .lang-switch {
    width: 100%;
    margin: 0.15rem 0 0.1rem;
    padding: 0.35rem 0 0.1rem;
    border-left: 0;
    border-top: 1px solid var(--gold-line);
    gap: 1.75rem;
  }

  .lang-switch button {
    font-size: 1.12rem;
    min-width: 6.5rem;
    min-height: 2.75rem;
  }
}

.skip-link {
  z-index: 50;
}
