/* ============================================
   OddThreads — design tokens (bright baby pink)
   ============================================ */
:root {
  --oat:        #FFEFF5;   /* soft blush background */
  --oat-deep:   #FFD6E7;   /* deeper pink for card thumbs/borders */
  --berry:      #FF4FA0;   /* bright baby pink — primary accent */
  --berry-deep: #E0197A;   /* deeper hot pink — hover states */
  --sage:       #B98CE0;   /* soft lavender — secondary accent */
  --charcoal:   #3A2430;   /* warm plum-black — text, footer bg */
  --gold:       #FFC145;   /* golden pop accent — yarn line, tags */
  --cream-card: #FFFFFF;

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Work Sans", -apple-system, sans-serif;

  --max-w: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--oat);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- header ---------- */
header.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 239, 245, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(43, 38, 32, 0.1);
}

.site-head .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  text-decoration: none;
}

.brand .mark { width: 36px; height: 36px; flex-shrink: 0; }

footer .brand .mark { filter: none; }

nav.site-nav { display: flex; gap: 28px; }

nav.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--charcoal);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

nav.site-nav a:hover { border-color: var(--berry); color: var(--berry-deep); }

/* ---------- hero ---------- */
.hero {
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 22px;
  color: var(--charcoal);
}

.hero-copy p.lede {
  font-size: 1.1rem;
  max-width: 46ch;
  color: #5A4048;
  margin: 0 0 30px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.yarn-underline {
  width: 100%;
  max-width: 360px;
  height: 26px;
  margin: -6px 0 26px;
  display: block;
}

.yarn-underline path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: draw-yarn 1.4s 0.3s cubic-bezier(.65,.05,.36,1) forwards;
}

