/* =========================================================
   BLOOM & INK — Base Design System
   A hand-tied bouquet is never symmetrical; this system leans
   on soft asymmetry, layered warmth, and one recurring motif:
   the ribbon knot (see .knot-divider) used as a section mark.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,500&family=Playfair+Display:ital,wght@0,500;0,600;1,500&family=Outfit:wght@300;400;500;600&family=Dancing+Script:wght@500;700&family=Caveat:wght@500;700&display=swap');

:root{
  /* --- palette --- */
  --cream:        #FBF5EC;
  --cream-deep:   #F3E9D8;
  --blush:        #F1CDD3;
  --blush-deep:   #E7AEB8;
  --lavender:     #CBB9E3;
  --lavender-deep:#AD93CF;
  --peach:        #F3C6A3;
  --sage:         #A9C1A3;
  --gold:         #C9A063;
  --gold-soft:    #E4CDA0;
  --plum:         #3E2C3F;      /* primary text — soft near-black */
  --plum-quiet:   #6E5C6E;      /* secondary text */
  --white:        #FFFFFF;

  /* --- type --- */
  --font-display: 'Cormorant Garamond', serif;
  --font-serif-alt: 'Playfair Display', serif;
  --font-body: 'Outfit', sans-serif;
  --font-script: 'Dancing Script', cursive;
  --font-hand: 'Caveat', cursive;

  /* --- layout --- */
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --shadow-soft: 0 10px 30px -12px rgba(62, 44, 63, 0.18);
  --shadow-deep: 0 20px 50px -18px rgba(62, 44, 63, 0.28);
  --ease: cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--plum);
  -webkit-font-smoothing: antialiased;
  overflow-x:hidden;
}
img, svg{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; }
input, textarea, select{ font-family:inherit; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4,p{ margin:0; }

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

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

/* ---------- shared shell ---------- */
.site-nav{
  position: sticky; top:0; z-index: 500;
  display:flex; align-items:center; justify-content:space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(251, 245, 236, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(62,44,63,0.07);
}
.brand{
  font-family: var(--font-serif-alt);
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  display:flex; align-items:center; gap:10px;
}
.brand .knot{ width:22px; height:22px; }
.nav-links{ display:flex; align-items:center; gap: clamp(14px, 3vw, 34px); }
.nav-links a{
  font-size: 0.92rem; color: var(--plum-quiet); position:relative; padding-bottom:2px;
  transition: color .25s var(--ease);
}
.nav-links a:hover, .nav-links a.active{ color: var(--plum); }
.nav-links a.active::after{
  content:''; position:absolute; left:0; right:0; bottom:-4px; height:2px;
  background: var(--gold); border-radius:2px;
}

/* ---------- buttons ---------- */
.btn{
  position:relative; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 0.95rem; font-weight:500; letter-spacing:0.01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.btn-primary{
  background: linear-gradient(135deg, var(--blush-deep), var(--lavender-deep));
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: var(--shadow-deep); }
.btn-ghost{
  background: transparent;
  border: 1.5px solid rgba(62,44,63,0.22);
  color: var(--plum);
}
.btn-ghost:hover{ border-color: var(--plum); }
.btn-gold{
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--plum);
  box-shadow: var(--shadow-soft);
}
.btn-gold:hover{ transform: translateY(-2px); }
.btn-small{ padding: 9px 18px; font-size: 0.82rem; }
.btn[disabled]{ opacity:.45; pointer-events:none; }

.ripple{
  position:absolute; border-radius:50%; transform: scale(0);
  background: rgba(255,255,255,0.55); animation: rippleAnim .6s var(--ease);
  pointer-events:none;
}
@keyframes rippleAnim{ to{ transform: scale(2.6); opacity:0; } }

/* ---------- knot divider (signature motif) ---------- */
.knot-divider{ display:flex; align-items:center; justify-content:center; gap:14px; margin: 10px 0 34px; }
.knot-divider .line{ height:1px; width:56px; background: linear-gradient(90deg, transparent, rgba(62,44,63,.35)); }
.knot-divider .line.right{ background: linear-gradient(270deg, transparent, rgba(62,44,63,.35)); }
.knot-divider svg{ width:26px; height:26px; opacity:.75; }

/* ---------- section labels ---------- */
.eyebrow{
  font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight:600;
}
.section-title{ font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.1rem); font-weight:500; line-height:1.1; }
.section-sub{ color: var(--plum-quiet); font-size: 1.05rem; max-width: 560px; line-height:1.6; }

/* ---------- footer ---------- */
.site-footer{
  padding: 54px clamp(20px,5vw,56px) 34px;
  background: var(--cream-deep);
  border-top: 1px solid rgba(62,44,63,0.06);
  margin-top: 80px;
}
.footer-grid{ display:flex; flex-wrap:wrap; gap: 40px; justify-content:space-between; max-width:1180px; margin:0 auto; }
.footer-col h4{ font-family: var(--font-serif-alt); font-size:1.05rem; margin-bottom: 14px; }
.footer-col a{ display:block; color: var(--plum-quiet); font-size:0.9rem; padding: 5px 0; transition: color .2s; }
.footer-col a:hover{ color: var(--plum); }
.footer-bottom{ text-align:center; margin-top: 40px; font-size: 0.8rem; color: var(--plum-quiet); }

/* ---------- toast ---------- */
.toast{
  position: fixed; bottom: 26px; left:50%; transform: translateX(-50%) translateY(20px);
  background: var(--plum); color: var(--cream); padding: 13px 24px; border-radius: 999px;
  font-size: 0.88rem; opacity:0; pointer-events:none; transition: all .35s var(--ease);
  z-index: 900; box-shadow: var(--shadow-deep);
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }

/* ---------- shared builder components (used by create.html & letter.html) ---------- */
.panel-card{ padding: 26px; margin-bottom:20px; }
.panel-card h3{ font-family: var(--font-serif-alt); font-size:1.15rem; margin-bottom:4px; }
.panel-card .hint{ color: var(--plum-quiet); font-size:0.85rem; margin-bottom:18px; }
.builder-nav{ display:flex; justify-content:space-between; margin-top:8px; gap:12px; flex-wrap:wrap; }
.stage-caption{ text-align:center; margin-top:16px; color: var(--plum-quiet); font-size:0.85rem; }

.option-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap:12px; }
.option-tile{
  padding: 14px 10px; border-radius: var(--radius-m); text-align:center;
  border: 1.5px solid rgba(62,44,63,0.08); font-size:0.82rem; color:var(--plum-quiet);
  transition: all .2s var(--ease);
}
.option-tile .tile-swatch{ width:100%; height:38px; border-radius:8px; margin-bottom:8px; }
.option-tile.selected{ border-color: var(--gold); color: var(--plum); background: var(--cream); }

.swatch-row, .color-row{ display:flex; gap:10px; flex-wrap:wrap; }
.swatch{
  width:34px; height:34px; border-radius:50%; border:2px solid rgba(255,255,255,0.8);
  box-shadow: 0 0 0 1.5px rgba(62,44,63,0.15);
  transition: transform .2s var(--ease);
}
.swatch:hover{ transform: scale(1.12); }
.swatch.selected{ box-shadow: 0 0 0 2.5px var(--plum); }

.slider-row{ margin-bottom: 16px; }
.slider-row label{ display:flex; justify-content:space-between; font-size:0.85rem; color: var(--plum-quiet); margin-bottom:6px; }
.slider-row input[type=range]{ width:100%; accent-color: var(--blush-deep); }

/* ---------- generic containers ---------- */
.container{ max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.card{
  background: var(--white); border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft); border: 1px solid rgba(62,44,63,0.05);
}
