/* =========================================================
   Cloud Bakery — Shared Stylesheet
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg-cream:        #faf3e8;
  --bg-cream-deep:   #f3e6cf;
  --bg-card:         #fbf6ec;
  --bg-card-hover:   #fff9ed;

  --text-primary:    #3d2817;
  --text-secondary:  #6b4a2f;
  --text-muted:      #8a7560;

  --brand-brown:     #5a2e1a;
  --brand-caramel:   #8b5e3c;
  --accent-cranberry:#b8463f;
  --accent-olive:    #8b7d4a;
  --border-soft:     rgba(93, 46, 26, 0.10);
  --shadow-soft:     0 10px 40px rgba(93, 58, 38, 0.08);
  --shadow-hover:    0 18px 50px rgba(93, 58, 38, 0.15);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Lora', Georgia, 'Times New Roman', serif;
  --font-script:  'Sacramento', 'Allura', cursive;

  --max-width: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Site background image (clouds) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url('background.png') center bottom / cover no-repeat fixed;
}

/* Light overlay so text stays readable */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(250, 243, 232, 0.45);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; }

/* Visually hidden but accessible text */
.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;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  padding: 12px 0;
  background: rgba(251, 246, 236, 0.94);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: block;
  flex-shrink: 0;
  padding: 0;
}

.brand-logo {
  height: clamp(104px, 16vw, 152px);
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(90, 46, 26, 0.1));
}

.contact-note {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}
.contact-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.brand-name {
  display: block;
  font-family: var(--font-script);
  font-size: 38px;
  line-height: 0.95;
  color: var(--brand-brown);
  letter-spacing: 0.5px;
}
.brand-name .small {
  display: block;
  font-size: 22px;
  margin-top: -4px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  padding: 8px 2px;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--brand-brown);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--brand-brown);
  transition: width .3s ease, left .3s ease;
}
.nav a:hover::after { width: 100%; left: 0; }
.nav a.active {
  color: var(--brand-brown);
  font-weight: 600;
}

.nav a.active::after {
  width: 100%;
  left: 0;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 36px 0 56px;
}

.hero-compact {
  padding: 16px 0 24px;
}

.hero-compact h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 8px;
}

.hero-compact .lede {
  margin-bottom: 0;
}
.hero h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.1;
  color: var(--brand-brown);
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}
.hero p.lede {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 auto 28px;
  max-width: 540px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #fff8ec;
  background: var(--brand-brown);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: 0 6px 18px rgba(90, 46, 26, 0.25);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(90, 46, 26, 0.32);
  background: #4a2414;
}
.btn-caramel  { background: var(--accent-olive); box-shadow: 0 6px 18px rgba(139,125,74,.3);}
.btn-caramel:hover  { background: #756a3d; }
.btn-cranberry{ background: var(--accent-cranberry); box-shadow: 0 6px 18px rgba(184,70,63,.3);}
.btn-cranberry:hover{ background: #9c372f; }

.btn-outline {
  background: transparent;
  color: var(--brand-brown);
  border: 1.5px solid var(--brand-brown);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--brand-brown);
  color: #fff8ec;
}

/* ---------- Product Card Grid ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 8px 0 48px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .35s ease, box-shadow .35s ease;
  display: flex;
  flex-direction: column;
  animation: fadeUp .9s ease both;
}
.product-card:nth-child(1) { animation-delay: .1s; }
.product-card:nth-child(2) { animation-delay: .25s; }
.product-card:nth-child(3) { animation-delay: .4s; }

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.product-card .img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #d4a574 0%, #8b5e3c 100%);
  position: relative;
}
.product-card .img-wrap::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36px;
  color: rgba(255,255,255,.85);
  z-index: 0;
}
.product-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: relative; z-index: 1;
  transition: transform .6s ease;
}
.product-card:hover img { transform: scale(1.05); }

.product-card .body {
  padding: 22px 22px 26px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.product-card .tagline {
  font-style: italic;
  color: var(--text-secondary);
  margin: 0 0 18px;
  flex: 1;
}

/* ---------- Section Divider with title ---------- */
.section-title {
  text-align: center;
  position: relative;
  margin: 44px 0 22px;
}
.section-title h2 {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 44px);
  color: var(--brand-brown);
  margin: 0;
  padding: 0 22px;
  background: transparent;
  position: relative;
  z-index: 1;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--border-soft);
}
.section-title-bg {
  background: var(--bg-cream);
  padding: 0 22px;
  display: inline-block;
  position: relative;
  z-index: 1;
}

