/*
Theme Name: Loops by Lily
Theme URI: https://loopsbylily.co.uk
Author: Loops by Lily
Author URI: https://loopsbylily.co.uk
Description: A warm, handmade-feel theme for Loops by Lily, hand-crocheted animals and treasures made in Dorset. Brand colours and fonts follow the Loops by Lily brand guidelines v1.0. The homepage is built into the theme (front-page.php) so it always renders beautifully on activation.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: loops-by-lily
*/

/* =========================================================
   1. Brand variables (from Brand Guidelines v1.0)
   ========================================================= */
:root {
  --cream:    #fdf4ea;   /* Warm Cream — background */
  --cream-2:  #f7ebdf;   /* soft cream tint */
  --blush:    #e4c3ae;   /* Blush — soft fills */
  --blush-2:  #f0d8c6;   /* lighter blush */
  --ink:      #5e4a37;   /* Cocoa Brown — body text & wordmark */
  --ink-soft: #836f5c;   /* softened cocoa */
  --rose:     #be8371;   /* Dusty Rose — signature accent */
  --terra:    #a4745d;   /* Terracotta — depth, hover */
  --gold:     #b0896a;   /* Antique Gold — premium touch */
  --sage:     #8f8c6b;   /* Sage — grounding */
  --coral:    #e0a48e;   /* Soft Coral — highlight */
  --line:     #ead9c7;   /* soft taupe — lines & borders */
  --white:    #fffdfa;

  --font-head:   "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:   "Montserrat", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-script: "Great Vibes", "Cormorant Garamond", cursive;

  --max: 1180px;
  --narrow: 760px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(94, 74, 55, 0.10);
  --shadow-sm: 0 8px 24px rgba(94, 74, 55, 0.08);
}

/* =========================================================
   2. Base
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.4em;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1.2em; }
a { color: var(--terra); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--rose); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--terra);
  margin: 0 0 1em;
  display: inline-block;
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--rose);
  letter-spacing: 0.01em;
}
.lede { font-size: 1.22rem; line-height: 1.6; color: var(--ink-soft); }

/* =========================================================
   3. Buttons
   ========================================================= */
.btn {
  display: inline-block;
  background: var(--rose);
  color: #fff;
  border: 0;
  padding: 15px 34px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 8px 20px rgba(190, 131, 113, 0.28);
}
.btn:hover { background: var(--terra); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(164, 116, 93, 0.32); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--blush);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--cream-2); color: var(--terra); border-color: var(--rose); box-shadow: none; }

/* =========================================================
   4. Header & navigation
   ========================================================= */
.site-header {
  background: rgba(255, 253, 250, 0.86);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner { padding: 18px 28px 14px; }
.branding { display: inline-block; }
.custom-logo, .branding img { max-height: 74px; width: auto; margin: 0 auto; }
.wordmark {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1;
}
.wordmark .by { font-family: var(--font-script); font-size: 1.5rem; color: var(--rose); margin: 0 .12em; letter-spacing: 0; }
.site-tagline {
  margin: 6px 0 0;
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Navigation — styles ANY list inside .main-nav, so custom menus and the
   page-list fallback both look right. */
.main-nav { margin-top: 14px; }
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px;
}
.main-nav li { margin: 0; }
.main-nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 4px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--rose);
  transition: width .22s ease, left .22s ease;
}
.main-nav a:hover { color: var(--terra); }
.main-nav a:hover::after { width: 100%; left: 0; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--rose); }
.main-nav .current-menu-item > a::after,
.main-nav .current_page_item > a::after { width: 100%; left: 0; }

/* =========================================================
   5. Decorative flourishes
   ========================================================= */
.deco { color: var(--rose); display: inline-block; vertical-align: middle; }
.deco-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 18px; color: var(--gold); }
.deco-row .rule { width: 46px; height: 1px; background: var(--gold); opacity: 0.6; }
.deco-row svg { width: 16px; height: 16px; }

/* =========================================================
   6. Section rhythm
   ========================================================= */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head p { margin: 0; }

/* =========================================================
   7. Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 80% -10%, var(--blush) 0%, rgba(228,195,174,0) 55%),
    radial-gradient(120% 90% at -10% 110%, var(--blush-2) 0%, rgba(240,216,198,0) 50%),
    var(--cream);
  text-align: center;
  padding: clamp(70px, 11vw, 140px) 24px clamp(64px, 9vw, 120px);
}
.hero-inner { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.hero h1 { margin: 0 0 0.18em; }
.hero h1 .script { display: block; font-size: 0.62em; margin-top: 0.06em; color: var(--terra); }
.hero .lede { margin: 0 auto 2em; max-width: 620px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
/* floating decorations */
.hero .float { position: absolute; z-index: 1; opacity: 0.9; }
.hero .f1 { top: 12%; left: 9%; color: var(--rose); width: 30px; }
.hero .f2 { top: 22%; right: 12%; color: var(--sage); width: 42px; }
.hero .f3 { bottom: 16%; left: 14%; color: var(--gold); width: 26px; }
.hero .f4 { bottom: 22%; right: 9%; color: var(--coral); width: 34px; }
@media (max-width: 700px){ .hero .float { display: none; } }

/* =========================================================
   8. Maker intro (welcome) band
   ========================================================= */
