/* ============================================================
   [Your bakery name] — Nairobi custom cakes
   Palette: bleached cream + oxblood + navy
   Type: extra-thin display / extra-bold body (deliberate inversion)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');

:root {
  --bg: #f4ecdc;
  --bg-deep: #e9dcc4;
  --ink: #1a1b2e;
  --ink-soft: #4a4a5e;
  --accent: #6b1f1a;
  --accent-warm: #8a2b22;
  --secondary: #1e2a4a;
  --rule: rgba(26, 27, 46, 0.18);
  --rule-strong: rgba(26, 27, 46, 0.42);
  --card: #fbf6ea;

  /* dark navy band — light text on dark, in both themes */
  --strip-bg: #1e2a4a;
  --strip-ink: #f4ecdc;
  --strip-ink-soft: #cfc6b4;
  --strip-accent: #e8b3a6;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;

  --pad: clamp(1.25rem, 5vw, 4rem);
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #14151f;
    --bg-deep: #1c1e2c;
    --ink: #f2e9d8;
    --ink-soft: #b9b2a4;
    --accent: #e08b7e;
    --accent-warm: #f0a294;
    --secondary: #9fb2e0;
    --rule: rgba(242, 233, 216, 0.2);
    --rule-strong: rgba(242, 233, 216, 0.45);
    --card: #1b1d2b;

    --strip-bg: #232c47;
    --strip-ink: #f4ecdc;
    --strip-ink-soft: #cfc6b4;
    --strip-accent: #e8b3a6;
  }
}

:root[data-theme='dark'] {
  --bg: #14151f;
  --bg-deep: #1c1e2c;
  --ink: #f2e9d8;
  --ink-soft: #b9b2a4;
  --accent: #e08b7e;
  --accent-warm: #f0a294;
  --secondary: #9fb2e0;
  --rule: rgba(242, 233, 216, 0.2);
  --rule-strong: rgba(242, 233, 216, 0.45);
  --card: #1b1d2b;

  --strip-bg: #232c47;
  --strip-ink: #f4ecdc;
  --strip-ink-soft: #cfc6b4;
  --strip-accent: #e8b3a6;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- grain overlay ------------------------------------------------ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-warm); }

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

/* --- type --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 200;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.9rem, 11vw, 8.5rem); }
h2 { font-size: clamp(2rem, 5.5vw, 4rem); }
h3 { font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 300; }
h4 { font-size: 1.1rem; font-weight: 500; letter-spacing: 0.01em; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.1rem, 1.02rem + 0.5vw, 1.4rem);
  line-height: 1.5;
  max-width: 46ch;
}

.eyebrow {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

.muted { color: var(--ink-soft); }

/* placeholder the owner replaces — deliberately visible as a fill-in */
.ph {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-bottom: 2px dotted var(--accent);
  padding: 0 0.15em;
  font-style: normal;
}

/* --- layout ------------------------------------------------------- */
.wrap {
  padding-inline: var(--pad);
  max-width: 1400px;
  margin-inline: auto;
}

section { padding-block: clamp(3.5rem, 9vw, 7rem); }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* --- marquee ticker ----------------------------------------------- */
.marquee {
  background: var(--secondary);
  color: var(--bg);
  overflow: hidden;
  padding-block: 0.7rem;
  border-block: 1px solid var(--rule-strong);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: 3rem;
  animation: scroll 34s linear infinite;
}

.marquee__track span {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee__track span::after {
  content: '◆';
  margin-left: 3rem;
  color: var(--accent);
}

@keyframes scroll { to { transform: translateX(-50%); } }

/* --- header ------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: clamp(1.1rem, 2.6vw, 1.9rem);
  flex-wrap: wrap;
}

.brand {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(1.7rem, 4.6vw, 3rem);
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.brand .brand__place {
  font-family: var(--body);
  font-weight: 800;
  font-size: clamp(0.62rem, 1.1vw, 0.72rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.8vw, 2.4rem);
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  letter-spacing: 0.03em;
  padding: 0.55rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav a:hover, .nav a[aria-current='page'] { border-bottom-color: var(--accent); color: var(--accent); }

.theme-btn {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.theme-btn:hover { background: var(--ink); color: var(--bg); }

/* --- hero --------------------------------------------------------- */
.hero { padding-block: 0; }

.hero__type {
  padding: clamp(2.5rem, 7vw, 5rem) var(--pad) clamp(1.5rem, 4vw, 3rem);
  max-width: 1400px;
  margin-inline: auto;
}

.hero__type h1 { margin-bottom: 0.35em; }

.hero__type h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ink-soft);
}

.hero__img { width: 100%; }
.hero__img img { width: 100%; height: clamp(280px, 62vh, 720px); object-fit: cover; }