/* ---------- About section ---------- */
.about {
  text-align: center;
  padding: 18px 0 34px;
  max-width: 720px;
  margin: 0 auto;
}
.about h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  color: var(--text-primary);
  margin: 0 0 16px;
}
.about p {
  font-size: 17px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

/* ---------- Order & Delivery ---------- */
.delivery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 14px 0 48px;
}
.feature {
  background: var(--bg-card);
  padding: 32px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease;
}
.feature:hover { transform: translateY(-4px); }
.feature .icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  background: var(--bg-cream-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}
.feature h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.feature.accent h4 { color: var(--accent-cranberry); }
.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Product detail pages ---------- */
.detail-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 30px 0 70px;
}
.detail-hero .img-wrap {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  background: linear-gradient(135deg, #d4a574 0%, #8b5e3c 100%);
  position: relative;
}
.detail-hero .img-wrap::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  color: rgba(255,255,255,.9);
  text-align: center;
  padding: 20px;
  z-index: 0;
}
.detail-hero .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: relative; z-index: 1;
}
.detail-hero h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(36px, 5vw, 52px);
  color: var(--brand-brown);
  margin: 0 0 18px;
  line-height: 1.1;
}
.detail-hero .lead {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 24px;
}
.detail-hero .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-caramel);
  margin-bottom: 12px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 30px;
}
.feature-list li {
  padding: 12px 0 12px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 16px;
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list .emoji {
  font-size: 22px;
  flex-shrink: 0;
}

.serving-suggestion,
.why-choose {
  background: var(--bg-card);
  border-left: 3px solid var(--brand-caramel);
  padding: 28px 32px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 40px 0;
}
.serving-suggestion h3,
.why-choose h3 {
  font-family: var(--font-display);
  font-style: italic;
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--brand-brown);
}
.serving-suggestion p {
  margin: 0;
  color: var(--text-secondary);
}
.why-choose ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
}
.why-choose ul li { padding: 4px 0; }

/* ---------- Order CTA box ---------- */
.section-simple {
  padding: 24px 0;
  text-align: center;
}

.section-simple p {
  max-width: 560px;
  margin: 0 auto 20px;
  color: var(--text-secondary);
}

.order-cta {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 50px 40px;
  text-align: center;
  margin: 40px 0;
  box-shadow: var(--shadow-soft);
}

.order-cta-compact {
  padding: 28px 24px;
  margin: 0;
}

.order-cta h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36px;
  color: var(--brand-brown);
  margin: 0 0 12px;
}

.order-cta-compact h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.order-cta p {
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 28px;
}

.order-cta-compact p {
  margin-bottom: 18px;
  font-size: 15px;
}

.order-notes {
  font-size: 15px;
  line-height: 1.7;
}

.order-notes a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link-wrap {
  text-align: center;
  margin: 0 0 28px;
  font-size: 15px;
}

.back-link-wrap a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link-wrap a:hover {
  color: var(--brand-brown);
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
}
.contact-grid a {
  background: #fff8ec;
  padding: 16px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  font-size: 14px;
  color: var(--text-primary);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.contact-grid a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 0;
}

.contact-links a {
  display: inline-block;
  padding: 14px 28px;
  background: #fff8ec;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  font-size: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-links a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 40px 24px 30px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 40px;
}
.site-footer .heart { color: var(--accent-cranberry); }

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .products,
  .delivery,
  .contact-grid { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 1fr; gap: 32px; }
  .site-header .container {
    flex-wrap: wrap;
    align-items: center;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px 18px;
    font-size: 14px;
    padding-top: 4px;
    border-top: 1px solid var(--border-soft);
  }
  .order-cta { padding: 36px 22px; }
}
@media (max-width: 600px) {
  .hero { padding: 20px 0 36px; }
  .section-title { margin: 34px 0 18px; }
}
