/* =========================================================
   Lily2Silly — Cross-subdomain demo stylesheet
   Main site: lily2silly.com (this codebase)
   Store subdomain: shop.lily2silly.com (external, fetched via REST)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Manrope:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root{
  --sky:      #AEE0F2;
  --blush:    #F7D9E6;
  --lilac:    #D9C9EE;
  --paper:    #FFFDFB;
  --ink:      #2B2733;
  --ink-soft: #5B5566;
  --accent:   #FF6FA0;
  --accent-dark: #E14F84;
  --line:     rgba(43,39,51,0.10);
  --shadow:   0 10px 30px -12px rgba(43,39,51,0.20);
  --shadow-lg:0 20px 50px -18px rgba(43,39,51,0.28);

  --radius:   12px;
  --radius-lg:20px;

  --font-display: 'Caveat', cursive;
  --font-body:    'Manrope', system-ui, sans-serif;
  --font-mono:    'Space Mono', monospace;

  --header-h: 152px;
  --touch: 48px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family: inherit; cursor:pointer; }
ul{ margin:0; padding:0; list-style:none; }

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

.visually-hidden{
  position:absolute; width:1px; height:1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;
}

.container{
  width:100%;
  max-width: 1180px;
  margin-inline:auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* =========================================================
   Marble banner — reserved dimensions to avoid CLS.
   Uses a background <img> with onerror → CSS gradient fallback
   so the layout never shifts once the real photo is added.
   ========================================================= */
.marble-banner{
  position:relative;
  height: 260px;
  overflow:hidden;
  background: linear-gradient(120deg, var(--sky), var(--lilac) 45%, var(--blush) 100%);
}
.marble-banner img{
  position:absolute; inset:0;
  width:100%; height:100%; object-fit:cover;
}

/* =========================================================
   Header — 3-part layout
   ========================================================= */