/* --- gallery (full-bleed, images ARE the layout) ------------------ */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
}

.gallery > * { grid-column: 1 / -1; }
.gallery > .half { grid-column: 1 / -1; }

@media (min-width: 760px) {
  .gallery > .half { grid-column: span 6; }
  .gallery > .third { grid-column: span 4; }
}

.gallery__head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.gallery__head h2 { margin-bottom: 0.5em; }

.gallery figure { margin: 0; position: relative; overflow: hidden; }

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery .tall img { aspect-ratio: 3 / 4; }
.gallery .wide img { aspect-ratio: 16 / 9; }

.gallery figure:hover img { transform: scale(1.03); }

.gallery figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 2.5rem 1.1rem 1rem;
  background: linear-gradient(to top, rgba(20, 21, 31, 0.82), transparent);
  color: #f7f1e4;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* --- prose blocks ------------------------------------------------- */
.split {
  display: grid;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1.35fr; }
  .split--flip > *:first-child { order: 2; }
}

/* --- menu --------------------------------------------------------- */
.menu-group { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.menu-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.6rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}

.menu-group__head h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.6rem); }

.menu-group__head p {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent);
}

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

.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.5rem;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--rule);
}

.menu-item__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.2;
  margin: 0;
}

.menu-item__price {
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 0.35rem;
}

.menu-item__desc {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  max-width: 68ch;
}

.menu-item__tags {
  grid-column: 1 / -1;
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--secondary);
}

/* --- steps -------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.4rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  color: var(--accent);
}

.steps h3 { margin: 0 0 0.35rem; font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 400; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* --- cards -------------------------------------------------------- */
.cards {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

.card h3 { font-size: 1.25rem; font-weight: 400; margin-bottom: 0.5rem; }
.card p { font-size: 0.94rem; color: var(--ink-soft); }
.card ul { margin: 0.9rem 0 0; padding-left: 1.1rem; font-size: 0.92rem; color: var(--ink-soft); }
.card li { margin-bottom: 0.35rem; }

/* --- form --------------------------------------------------------- */
.order-form { display: grid; gap: 1.1rem; max-width: 640px; }

.field { display: grid; gap: 0.4rem; }

.field label {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.8rem 0.9rem;
  min-height: 48px;
  width: 100%;
}

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

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }

.btn {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 1rem 2rem;
  min-height: 48px;
  cursor: pointer;
  justify-self: start;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover { background: var(--secondary); border-color: var(--secondary); color: var(--bg); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn--ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.form-status {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
}

/* --- FAQ ---------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule); }

.faq details { border-bottom: 1px solid var(--rule); }

.faq summary {
  cursor: pointer;
  padding: 1.15rem 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 44px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  font-family: var(--body);
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.25s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { padding-bottom: 1.2rem; color: var(--ink-soft); font-size: 0.96rem; }

/* --- contact strip ------------------------------------------------ */
.contact-strip {
  background: var(--strip-bg);
  color: var(--strip-ink);
  padding-block: clamp(3rem, 8vw, 6rem);
}

.contact-strip h2 { color: var(--strip-ink); }
.contact-strip a { color: var(--strip-ink); }
.contact-strip .eyebrow { color: var(--strip-accent); }
.contact-strip .muted { color: var(--strip-ink-soft); }

.contact-strip .ph {
  background: color-mix(in srgb, var(--strip-ink) 18%, transparent);
  border-bottom-color: var(--strip-ink);
}

.contact-strip .btn {
  background: var(--strip-ink);
  border-color: var(--strip-ink);
  color: var(--strip-bg);
}

.contact-strip .btn:hover {
  background: var(--strip-accent);
  border-color: var(--strip-accent);
  color: var(--strip-bg);
}

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2rem;
}

@media (min-width: 760px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }

.contact-grid h3 { font-size: 1rem; font-weight: 500; letter-spacing: 0.02em; margin-bottom: 0.4rem; }
.contact-grid p { font-size: 0.95rem; margin: 0; }

/* --- footer ------------------------------------------------------- */
.site-foot {
  padding-block: 2.5rem 4.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}

.site-foot a { color: var(--ink-soft); }

.attribution {
  position: static;
  opacity: 1;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0;
}

.attribution a { color: var(--ink-soft); text-decoration: underline; }

/* --- page intro --------------------------------------------------- */
.page-intro { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 3vw, 2rem); }
.page-intro h1 { font-size: clamp(2.4rem, 8vw, 6rem); }

/* --- reveal ------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 32%;
    }
    @keyframes reveal {
      from { opacity: 0; transform: translateY(24px); }
      to { opacity: 1; transform: none; }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .gallery figure:hover img { transform: none; }
}
