/*
Theme Name: Crumb & Clover
Theme URI: https://example.com
Author: Your Studio
Description: A layered, hand-piped WordPress theme for cake makers and bakeries. Built around a tiered-cake motif, warm plum-and-gold palette, and scalloped section dividers that echo piped buttercream.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: crumbclover
*/

/* =========================================================
   TOKENS
   ========================================================= */
:root{
  --cream:      #FBF7EF;
  --blush:      #E6F2F4;
  --plum:       #104B56;
  --plum-soft:  #187181;
  --rose:       #26B3CC;
  --gold:       #C9A15A;
  --charcoal:   #1F2E33;
  --white:      #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', -apple-system, sans-serif;

  --radius-soft: 4px;
  --max-width: 1180px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
}
img{ max-width:100%; display:block; }
a{ color: var(--plum); text-decoration: none; }
ul{ margin:0; padding:0; list-style:none; }

h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--plum);
  line-height: 1.1;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1{ font-size: clamp(2.6rem, 6vw, 4.6rem); font-optical-sizing:auto; }
h2{ font-size: clamp(1.9rem, 4vw, 2.8rem); font-style: italic; font-weight: 500; }
h3{ font-size: 1.3rem; font-style: normal; }

p{ margin: 0 0 1em; }

.eyebrow{
  font-family: var(--font-body);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 700;
  display:inline-block;
  margin-bottom: .8em;
}

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 6vw;
}

/* Accessible focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   SIGNATURE: TIER DIVIDER (scalloped piping edge between sections)
   ========================================================= */
.tier-divider{
  width:100%;
  height: 34px;
  line-height:0;
  overflow:hidden;
}
.tier-divider svg{ width:100%; height:100%; display:block; }

/* Sprinkle-dot background texture (used behind hero + CTA) */
.sprinkle-bg{
  position:relative;
}
.sprinkle-bg::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    radial-gradient(var(--rose) 1.5px, transparent 1.6px),
    radial-gradient(var(--gold) 1.5px, transparent 1.6px);
  background-size: 46px 46px, 64px 64px;
  background-position: 0 0, 22px 30px;
  opacity: .16;
  pointer-events:none;
}
.sprinkle-bg > .container{ position:relative; z-index:1; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  position: sticky; top:0; z-index: 50;
  background: rgba(250,243,236,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(62,36,64,.08);
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.site-branding{ display:flex; align-items:center; gap:.6rem; }
.site-branding .mark{
  width: 34px; height: 34px; flex-shrink:0;
}
.custom-logo-link{ display:flex; align-items:center; }
.custom-logo{
  height: 52px;
  width: auto;
  display: block;
}
.site-title{
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--plum);
  font-weight: 700;
  margin:0;
}
.site-title a{ color: inherit; }

.primary-nav ul{ display:flex; gap: 2.1rem; }
.primary-nav a{
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--plum);
  position: relative;
  padding: .3rem 0;
}
.primary-nav a::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.primary-nav a:hover::after, .primary-nav a:focus-visible::after{ transform: scaleX(1); }

.nav-toggle{ display:none; background:none; border:none; cursor:pointer; padding: .65rem; margin: -.65rem; }

@media (max-width: 780px){
  .primary-nav{
    position:absolute; top:100%; left:0; right:0;
    background: var(--cream);
    border-bottom: 1px solid rgba(62,36,64,.1);
    display:none;
  }
  .primary-nav.is-open{ display:block; }
  .primary-nav ul{ flex-direction:column; gap:0; padding: 1rem 6vw 1.6rem; }
  .primary-nav li{ padding: .7rem 0; border-bottom: 1px solid rgba(62,36,64,.06); }
  .nav-toggle{ display:block; }
}

/* =========================================================
   HERO — signature layered-cake illustration
   ========================================================= */
.hero{
  padding: 5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero .container{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  align-items:center;
}
.hero-copy p.lede{
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--plum-soft);
}
.hero-actions{ display:flex; gap: 1rem; margin-top: 1.6rem; flex-wrap:wrap; }

