/* Bipity Bopity Cakes — mobile-first stylesheet.
   Written narrow-viewport-first; min-width media queries layer on
   tablet/desktop enhancements. No frameworks, no external fonts. */

:root {
  --color-bg: #FDF6F2;
  --color-surface: #FCE1E2;
  --color-surface-alt: #FBDBD8;
  --color-accent: #DE9485;
  --color-text: #5C332B;
  --color-cta: #B3164C;
  --color-cta-hover: #921040;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Dancing Script', cursive;

  --max-width: 1100px;
  --radius: 14px;
}

@font-face {
  font-family: 'Dancing Script';
  src: url('../fonts/DancingScript-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

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

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

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

a {
  color: var(--color-text);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-cta);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: 0;
  top: -100%;
  background: var(--color-cta);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 200;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-accent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo-link {
  display: block;
  flex-shrink: 0;
}

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

.nav-toggle {
  background: none;
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

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

.primary-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-accent);
}

.primary-nav.is-open {
  display: block;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.primary-nav a {
  display: block;
  padding: 0.6rem 0;
  text-decoration: none;
  font-weight: 600;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--color-cta);
}

/* ---------- Hero ---------- */

.hero {
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
}

.hero-wordmark {
  display: block;
  margin: 0 auto;
  max-width: 320px;
  width: 100%;
  height: auto;
}

.tagline {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.hero-location {
  margin: 0 0 1.5rem;
  color: var(--color-text);
  opacity: 0.85;
}

/* ---------- Buttons / CTAs ---------- */

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
  padding: 0.9rem 1.75rem;
  width: 100%;
  min-width: 200px;
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 999px;
  border: 2px solid transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.btn-cta {
  background: var(--color-cta);
  color: #FFF6F8;
}

.btn-cta:hover,
.btn-cta:focus-visible {
  background: var(--color-cta-hover);
}

/* ---------- Sections ---------- */

.section {
  padding: 2.5rem 0;
}

.section-surface {
  background: var(--color-surface);
}

.section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  margin-left: 0.45rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.15;
}

.section h2 + p {
  margin-top: 0;
}

.section-intro {
  margin-top: 0;
}

/* ---------- About ---------- */

#about p {
  max-width: none;
}

.about-lead {
  font-weight: 700;
  margin: 0 0 1rem;
}

.about-closing {
  font-weight: 700;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.gallery-item {
  padding: 0;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  overflow: hidden;
  background: none;
  cursor: pointer;
  display: block;
  width: 100%;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--color-accent);
  padding: 0.9rem 0;
}

.section h2 + .faq-item {
  padding-top: 0.5rem;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary h3 {
  display: inline;
  font-size: 1.05rem;
  margin: 0;
}

.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--color-cta);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: "\2212";
}

.faq-item p {
  margin: 0.6rem 0 0 1.6rem;
  max-width: 65ch;
}

/* ---------- Contact ---------- */

.hours-note {
  font-weight: 600;
}

.tbd {
  background: var(--color-surface-alt);
  border: 1px dashed var(--color-accent);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
}

.quote-section {
  margin-top: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.quote-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  margin-left: 0.45rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.15;
}

.quote-intro {
  margin-top: 0;
  font-weight: 600;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.quote-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin-top: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-weight: 600;
}

fieldset.form-field {
  border: none;
  margin: 0;
  padding: 0;
}

.form-field legend {
  font-weight: 600;
  padding: 0;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
  font: inherit;
  color: var(--color-text);
  background: #fff;
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}

.form-field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 3px solid var(--color-cta);
  outline-offset: 2px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  padding: 0.85rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

.quote-form .btn {
  border: none;
  cursor: pointer;
}

.quote-form-success {
  margin-top: 1rem;
  font-weight: 600;
  max-width: 480px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 2rem 0;
  text-align: center;
}

.site-footer a {
  color: var(--color-bg);
}

.footer-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.footer-meta {
  opacity: 0.75;
  font-size: 0.9rem;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(92, 51, 43, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 300;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--color-cta);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* =========================================================
   Tablet and up
   ========================================================= */
@media (min-width: 700px) {
  .logo-img {
    width: 220px;
  }

  .nav-toggle {
    display: none;
  }

  .primary-nav {
    display: block;
    position: static;
    background: none;
    border-bottom: none;
  }

  .primary-nav ul {
    flex-direction: row;
    padding: 0;
    gap: 1.5rem;
  }

  .primary-nav a {
    padding: 0.4rem 0;
  }

  .hero-wordmark {
    max-width: 420px;
  }

  .tagline {
    font-size: 1.3rem;
  }

  .cta-row {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

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

  .section h2 {
    font-size: 3.5rem;
    transform: skewX(6deg);
    transform-origin: left bottom;
  }

  .quote-section h3 {
    font-size: 3.5rem;
    transform: skewX(6deg);
    transform-origin: left bottom;
  }

  .btn {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

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

/* =========================================================
   Desktop
   ========================================================= */
@media (min-width: 1000px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .hero-wordmark {
    max-width: 560px;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