.welcome { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.welcome .inner { max-width: 720px; margin: 0 auto; text-align: center; }
.welcome .script-lg { font-family: var(--font-script); font-size: clamp(2rem, 5vw, 3rem); color: var(--rose); line-height: 1; margin: 0 0 0.2em; }
.welcome p { font-size: 1.18rem; color: var(--ink-soft); }
.welcome .sign { font-family: var(--font-script); font-size: 2rem; color: var(--terra); margin-top: 0.3em; }

/* =========================================================
   9. Feature trio (what I make)
   ========================================================= */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--rose);
}
.feature .icon svg { width: 30px; height: 30px; }
.feature h3 { color: var(--terra); margin-bottom: 0.4em; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* =========================================================
   10. Makes gallery
   ========================================================= */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.make {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.make:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.make .thumb {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  position: relative;
  color: rgba(255,255,255,0.92);
}
.make .thumb svg { width: 56px; height: 56px; opacity: 0.95; }
.make:nth-child(6n+1) .thumb { background: linear-gradient(150deg, var(--blush), var(--coral)); }
.make:nth-child(6n+2) .thumb { background: linear-gradient(150deg, var(--blush-2), var(--rose)); }
.make:nth-child(6n+3) .thumb { background: linear-gradient(150deg, var(--cream-2), var(--blush)); color: var(--rose); }
.make:nth-child(6n+4) .thumb { background: linear-gradient(150deg, var(--sage), #a7a487); }
.make:nth-child(6n+5) .thumb { background: linear-gradient(150deg, var(--coral), var(--terra)); }
.make:nth-child(6n+6) .thumb { background: linear-gradient(150deg, var(--blush), var(--gold)); }
.make .tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,253,250,0.92);
  color: var(--terra);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.make .body { padding: 20px 22px 24px; text-align: center; }
.make .body h3 { font-size: 1.3rem; margin: 0 0 0.2em; }
.make .body p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.gallery-note { text-align: center; margin-top: 34px; color: var(--ink-soft); font-size: 0.95rem; }

/* =========================================================
   11. Custom-request band
   ========================================================= */
.band {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,0.10), transparent 50%),
    var(--sage);
  color: #fff;
  border-radius: var(--radius);
  text-align: center;
  padding: clamp(48px, 7vw, 88px) 28px;
  box-shadow: var(--shadow);
}
.band .eyebrow { color: rgba(255,255,255,0.85); }
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,0.92); max-width: 560px; margin: 0 auto 1.6em; }
.band .btn { background: var(--white); color: var(--ink); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.band .btn:hover { background: var(--cream-2); color: var(--terra); }

/* =========================================================
   12. Follow / closing strip
   ========================================================= */
.follow { text-align: center; }
.follow .inner { max-width: 620px; margin: 0 auto; }
.follow .heart { color: var(--rose); width: 30px; margin: 0 auto 14px; }

/* =========================================================
   13. Inner page hero + content
   ========================================================= */
.page-hero {
  background:
    radial-gradient(120% 90% at 90% -20%, var(--blush) 0%, rgba(228,195,174,0) 55%),
    var(--cream);
  text-align: center;
  padding: clamp(64px, 9vw, 110px) 24px clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin: 0; }
.page-hero .lede { margin: 0.6em auto 0; max-width: 600px; }
.page-body { padding: 64px 0 80px; }
.page-body .content { max-width: var(--narrow); margin: 0 auto; }
.page-body .content h2 { margin-top: 1.4em; }
.page-body .content img { border-radius: var(--radius-sm); margin: 1.4em auto; box-shadow: var(--shadow-sm); }
.signoff { font-family: var(--font-script); font-size: 2.4rem; color: var(--terra); line-height: 1.1; }

/* =========================================================
   14. Contact form
   ========================================================= */
.contact-form { max-width: 600px; margin: 28px auto 0; text-align: left; }
.contact-form p { margin-bottom: 20px; }
.contact-form label { display: block; font-weight: 600; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(190,131,113,0.12); }
.contact-form .btn { width: auto; }
.form-success, .form-error { max-width: 600px; margin: 0 auto 22px; padding: 16px 20px; border-radius: var(--radius-sm); font-weight: 500; }
.form-success { background: #eef2e6; color: #4f6140; border: 1px solid #d2ddc0; }
.form-error { background: #fbece6; color: #9a4a32; border: 1px solid #eccabd; }

/* =========================================================
   15. Footer
   ========================================================= */
.site-footer { background: var(--ink); color: var(--cream); padding: 72px 0 36px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; text-align: left; }
.site-footer h4 { color: var(--white); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; font-family: var(--font-body); margin: 0 0 18px; }
.footer-brand .name { font-family: var(--font-head); font-size: 1.9rem; color: var(--white); line-height: 1; margin: 0; }
.footer-brand .script { color: var(--blush); font-family: var(--font-script); font-size: 1.7rem; display: block; margin: 2px 0 14px; }
.footer-brand p { color: rgba(253,244,234,0.72); font-size: 0.94rem; max-width: 320px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(253,244,234,0.82); font-size: 0.94rem; }
.site-footer a:hover { color: var(--blush); }
.footer-bottom { border-top: 1px solid rgba(253,244,234,0.16); margin-top: 48px; padding-top: 24px; text-align: center; font-size: 0.8rem; color: rgba(253,244,234,0.5); }

/* =========================================================
   16. Responsive
   ========================================================= */
@media (max-width: 980px) {
  .features { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .features, .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .main-nav ul { gap: 20px; }
}
