:root {
  --cream: #fdf7e9;
  --cream-deep: #f6ead2;
  --burgundy: #a93044;
  --burgundy-dark: #83243a;
  --brown: #3f2a26;
  --brown-soft: #6b524c;
  --radius: 14px;
  --gutter: clamp(1rem, 5vw, 4rem);
  --measure: 62ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 3.5rem; } /* clears the sticky header */

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font: 1.05rem/1.65 Georgia, "Times New Roman", serif;
  font-family: Lora, Georgia, serif;
}

img { max-width: 100%; height: auto; display: block; }
.hero > *, .feature > * { min-width: 0; }

a { color: var(--burgundy); }
a:hover { color: var(--burgundy-dark); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font: 400 clamp(3rem, 8vw, 5.5rem)/1 "Great Vibes", cursive; color: var(--burgundy); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; color: var(--burgundy); }

section { padding: clamp(3rem, 8vw, 6rem) var(--gutter); }
/* sections on the same background share one gap instead of doubling it */
.feature, .gallery, .extras { padding-top: 0; scroll-margin-top: 1.5rem; }
section > h2, .lead, .note { text-align: center; }
.lead { max-width: var(--measure); margin: 0 auto 2.5rem; color: var(--brown-soft); }

.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border: 2px solid var(--burgundy);
  border-radius: 999px;
  background: var(--burgundy);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: var(--burgundy-dark); border-color: var(--burgundy-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--burgundy); }
.btn-outline:hover { background: var(--burgundy); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* header */
.top {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding: .75rem var(--gutter);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cream-deep);
}
.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brown);
}
.top nav { display: flex; gap: 1.25rem; }
.top nav a { text-decoration: none; font-weight: 600; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-text p { max-width: var(--measure); }
.tagline { font-size: 1.3rem; font-style: italic; color: var(--brown-soft); margin-top: 0; }
.hero-img {
  border-radius: var(--radius);
  box-shadow: 0 20px 40px -20px rgba(63, 42, 38, .45);
}

/* cookies feature */
.feature {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.feature img { border-radius: var(--radius); }

/* cakes menu */
.menu { background: var(--cream-deep); }
.columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
/* each group sits on its own lighter panel so the lists read as sets */
.columns > div {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--cream);
  text-align: center;
}
.columns ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 1rem; }
.columns li { break-inside: avoid; padding: .3rem 0; line-height: 1.3; } /* wrapped items stay visibly one item */
.columns p { margin: 0; }
.note { margin: 2.5rem auto 0; font-style: italic; }

/* gourmet: same width as the gallery, three across so each photo runs a little larger */
.gourmet .grid { grid-template-columns: repeat(3, 1fr); }
.gourmet h3 { margin: .6rem 0 0; text-align: center; }

/* gallery */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* extras */
.extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.extras p { margin: 0; color: var(--brown-soft); }

/* visit */
.visit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  background: var(--cream-deep);
  padding: clamp(2rem, 5vw, 4rem);
  margin-bottom: 5rem;
}
/* piped-frosting scallops along the top and bottom edges */
.visit::before, .visit::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: radial-gradient(circle at 50% 100%, var(--cream-deep) 7px, transparent 7.6px) 0 0 / 28px 14px repeat-x;
}
.visit::before { top: -14px; }
.visit::after { bottom: -14px; transform: scaleY(-1); }
.visit h2 { text-align: left; }
address { font-style: normal; line-height: 1.8; }
.social { display: flex; gap: 1rem; }
.hours { border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: .35rem 1.5rem .35rem 0; font-weight: 400; }
.hours th { color: var(--brown-soft); }
.hours td { white-space: nowrap; }

footer {
  padding: 2rem var(--gutter);
  text-align: center;
  color: var(--brown-soft);
  font-size: .9rem;
}

@media (max-width: 760px) {
  html { scroll-padding-top: 7.5rem; } /* header wraps to two rows */
  .top nav { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; }
}

/* stacked layout for upright phones only; sideways phones keep the side-by-side layout */
@media (max-width: 760px) and (orientation: portrait) {
  .hero, .feature { grid-template-columns: 1fr; }
  .hero-img { max-height: 70vh; width: auto; max-width: 100%; margin: 0 auto; }
  .feature img { order: -1; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .gourmet .grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .columns { grid-template-columns: 1fr; }
  .columns > div { padding: 1.25rem 1rem; }
}

/* short, wide screens (phones turned sideways) */
@media (orientation: landscape) and (max-height: 500px) {
  .top { position: static; } /* a pinned header would cover a third of the screen */
  html { scroll-padding-top: 0; }
  .hero-img, .feature img { max-height: 85vh; width: auto; margin: 0 auto; }
}