.btn{
  display:inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  padding: .85rem 1.7rem;
  border-radius: var(--radius-soft);
  border: 2px solid transparent;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.btn-primary{ background: var(--plum); color: var(--cream); }
.btn-primary:hover{ background: var(--plum-soft); transform: translateY(-2px); }
.btn-outline{ border-color: var(--plum); color: var(--plum); }
.btn-outline:hover{ background: var(--plum); color: var(--cream); }

/* CSS-built tiered cake */
.cake-illustration{
  --tier1: 220px;
  --tier2: 168px;
  --tier3: 118px;
  display:flex; flex-direction:column; align-items:center;
  filter: drop-shadow(0 24px 30px rgba(62,36,64,.18));
}
.cake-illustration .tier{
  border-radius: 10px 10px 6px 6px;
  position:relative;
  background: linear-gradient(180deg, var(--white), var(--blush));
  border: 2px solid rgba(62,36,64,.12);
  opacity:0;
  transform: translateY(24px);
  animation: rise .7s ease forwards;
}
.cake-illustration .tier::before{
  content:""; position:absolute; left:-6px; right:-6px; top:-3px; height:16px;
  background-repeat: repeat-x;
  background-size: 20px 16px;
  background-image: radial-gradient(circle at 10px 0, transparent 8px, var(--rose) 9px);
  opacity:.85;
}
.cake-illustration .t1{ width: var(--tier1); height: 64px; animation-delay:.5s; }
.cake-illustration .t2{ width: var(--tier2); height: 56px; animation-delay:.3s; }
.cake-illustration .t3{ width: var(--tier3); height: 48px; animation-delay:.1s; z-index:2; }
.cake-illustration .cherry{
  width: 20px; height:20px; border-radius:50%;
  background: var(--gold); margin-bottom:-4px; z-index:3;
  opacity:0; animation: pop .4s ease forwards .95s;
}
@keyframes rise{ to{ opacity:1; transform: translateY(0); } }
@keyframes pop{ from{ opacity:0; transform: scale(0);} to{ opacity:1; transform: scale(1);} }

@media (max-width: 780px){
  .hero .container{ grid-template-columns: 1fr; }
  .cake-illustration{ order:-1; }
}
@media (max-width: 420px){
  .cake-illustration{ --tier1: 170px; --tier2: 130px; --tier3: 92px; }
}

/* =========================================================
   SECTIONS (generic)
   ========================================================= */
.section{ padding: 4.5rem 0; }
.section-alt{ background: var(--blush); }
.section-plum{ background: var(--plum); color: var(--cream); }
.section-plum h2, .section-plum h3{ color: var(--cream); }
.section-head{ max-width: 60ch; margin-bottom: 2.6rem; }

/* Cards grid — "layers" of the menu */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}
@media (max-width: 900px){ .grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .grid{ grid-template-columns: 1fr; } }

.card{
  background: var(--white);
  border-radius: var(--radius-soft);
  overflow:hidden;
  border: 1px solid rgba(62,36,64,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-4px); box-shadow: 0 16px 26px rgba(62,36,64,.12); }
.card img{ aspect-ratio: 4/3; object-fit:cover; width:100%; }
.card-body{ padding: 1.3rem 1.4rem 1.6rem; }
.card-body h3{ margin-bottom:.3rem; }
.price{ color: var(--rose); font-weight:700; font-size:.9rem; }

/* Illustrated cake artwork used on menu cards in place of flat placeholders */
.card-art{ aspect-ratio: 4/3; width:100%; }
.card-art svg{ width:100%; height:100%; display:block; }

/* =========================================================
   GALLERY — photo-forward masonry (each tile keeps its natural
   orientation — landscape, square, or portrait — via CSS columns rather
   than a fixed grid, so nothing gets force-cropped to fit a box)
   ========================================================= */
.gallery{
  column-count: 3;
  column-gap: .8rem;
}
.gallery a{
  display:block;
  break-inside: avoid;
  margin-bottom: .8rem;
  border-radius: var(--radius-soft);
  overflow:hidden;
}
.gallery img{ width:100%; height:auto; display:block; transition: transform .4s ease; }
.gallery a:hover img{ transform: scale(1.03); }
@media (max-width: 900px){ .gallery{ column-count: 2; } }
@media (max-width: 560px){ .gallery{ column-count: 2; column-gap: .6rem; } }

/* =========================================================
   PHOTO WALL — full gallery page, same natural-orientation masonry as
   the homepage teaser
   ========================================================= */
.photo-wall{
  column-count: 4;
  column-gap: .8rem;
}
.photo-wall a{
  display:block;
  break-inside: avoid;
  margin-bottom: .8rem;
  border-radius: var(--radius-soft);
  overflow:hidden;
  cursor: zoom-in;
}
.photo-wall img{ width:100%; height:auto; display:block; transition: transform .4s ease; }
.photo-wall a:hover img{ transform: scale(1.03); }
@media (max-width: 900px){ .photo-wall{ column-count: 3; } }
@media (max-width: 600px){ .photo-wall{ column-count: 2; column-gap: .6rem; } }

.wall-pagination{
  display:flex; justify-content:center; gap: .6rem;
  margin-top: 2.8rem;
}
.wall-pagination a, .wall-pagination span{
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 40px; height: 40px; padding: 0 .6rem;
  border-radius: var(--radius-soft);
  font-size: .9rem; font-weight: 700;
  border: 1px solid rgba(16,75,86,.15);
  color: var(--plum);
}
.wall-pagination a:hover{ background: var(--blush); }
.wall-pagination span.current{ background: var(--plum); color: var(--cream); border-color: var(--plum); }