@keyframes draw-yarn {
  to { stroke-dashoffset: 0; }
}

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(120% 120% at 28% 18%, var(--oat-deep) 0%, #FFE0EF 55%, #FFC7E3 100%);
  box-shadow: 0 24px 48px -20px rgba(58, 36, 48, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual .tag {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: var(--cream-card);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: var(--serif);
  font-size: 0.95rem;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,0.3);
  z-index: 3;
}

/* ---------- hero video ---------- */
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- about illustration (custom, static — no stock photos) ---------- */
.about-illustration {
  position: relative;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  overflow: hidden;
  background: radial-gradient(115% 115% at 75% 12%, var(--oat-deep) 0%, #FFE0EF 60%, #FFC7E3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-illustration .about-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.4;
}
.about-illustration .about-blob-1 { width: 140px; height: 140px; background: var(--sage); top: -14%; left: 6%; }
.about-illustration .about-blob-2 { width: 120px; height: 120px; background: var(--gold); bottom: -10%; right: 4%; opacity: 0.35; }
.about-illustration svg { position: relative; width: 62%; max-width: 240px; z-index: 2; }
.about-illustration .yarn-a { fill: var(--berry); }
.about-illustration .yarn-b { fill: var(--sage); }
.about-illustration .yarn-swirl { stroke: rgba(255,255,255,0.6); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.about-illustration .hook { stroke: var(--charcoal); stroke-width: 4.5; fill: none; stroke-linecap: round; }
.about-illustration .swatch { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 6 6; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--berry);
  color: #ffffff;
  box-shadow: 0 6px 16px -6px rgba(255, 79, 160, 0.55);
}
.btn-primary:hover { background: var(--berry-deep); }

.btn-ghost {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-ghost:hover { background: var(--charcoal); color: var(--oat); }

.btn-whatsapp {
  background: var(--sage);
  color: #fff;
  width: 100%;
  justify-content: center;
}
.btn-whatsapp:hover { background: #9a6cc9; }

.btn-small { padding: 8px 14px; font-size: 0.85rem; }

/* ---------- thread divider ---------- */
.thread-divider {
  width: 100%;
  height: 20px;
  margin: 8px 0;
}
.thread-divider path {
  fill: none;
  stroke: rgba(58,36,48,0.18);
  stroke-width: 2;
}

/* ---------- section heads ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 34px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  margin: 0;
}

.section-head p {
  margin: 0;
  color: #7A5A68;
  max-width: 42ch;
}

section { padding: 64px 0; }

/* ---------- product shelf ---------- */
.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 26px;
}

.card {
  background: var(--cream-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(58,36,48,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 30px -18px rgba(58,36,48,0.35);
}

.card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--oat-deep);
  overflow: hidden;
  position: relative;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.card .thumb .sold-out {
  position: absolute;
  inset: 0;
  background: rgba(58,36,48,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.1rem;
}

.card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0;
}

.card .price {
  color: var(--berry-deep);
  font-weight: 600;
  font-size: 1.05rem;
}

.card .desc {
  font-size: 0.9rem;
  color: #6B4F5A;
  flex: 1;
  margin: 0;
}

.card .cat {
  font-size: 0.75rem;
  color: var(--sage);
  text-transform: lowercase;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #8A6A78;
}

/* ---------- custom order ---------- */
.custom-order {
  background: linear-gradient(135deg, var(--berry) 0%, var(--berry-deep) 100%);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 52px;
}

.custom-order .section-head h2,
.custom-order .section-head p { color: #ffffff; }
.custom-order .section-head p { opacity: 0.9; }

.order-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.order-form .full { grid-column: 1 / -1; }

.order-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  opacity: 0.95;
}

.order-form input,
.order-form textarea,
.order-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.order-form input::placeholder,
.order-form textarea::placeholder { color: rgba(255,255,255,0.75); }

.order-form textarea { resize: vertical; min-height: 100px; }

/* ---------- about ---------- */
.about .wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.about p { color: #5A4048; max-width: 56ch; }

/* ---------- footer ---------- */
footer {
  background: var(--charcoal);
  color: var(--oat);
  padding: 48px 0 28px;
  margin-top: 40px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

footer .brand { color: var(--oat); }
footer .fine { opacity: 0.6; font-size: 0.85rem; margin-top: 10px; }
footer .links { display: flex; gap: 20px; }
footer .links a { text-decoration: none; opacity: 0.85; font-size: 0.9rem; }
footer .links a:hover { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .about .wrap { grid-template-columns: 1fr; }
  .order-form { grid-template-columns: 1fr; }
  .custom-order { padding: 32px 22px; }
  nav.site-nav { display: none; }
}

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

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--charcoal);
  color: var(--oat);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- admin ---------- */
.admin-wrap { max-width: 880px; margin: 0 auto; padding: 40px 24px 80px; }

.admin-login {
  max-width: 380px;
  margin: 80px auto;
  background: var(--cream-card);
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(58,36,48,0.08);
}

.admin-login h1 { font-family: var(--serif); font-size: 1.6rem; margin-top: 0; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: #6B4F5A; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid rgba(58,36,48,0.2);
  font-family: var(--sans);
  font-size: 0.95rem;
  background: #fff;
}
.field textarea { resize: vertical; min-height: 80px; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.admin-header h1 { font-family: var(--serif); font-size: 1.8rem; margin: 0; }

.admin-panel {
  background: var(--cream-card);
  border: 1px solid rgba(58,36,48,0.08);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 30px;
}
.admin-panel h2 { font-family: var(--serif); font-size: 1.25rem; margin-top: 0; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-grid .full { grid-column: 1/-1; }

.admin-list-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(58,36,48,0.08);
}
.admin-list-item img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius); background: var(--oat-deep); }
.admin-list-item .info { flex: 1; }
.admin-list-item .info h4 { margin: 0 0 2px; font-family: var(--serif); font-size: 1rem; }
.admin-list-item .info span { font-size: 0.85rem; color: #7A5A68; }
.admin-list-item .row-actions { display: flex; gap: 8px; }

.msg { font-size: 0.9rem; margin-top: 10px; }
.msg.error { color: #a83232; }
.msg.ok { color: #3f7a3f; }

.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
