/*
Theme Name:  Woolsquare
Theme URI:   https://woolsquare.com
Author:      Woolsquare
Description: Handmade crochet, made to order.
Version:     1.0
License:     GNU General Public License v2 or later
Text Domain: woolsquare
*/

/* ─── Tokens ─────────────────────────────────────────── */
:root {
  --coral:      #E85D47;
  --sage:       #6B9E72;
  --rose:       #D4788A;
  --golden:     #E8B84B;
  --violet:     #8F7EC0;
  --ink:        #1A1A1A;
  --paper:      #FAFAF8;
  --muted:      #6B6B6B;
  --border:     rgba(26,26,26,0.1);

  --serif:      'Fraunces', Georgia, serif;
  --sans:       'Hanken Grotesk', system-ui, sans-serif;

  --max-w:      1200px;
  --px:         clamp(1.25rem, 5vw, 3rem);
  --ease:       0.22s ease;
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ─── Type ───────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.15rem; font-weight: 400; }
em { font-style: italic; }

/* ─── Layout ─────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
}
.section-header { margin-bottom: 3rem; }
.label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.5rem;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--ease), color var(--ease), transform var(--ease), opacity var(--ease);
}
.btn-primary  { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--coral); }
.btn-outline  { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ig {
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 28%, #d62976 58%, #962fbf 82%, #4f5bd5 100%);
  color: #fff;
}
.btn-ig:hover { opacity: 0.9; transform: translateY(-1px); }

/* ─── Nav ────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem var(--px);
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}
.site-nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.07); }
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.2rem;
}
.nav-logo img { height: 3.25rem; width: 3.25rem; }
.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a { color: var(--muted); transition: color var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-ig {
  display: none;
  font-size: 0.8rem;
  padding: 0.55rem 1.1rem;
}
@media (min-width: 768px) { .nav-ig { display: inline-flex; } }
.nav-ig-mobile {
  display: inline-flex;
  font-size: 0.78rem;
  padding: 0.5rem 0.9rem;
}
@media (min-width: 768px) { .nav-ig-mobile { display: none; } }

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(4rem + 68px) var(--px) 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -15%;
  right: -8%;
  width: 55vmin;
  height: 55vmin;
  background: radial-gradient(circle, rgba(232,93,71,0.14) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: var(--max-w); width: 100%; margin: 0 auto; }
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em { color: var(--coral); }
.hero > .hero-inner > p,
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ─── Products ───────────────────────────────────────── */
.products-section { padding: 6rem 0; background: #fff; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.75rem;
}
.product-card {
  background: var(--paper);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.09);
}
.product-blob {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.product-blob::before {
  content: '';
  position: absolute;
  width: 72%;
  height: 72%;
  background: var(--blob-color, var(--coral));
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 70%;
  opacity: 0.18;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.product-blob img {
  position: relative;
  z-index: 1;
  width: 80%;
  height: 80%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.product-card:hover .product-blob img { transform: scale(1.06) rotate(-2deg); }
.product-info { padding: 0.9rem 1.25rem 1.4rem; }
.product-category {
  display: block;
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.product-info h3 { margin-bottom: 0.2rem; }
.product-price { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.4rem; }
.product-dm {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--coral);
  opacity: 0;
  transition: opacity var(--ease);
}
.product-card:hover .product-dm { opacity: 1; }

/* ─── Gifting ────────────────────────────────────────── */
.gifting-section { padding: 5rem 0; background: #F7EBE9; }
.gifting-section .section-header p { color: var(--muted); max-width: 44ch; margin-top: 0.75rem; }
.gifting-row {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: none;
}
.gifting-row::-webkit-scrollbar { display: none; }
.gifting-card {
  flex: 0 0 200px;
  background: var(--paper);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform var(--ease);
}
.gifting-card:hover { transform: translateY(-4px); }
.gifting-card .gift-blob {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.gifting-card .gift-blob::before {
  content: '';
  position: absolute;
  width: 65%;
  height: 65%;
  background: var(--blob-color, var(--rose));
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 70%;
  opacity: 0.18;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.gifting-card img { position: relative; z-index: 1; width: 75%; height: 75%; object-fit: contain; }
.gifting-card p {
  padding: 0.6rem 0.9rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ─── Craft ──────────────────────────────────────────── */
.craft-section { padding: 6rem 0; background: #F3E9DC; }
.craft-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) { .craft-inner { grid-template-columns: 1fr 1fr; } }
.craft-section .label { color: var(--sage); }
.craft-section h2 em { color: var(--sage); }
.craft-section p { color: var(--muted); margin-top: 1rem; max-width: 40ch; line-height: 1.75; }
.craft-stat { display: inline-flex; flex-direction: column; gap: 0.2rem; margin-top: 2rem; }
.craft-stat strong { font-family: var(--serif); font-size: 2.5rem; line-height: 1; }
.craft-stat span { font-size: 0.78rem; color: var(--muted); }
.craft-image { border-radius: 1.5rem; overflow: hidden; aspect-ratio: 4/5; }
.craft-image img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Custom Order ───────────────────────────────────── */
.custom-section { padding: 6rem 0; }
.custom-inner { display: grid; gap: 3rem; }
@media (min-width: 1024px) {
  .custom-inner { grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
}
.custom-section .label { color: var(--coral); }
.custom-section h2 em { color: var(--coral); }
.custom-section .custom-intro { color: var(--muted); margin-top: 1rem; max-width: 40ch; line-height: 1.7; }
.custom-steps { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.custom-step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 3px 3px 8px rgba(0,0,0,0.1), -3px -3px 8px rgba(255,255,255,0.8);
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--coral);
}
.step-body h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.2rem; }
.step-body p { font-size: 0.83rem; color: var(--muted); }

/* Form ─── */
.custom-form {
  background: var(--paper);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 8px 8px 24px rgba(0,0,0,0.07), -6px -6px 18px rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.72rem; font-weight: 600; color: rgba(26,26,26,0.6); }
.form-field input,
.form-field select,
.form-field textarea {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.72rem 1rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: border-color var(--ease);
  -webkit-appearance: none;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--coral); }
.form-field textarea { resize: none; }
.custom-form .submit-btn {
  margin-top: 0.5rem;
  justify-content: center;
  width: 100%;
  padding: 1rem;
}

/* ─── Footer ─────────────────────────────────────────── */
.site-footer { background: #EFE6D8; padding: 4rem 0 2rem; border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.footer-logo img { height: 3.5rem; width: 3.5rem; }
.footer-logo span { font-family: var(--serif); font-size: 1.5rem; }
.footer-brand p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.5rem; }
.footer-col h4 {
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.footer-col li + li { margin-top: 0.6rem; }
.footer-col a { font-size: 0.875rem; color: rgba(26,26,26,0.7); transition: color var(--ease); }
.footer-col a:hover { color: var(--coral); }
.footer-col .ig-row { display: inline-flex; align-items: center; gap: 0.4rem; }
.footer-col .ships { font-size: 0.75rem; color: var(--muted); margin-top: 0.75rem; display: block; }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  font-size: 0.73rem;
  color: var(--muted);
}

/* ─── IG Fab ─────────────────────────────────────────── */
.ig-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 150;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 28%, #d62976 58%, #962fbf 82%, #4f5bd5 100%);
  box-shadow: 0 4px 24px rgba(214,41,118,0.38);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s cubic-bezier(.34,1.56,.64,1), transform 0.4s cubic-bezier(.34,1.56,.64,1);
}
.ig-fab.visible { opacity: 1; transform: scale(1); }
.ig-fab svg { width: 1.4rem; height: 1.4rem; color: #fff; }

/* ─── Reveal animation ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ─── WP admin bar push ──────────────────────────────── */
.admin-bar .site-nav { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-nav { top: 46px; } }

/* ─── Coming-soon page ───────────────────────────────── */
body.cs-active {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 2rem 1.5rem;
  overflow: hidden;
}
.cs-root { position: relative; z-index: 1; width: 100%; display: grid; place-items: center; }
.cs-glow { position: fixed; border-radius: 50%; filter: blur(60px); z-index: 0; pointer-events: none; }
.cs-glow-1 { width: 46vmax; height: 46vmax; top: -18vmax; right: -14vmax; background: radial-gradient(circle, rgba(232,93,71,.16), transparent 70%); animation: cs-drift 22s ease-in-out infinite; }
.cs-glow-2 { width: 40vmax; height: 40vmax; bottom: -16vmax; left: -12vmax; background: radial-gradient(circle, rgba(212,120,138,.16), transparent 70%); animation: cs-drift 26s ease-in-out infinite reverse; }
.cs-glow-3 { width: 26vmax; height: 26vmax; top: 40%; left: 55%; background: radial-gradient(circle, rgba(232,184,75,.12), transparent 70%); animation: cs-drift 30s ease-in-out infinite; }
@keyframes cs-drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(3vmax,2vmax); } }

.cs-wrap { position: relative; z-index: 1; width: 100%; max-width: 560px; text-align: center; }

.cs-brand { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.6rem; }
.cs-brand img { width: 46px; height: 46px; }
.cs-brand span { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; letter-spacing: -.01em; color: var(--ink); }

.cs-visual { position: relative; width: min(86vw, 340px); height: 300px; margin: 0 auto 1.6rem; }
.cs-blob { position: absolute; inset: 0; margin: auto; width: 230px; height: 230px; background: linear-gradient(140deg, var(--coral), var(--rose)); opacity: .2; border-radius: 62% 38% 55% 45% / 50% 58% 42% 50%; animation: cs-morph 9s ease-in-out infinite, cs-spin 26s linear infinite; }
@keyframes cs-morph { 0%,100% { border-radius: 62% 38% 55% 45% / 50% 58% 42% 50%; } 33% { border-radius: 42% 58% 38% 62% / 60% 42% 58% 40%; } 66% { border-radius: 55% 45% 62% 38% / 40% 55% 45% 60%; } }
@keyframes cs-spin { to { transform: rotate(360deg); } }
.cs-hero { position: absolute; inset: 0; margin: auto; width: 230px; height: 230px; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(26,26,26,.16)); animation: cs-float 5.5s ease-in-out infinite; }
@keyframes cs-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.cs-accent { position: absolute; width: 84px; height: 84px; animation: cs-float 6s ease-in-out infinite; }
.cs-accent img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(26,26,26,.12)); }
.cs-a-tulip { top: -6px; left: -14px; width: 78px; height: 78px; animation-delay: .4s; }
.cs-a-duck { bottom: 2px; right: -16px; width: 90px; height: 90px; animation-delay: 1.1s; }
.cs-a-bear { top: 24px; right: -6px; width: 64px; height: 64px; animation-delay: .8s; }
@media (max-width: 560px) {
  .cs-a-bear { display: none; }
  .cs-accent { width: 60px; height: 60px; }
  .cs-a-duck { width: 66px; height: 66px; right: -6px; }
  .cs-a-tulip { width: 58px; height: 58px; left: -6px; }
}