.wall-empty{
  text-align:center;
  padding: 3rem 0;
  color: var(--plum-soft);
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-grid{
  display:grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
.contact-info{
  background: var(--white);
  border: 1px solid rgba(16,75,86,.1);
  border-radius: var(--radius-soft);
  padding: 2rem;
}
.contact-info h3{ margin-bottom: 1rem; }
.contact-info p{ margin-bottom: .6rem; font-size: 1.05rem; }
.contact-info a{ font-weight: 700; }

.contact-form p{ margin-bottom: 1.1rem; }
.contact-form label{
  display:block;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .02em;
  margin-bottom: .35rem;
  color: var(--plum);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea{
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(16,75,86,.2);
  border-radius: var(--radius-soft);
  background: var(--white);
  color: var(--charcoal);
}
.contact-form textarea{ resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus{
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(38,179,204,.18);
}
.contact-form .g-recaptcha{ margin-bottom: 1.2rem; }

/* Honeypot — invisible to real visitors, not display:none (some bots skip that check) */
.cc-hp{
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status{
  padding: .9rem 1.1rem;
  border-radius: var(--radius-soft);
  margin-bottom: 1.4rem;
  font-weight: 600;
}
.form-status-success{ background: #E1F3EA; color: #1E5B3C; }
.form-status-error{ background: #FBE7E7; color: #8A2E2E; }

@media (max-width: 780px){
  .contact-grid{ grid-template-columns: 1fr; }
}

/* Decorative floating icon strip */
.icon-strip{
  display:flex; justify-content:center; gap: 3rem; flex-wrap:wrap;
  padding: 1.2rem 0 .4rem;
  opacity: .9;
}
.icon-strip svg{ width: 38px; height: 38px; }

/* =========================================================
   LIGHTBOX — minimal, dependency-free overlay for gallery clicks
   ========================================================= */
.cc-lightbox{
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16,75,86,.92);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease;
  z-index: 1000;
  padding: 2rem;
}
.cc-lightbox.is-open{ opacity: 1; visibility: visible; }
.cc-lightbox-img{
  max-width: min(90vw, 1100px);
  max-height: 86vh;
  width: auto; height: auto;
  border-radius: var(--radius-soft);
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.cc-lightbox-close{
  position: absolute; top: 1.2rem; right: 1.4rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--plum);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display:flex; align-items:center; justify-content:center;
}
.cc-lightbox-close:hover{ background: var(--gold); color: var(--white); }
body.cc-lightbox-lock{ overflow: hidden; }
.gallery a{ cursor: zoom-in; }

/* Testimonial */
.testimonial{
  max-width: 62ch; margin: 0 auto; text-align:center;
}
.testimonial blockquote{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--cream);
  margin: 0 0 1rem;
}
.testimonial cite{ font-style:normal; font-size:.85rem; opacity:.8; }

/* CTA band */
.cta-band{
  text-align:center;
  padding: 3.5rem 0;
}
.cta-band h2{ margin-bottom: .3rem; }

/* =========================================================
   PAGE / SINGLE CONTENT
   ========================================================= */
.entry{ padding: 4rem 0 5rem; max-width: 74ch; margin:0 auto; }
.entry img{ border-radius: var(--radius-soft); margin: 1.5rem 0; }
.entry h2{ font-style:normal; font-size: 1.7rem; margin-top: 2rem; }

/* Archive / blog list */
.post-list{ display:grid; gap: 2.4rem; max-width: 74ch; margin: 0 auto; }
.post-list article{ border-bottom: 1px solid rgba(62,36,64,.1); padding-bottom: 2rem; }
.post-list h2{ font-size: 1.6rem; margin-bottom:.3rem; }
.post-meta{ font-size:.82rem; color: var(--rose); text-transform:uppercase; letter-spacing:.08em; margin-bottom:.6rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{
  background: var(--plum);
  color: var(--blush);
  padding: 3.5rem 0 2rem;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.site-footer h4{ color: var(--cream); font-size:1rem; font-family: var(--font-body); font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin-bottom:1rem;}
.site-footer a{ color: var(--blush); opacity:.85; }
.site-footer a:hover{ opacity:1; text-decoration: underline; }
.footer-bottom{
  border-top: 1px solid rgba(250,243,236,.15);
  padding-top: 1.4rem;
  font-size: .82rem;
  opacity:.75;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:.5rem;
}
@media (max-width: 700px){ .footer-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-banner{
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-soft);
  overflow: hidden;
}
.about-banner img{ width:100%; height:auto; max-height: 420px; object-fit: cover; }

.about-photos{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 3rem;
}
.about-photo{ aspect-ratio: 4/5; border-radius: var(--radius-soft); overflow:hidden; }
.about-photo img{ width:100%; height:100%; object-fit:cover; }
@media (max-width: 700px){
  .about-photos{ grid-template-columns: 1fr 1fr; }
  .about-photo:nth-child(3){ grid-column: span 2; aspect-ratio: 16/9; }
}

.about-values{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 2.4rem auto 0;
  text-align: left;
}
.about-values h3{ font-size: 1.1rem; }
@media (max-width: 700px){ .about-values{ grid-template-columns: 1fr; } }