.site-header{
  position: relative; z-index:50;
  height: var(--header-h);
  display:flex; align-items:center;
  margin-top: -226px;
}
.header-glass{
  width:100%; max-width:1180px; margin-inline:auto;
  display:flex; justify-content:center; align-items:center;
  gap: clamp(24px, 4vw, 48px);
  padding: 10px clamp(14px, 3vw, 28px);
  background: rgba(255,253,251,0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.nav-block{ display:flex; align-items:center; gap: clamp(10px, 1.4vw, 18px); }

.bow-icon{ height:18px; width:auto; display:inline-block; vertical-align:middle; }
.bow-icon-lg{ height:22px; width:auto; display:inline-block; vertical-align:middle; }

.nav-link{
  font-weight:600; font-size:0.95rem; color: var(--ink);
  padding: 8px 4px; min-height: var(--touch);
  display:inline-flex; align-items:center; position:relative;
}
.nav-link::after{
  content:""; position:absolute; left:4px; right:4px; bottom:6px;
  height:2px; background: var(--accent);
  transform: scaleX(0); transform-origin:left; transition: transform .2s ease;
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after{ transform: scaleX(1); }

.nav-link.external{ display:inline-flex; align-items:center; gap:5px; }
.nav-link.external svg{ width:13px; height:13px; opacity:.7; }

.icon-btn{
  width: var(--touch); height: var(--touch);
  display:inline-flex; align-items:center; justify-content:center;
  border:none; background:transparent; color: var(--accent-dark);
  border-radius: 50%; transition: background .15s ease, transform .15s ease;
}
.icon-btn:hover{ background: rgba(255,111,160,0.14); transform: translateY(-1px); }
.icon-btn svg{ width:20px; height:20px; }

.brand{ display:flex; flex-direction:column; align-items:center; gap:2px; padding: 4px 8px; }
.brand-logo{ height:108px; width:auto; }
.brand-mark-fallback{ width:230px; height:auto; color:var(--ink); }

.nav-toggle{ display:none; }

/* Mobile slide-out panel — hidden and out of flow by default;
   the mobile media query below switches it to a fixed, off-canvas
   panel that .is-open slides into view. Without this base rule the
   panel sits as plain static content at every width, which is what
   was breaking the toggle on small screens. */
.mobile-panel{
  display:none;
}

/* =========================================================
   Hero — reserved aspect-ratio box, no CLS on image load/fail
   ========================================================= */
.hero{ padding: 56px 0 40px; }
.hero-grid{
  display:grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px); align-items:center;
}
.eyebrow{
  font-family: var(--font-mono); font-size:0.72rem; letter-spacing:.14em;
  text-transform:uppercase; color: var(--accent-dark);
  display:inline-flex; align-items:center; gap:8px; margin-bottom:14px;
}
.eyebrow::before{ content:""; width:22px; height:2px; background:var(--accent-dark); display:inline-block; }

.hero-title{
  font-family: var(--font-display); font-weight:700;
  font-size: clamp(2.6rem, 5vw, 4.2rem); line-height:1.02; margin: 0 0 18px;
}
.hero-title em{ font-style:normal; color: var(--accent-dark); }
.hero-copy{ color: var(--ink-soft); font-size:1.05rem; max-width:46ch; margin:0 0 28px; }

.btn-row{ display:flex; flex-wrap:wrap; gap:14px; }
.btn{
  min-height: var(--touch); padding: 0 26px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 999px; font-weight:700; font-size:0.95rem;
  border: 2px solid var(--ink); transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn-primary{ background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover{ background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); }
.btn-ghost{ background: transparent; color: var(--ink); }
.btn-ghost:hover{ background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.hero-art{
  position:relative; aspect-ratio: 4/5; border-radius: var(--radius-lg);
  overflow:hidden; box-shadow: var(--shadow-lg);
  background: linear-gradient(155deg, var(--lilac), var(--blush) 55%, var(--sky));
}
.hero-art img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }

/* =========================================================
   Full-width hero image band (single large frame, no overlaid
   copy) — reserved aspect-ratio avoids CLS whether the real
   asset loads or the fallback SVG takes over.
   ========================================================= */
.hero-full{ padding: 112px 0 0; }
.hero-full-frame{
  position:relative;
  width:100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(155deg, var(--lilac), var(--blush) 55%, var(--sky));
}
.hero-full-frame img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }

/* Two-column intro copy under the hero image */
.intro-band{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 48px);
  padding: 44px 0 12px;
}
.intro-col{
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.intro-col p{ margin:0; }

/* Three centered outline CTAs */
.cta-row-band{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap: clamp(16px, 4vw, 64px);
  padding: 40px 0 8px;
}
.btn-outline{
  min-height: var(--touch);
  min-width: 160px;
  padding: 0 30px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  color: var(--accent-dark);
  font-weight:600; font-size:0.92rem;
  letter-spacing: .02em;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn-outline:hover{
  background: var(--accent);
  color: var(--paper);
  transform: translateY(-2px);
}

/* Bow divider — the single decorative use of the bow asset,
   as a centered break between sections. */
.bow-divider{
  display:flex; align-items:center; gap:18px;
  padding: 8px 0;
}
.bow-divider::before, .bow-divider::after{
  content:""; flex:1; height:1px; background: var(--line);
}
.bow-divider img{ height:26px; width:auto; flex-shrink:0; }

/* =========================================================
   Sections / cards
   ========================================================= */
.section{ padding: 56px 0; }
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:20px;
  margin-bottom: 28px; flex-wrap:wrap;
}
.section-title{
  font-family: var(--font-display); font-weight:700;
  font-size: clamp(1.9rem, 3vw, 2.6rem); margin:0;
}
.section-link{
  font-weight:700; font-size:0.9rem; border-bottom: 2px solid var(--accent);
  padding-bottom:2px; min-height: var(--touch); display:inline-flex; align-items:center;
}
/* Top padding here clears the header's overlap drag (the header's
   negative margin-top pulls all following flow content up with it,
   not just itself) — otherwise this text renders hidden inside the
   marble banner instead of below it. Values matched to each
   breakpoint's actual banner/header overlap amount. */
.breadcrumbs{ font-family: var(--font-mono); font-size:0.78rem; color: var(--ink-soft); padding: 90px 0 0; }
.breadcrumbs a{ color: var(--accent-dark); }

.product-grid, .blog-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap:24px;
}

.card{
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow:hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display:flex; flex-direction:column;
}
.card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-link{ display:flex; flex-direction:column; height:100%; }

.thumb{
  position:relative; aspect-ratio: 1/1; overflow:hidden;
  background: linear-gradient(155deg, var(--sky), var(--blush));
}
.thumb img{ width:100%; height:100%; object-fit:cover; }
.thumb-badge{
  position:absolute; bottom:10px; left:10px;
  background: rgba(43,39,51,0.72); color:#fff;
  font-family: var(--font-mono); font-size:0.62rem; letter-spacing:.08em;
  padding:4px 9px; border-radius:999px; backdrop-filter: blur(4px);
}
.thumb-badge.media{ left:auto; right:10px; background: rgba(225,79,132,0.85); }

.card-body{ padding: 16px 18px 18px; display:flex; flex-direction:column; gap:6px; flex:1; }
.card-cat{ font-family: var(--font-mono); font-size:0.68rem; color: var(--accent-dark); text-transform:uppercase; letter-spacing:.08em; }
.card-title{ font-weight:700; font-size:1.02rem; margin:0; }
.card-price{ font-family: var(--font-mono); font-weight:700; color: var(--ink); margin-top:auto; }
.blog-meta{ font-family: var(--font-mono); font-size:0.7rem; color: var(--ink-soft); }
.blog-card{ cursor:pointer; }
.blog-card:focus-visible{ outline: 3px solid var(--accent-dark); outline-offset: 2px; }

/* =========================================================
   In-page post reading modal — replaces navigating out to
   WordPress. Content is inserted via sanitizePostHtml(), never
   raw REST payload text.
   ========================================================= */
.post-modal-overlay{
  position:fixed; inset:0;
  background: rgba(43,39,51,0.5);
  z-index:120;
  opacity:0; visibility:hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.post-modal-overlay.is-open{ opacity:1; visibility:visible; }

.post-modal{
  position:fixed;
  top:50%; left:50%;
  transform: translate(-50%, -48%) scale(0.98);
  width:min(680px, 92vw);
  max-height:85vh;
  overflow-y:auto;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index:130;
  opacity:0; visibility:hidden;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.post-modal.is-open{ opacity:1; visibility:visible; transform: translate(-50%, -50%) scale(1); }

.post-modal-close{
  position:sticky; top:12px; left:100%;
  transform: translateX(-12px);
  width: var(--touch); height: var(--touch);
  border:none; border-radius:50%;
  background: rgba(255,255,255,0.85);
  color: var(--ink);
  font-size:1rem;
  box-shadow: var(--shadow);
  z-index:2;
}
.post-modal-close:hover{ background: var(--blush); }

.post-modal-media{
  margin-top:-48px;
  aspect-ratio: 16/9;
  overflow:hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.post-modal-media img{ width:100%; height:100%; object-fit:cover; }

.post-modal-body{ padding: 24px clamp(20px, 4vw, 40px) 40px; }
.post-modal-title{
  font-family: var(--font-display); font-weight:700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 6px 0 18px;
}
.post-modal-content{ color: var(--ink-soft); font-size:0.98rem; line-height:1.7; }
.post-modal-content p{ margin: 0 0 1em; }
.post-modal-content img{ max-width:100%; border-radius: var(--radius); margin: 0.5em 0; }
.post-modal-content a{ color: var(--accent-dark); text-decoration:underline; }
.post-modal-content ul, .post-modal-content ol{ margin: 0 0 1em; padding-left: 1.4em; }
.post-modal-content blockquote{
  margin: 0 0 1em; padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
}

@media (max-width: 480px){
  .post-modal{ width:94vw; max-height:88vh; }
  .post-modal-media{ margin-top:-40px; }
}
.blog-excerpt{ color: var(--ink-soft); font-size:0.92rem; }

.card-actions{ padding: 0 18px 18px; }
.btn-add{
  width:100%; min-height: var(--touch); border-radius: var(--radius);
  border: 2px solid var(--ink); background: transparent;
  font-weight:700; font-size:0.88rem; transition: background .15s ease, color .15s ease;
}
.btn-add:hover{ background: var(--ink); color: var(--paper); }

.skeleton{ position:relative; overflow:hidden; background: var(--blush); }
.skeleton::before{
  content:""; position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer{ 0%{ transform: translateX(-100%); } 100%{ transform: translateX(100%); } }

.empty-state, .error-state{
  grid-column: 1/-1; text-align:center; padding: 48px 20px;
  border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--ink-soft);
}
.error-state{ border-color: var(--accent-dark); color: var(--accent-dark); }

.bio-band{
  background: linear-gradient(180deg, rgba(174,224,242,0.25), rgba(247,217,230,0.25));
  border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 48px);
  display:grid; grid-template-columns: 1fr 1fr; gap:32px;
}
.bio-band blockquote{ margin:0; padding-left:18px; border-left: 3px solid var(--accent); color: var(--ink-soft); font-size:0.98rem; }

.cta-band{ text-align:center; padding: 60px 0; }
.cta-band .section-title{ margin-bottom:10px; }

.site-footer{ border-top: 1px solid var(--line); padding: 28px 0; margin-top:20px; }
.footer-row{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.footer-copyright{
  font-weight:600; font-size:0.88rem; color: var(--ink-soft);
}
.footer-copyright:hover{ color: var(--ink); }
.footer-powered{
  font-family: var(--font-mono); font-size:0.8rem; color: var(--ink-soft);
}
.footer-powered:hover{ color: var(--accent-dark); }
.footer-social{ display:flex; align-items:center; gap:4px; }

@media (max-width: 860px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-art{ order:-1; aspect-ratio: 16/10; }
  .bio-band{ grid-template-columns:1fr; }
  .intro-band{ grid-template-columns: 1fr; }
  .hero-full-frame{ aspect-ratio: 4/5; }
}

@media (max-width: 720px){
  .site-header{ margin-top: -210px; }
  .header-glass{ gap: 14px; }
  .nav-block.nav-left .nav-link:not(.icon-btn){ display:none; }
  .nav-block.nav-right .nav-link{ display:none; }
  .brand-logo{ height:76px; }
  .brand-mark-fallback{ width:160px; }
  .breadcrumbs{ padding-top: 72px; }

  .nav-toggle{
    display:inline-flex; align-items:center; justify-content:center;
    width: var(--touch); height: var(--touch); border:none; background:transparent; border-radius:50%;
  }
  .nav-toggle svg{ width:22px; height:22px; }

  .mobile-panel{
    display:flex; flex-direction:column;
    position:fixed; inset: 0 0 0 auto; width:min(300px,84vw);
    background: var(--paper); z-index:110;
    transform: translateX(100%); transition: transform .25s ease;
    padding: 90px 24px 24px; box-shadow: var(--shadow-lg);
  }
  .mobile-panel.is-open{ transform: translateX(0); }
  .mobile-panel a{ display:block; padding: 14px 4px; font-weight:700; font-size:1.1rem; border-bottom:1px solid var(--line); }
}

@media (max-width: 480px){
  .marble-banner{ height:180px; }
  .site-header{ margin-top: -168px; }
  .hero{ padding-top: 40px; }
  .hero-full{ padding-top: 80px; }
  .breadcrumbs{ padding-top: 28px; }
}