.cs-eyebrow { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--coral); margin-bottom: .9rem; }
.cs-headline { font-family: var(--serif); font-weight: 300; letter-spacing: -.015em; line-height: 1.12; font-size: clamp(2rem, 7vw, 3.1rem); margin-bottom: 1rem; color: var(--ink); }
.cs-headline em { font-style: italic; color: var(--coral); }
.cs-lead { font-size: 1.02rem; color: var(--muted); max-width: 42ch; margin: 0 auto 2rem; }

.cs-cta { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.7rem; border-radius: 100px; font-family: var(--sans); font-size: .92rem; font-weight: 600; color: #fff; background: linear-gradient(135deg, #feda75 0%, #fa7e1e 28%, #d62976 58%, #962fbf 82%, #4f5bd5 100%); box-shadow: 0 10px 26px rgba(214,41,118,.32); transition: transform .2s ease, box-shadow .2s ease; }
.cs-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(214,41,118,.4); }
.cs-cta svg { width: 18px; height: 18px; }

.cs-secondary { margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.cs-secondary a { color: var(--ink); font-weight: 600; border-bottom: 1.5px solid rgba(232,93,71,.35); }
.cs-secondary a:hover { border-bottom-color: var(--coral); }

.cs-foot { margin-top: 2.4rem; font-size: .78rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .cs-glow, .cs-blob, .cs-hero, .cs-accent { animation: none; }
}
