/* =====================================================================
   LITTLE LIKENESS — design tokens
   A warm fibre studio: undyed-linen ground, espresso ink, and accents
   pulled from dyed wool roving (moss, heather, butter). The signature
   is the fuzz: an SVG fibre filter softens the edges of wool chips and
   frames, and stray wisps drift through the hero — everything feels
   needle-felted, nothing feels printed.
   ===================================================================== */
:root {
  --linen: #f2ece1;          /* undyed wool ground      */
  --card: #fbf8f1;
  --espresso: #3a2e28;       /* ink                     */
  --soft: #6f6157;
  --moss: #75855a;
  --heather: #8e7a9b;
  --butter: #e8c87e;
  --hoopwood: #8a6b4e;
  --line: rgba(58, 46, 40, 0.16);
  --shadow: 0 16px 34px -18px rgba(58, 46, 40, 0.38);
  --r: 22px;
  --font-display: "Young Serif", serif;
  --font-body: "Mulish", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--espresso);
  line-height: 1.6;
  background:
    radial-gradient(circle at 1px 1px, rgba(58, 46, 40, 0.05) 1px, transparent 0) 0 0 / 7px 7px,
    var(--linen);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0 0 0.45em; letter-spacing: -0.005em; }
h1 em, .hero-proof em { font-style: italic; color: var(--moss); }

.skip {
  position: absolute; left: -999px; top: 0; background: var(--espresso); color: var(--linen);
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 12px 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--heather); outline-offset: 3px; border-radius: 6px; }

/* the fuzzy fibre edge, shared by wool chips and frames */
.fuzzy { position: relative; z-index: 0; }
.fuzzy::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--wool, var(--card));
  border-radius: inherit;
  filter: url(#fuzz);
}

/* ---------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.2rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--linen) 90%, #fff);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display); font-size: 1.3rem;
  text-decoration: none; display: flex; align-items: center; gap: 0.55rem;
}
.paw-mark {
  width: 30px; height: 24px; flex: none;
  background: center / contain no-repeat
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 32"><g fill="%238e7a9b" transform="translate(0 8) rotate(-12 8 8) scale(0.62)"><ellipse cx="5" cy="9" rx="2.8" ry="3.7"/><ellipse cx="10" cy="5.4" rx="2.9" ry="3.9"/><ellipse cx="15" cy="5.4" rx="2.9" ry="3.9"/><ellipse cx="20" cy="9" rx="2.8" ry="3.7"/><path d="M12.5 12 C17.4 12 20.4 15.5 19.6 18.9 C18.9 22.2 15.9 23.8 12.5 23.8 C9.1 23.8 6.1 22.2 5.4 18.9 C4.6 15.5 7.6 12 12.5 12 Z"/></g><g fill="%238e7a9b" opacity="0.72" transform="translate(23 0) rotate(12 8 8) scale(0.62)"><ellipse cx="5" cy="9" rx="2.8" ry="3.7"/><ellipse cx="10" cy="5.4" rx="2.9" ry="3.9"/><ellipse cx="15" cy="5.4" rx="2.9" ry="3.9"/><ellipse cx="20" cy="9" rx="2.8" ry="3.7"/><path d="M12.5 12 C17.4 12 20.4 15.5 19.6 18.9 C18.9 22.2 15.9 23.8 12.5 23.8 C9.1 23.8 6.1 22.2 5.4 18.9 C4.6 15.5 7.6 12 12.5 12 Z"/></g></svg>');
}
.head-nav { display: flex; gap: 1.3rem; margin-left: auto; }
.head-nav a {
  text-decoration: none; font-weight: 800; font-size: 0.92rem; color: var(--soft);
  padding: 0.25rem 0; border-bottom: 2.5px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.head-nav a:hover { color: var(--espresso); border-color: var(--moss); }

/* --------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font: 800 0.98rem var(--font-body);
  padding: 0.9rem 1.7rem; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--espresso); cursor: pointer;
  background: var(--card); color: var(--espresso);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-solid { background: var(--espresso); color: var(--linen); }
.btn-line { background: transparent; }
.btn-small { padding: 0.55rem 1.1rem; font-size: 0.86rem; }
.btn-big { font-size: 1.06rem; padding: 1rem 1.9rem; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; box-shadow: none; }

/* ------------------------------------------------------------ hero */
.hero {
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 2.5rem; align-items: center;
  max-width: 72rem; margin: 0 auto;
  padding: clamp(2.8rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
}
.badge {
  display: inline-block; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--soft);
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); padding: 0.45rem 1rem; margin: 0 0 1.2rem;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
.hero-sub { font-size: 1.07rem; color: var(--soft); max-width: 32rem; margin: 1rem 0 1.7rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-proof { margin-top: 1.4rem; font-weight: 800; font-size: 0.9rem; color: var(--soft); }

/* the felted display mat */
.mat-scene { position: relative; display: grid; justify-items: center; padding: 1.2rem 0 2.2rem; }
.mat {
  position: relative; z-index: 0; width: min(88%, 340px); aspect-ratio: 1; border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 10px 26px rgba(58, 46, 40, 0.1), var(--shadow);
  display: grid; place-items: center;
}
.mat::before {
  /* fuzzy wool halo behind the mat */
  content: ""; position: absolute; inset: -14px; z-index: -1; border-radius: 50%;
  background: #e7dfd0; filter: url(#fuzz);
}
.mat::after {
  /* blanket-stitch ring */
  content: ""; position: absolute; inset: 12px; border-radius: 50%;
  border: 2.5px dashed var(--hoopwood); opacity: 0.45;
}
.mat .model {
  position: relative; z-index: 1; grid-area: 1 / 1; width: 86%;
  animation: settle 5s ease-in-out infinite;
  transition: opacity 1.8s ease;
}
.mat .model.is-hidden { opacity: 0; }
@keyframes settle {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-7px) rotate(0.8deg); }
}

/* the felting needle resting against the mat */
.needle { position: absolute; right: 4%; bottom: 4%; transform: rotate(38deg); }
.needle-shaft {
  display: block; width: 3.5px; height: 110px; margin: 0 auto;
  background: linear-gradient(#b9bcc4, #7d818c); border-radius: 2px;
}
.needle-handle {
  display: block; width: 16px; height: 44px; margin: -2px auto 0;
  background: var(--hoopwood); border-radius: 8px;
  box-shadow: inset -3px 0 0 rgba(0, 0, 0, 0.18);
}

/* drifting wool wisps */
.wisp {
  position: absolute; width: 34px; height: 16px; opacity: 0.65; z-index: 2;
  background: no-repeat center / contain
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 20"><path d="M2 14 Q10 2 20 8 T38 6" stroke="%23c9bfae" stroke-width="3" fill="none" stroke-linecap="round"/><path d="M6 17 Q14 9 24 13 T38 12" stroke="%23d8cfbf" stroke-width="2.4" fill="none" stroke-linecap="round"/></svg>');
  animation: float 9s ease-in-out infinite;
}
.w1 { top: 6%; left: 6%; }
.w2 { top: 22%; right: 2%; animation-delay: -3s; transform: scale(1.3) rotate(14deg); }
.w3 { bottom: 10%; left: 0; animation-delay: -6s; transform: scale(0.85) rotate(-12deg); }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 10px -16px; }
}

/* --------------------------------------------------- yarn dividers */
.yarn-divider {
  height: 16px; max-width: 72rem; margin: 0 auto;
  background: no-repeat center / auto 12px
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 12"><path d="M0 6 Q12.5 0 25 6 T50 6 T75 6 T100 6 T125 6 T150 6 T175 6 T200 6" stroke="%238e7a9b" stroke-width="2.4" fill="none" stroke-linecap="round"/></svg>');
  background-repeat: repeat-x;
  opacity: 0.55;
}

/* ---------------------------------------------------------- styles */
.styles, .how, .faq { max-width: 72rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem); }
.styles h2, .how h2, .faq h2, .builder h2 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); }
.section-sub { color: var(--soft); margin: -0.1rem 0 1.9rem; max-width: 38rem; }

.style-cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.style-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.4rem 1.3rem 1.5rem; text-align: center;
  transition: transform 0.18s, box-shadow 0.18s;
}
.style-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.style-frame {
  width: 74%; margin: 0 auto 0.8rem; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; --wool: var(--tone, #e7dfd0);
}
.style-frame img { width: 92%; }
.style-card h3 { font-size: 1.35rem; margin-bottom: 0.15rem; }
.style-card .tag {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--soft); margin-bottom: 0.55rem;
}
.style-card p { color: var(--soft); font-size: 0.93rem; margin: 0 0 0.8rem; }
.style-card .price-line { font-family: var(--font-display); font-size: 1.3rem; }

/* ------------------------------------------------------------- how */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem 1.4rem; }
.step-dot {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  font-family: var(--font-display); font-size: 1.25rem; color: var(--espresso);
  margin-bottom: 0.9rem; --wool: var(--butter);
  position: relative; z-index: 0;
}
.step-dot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: var(--wool); filter: url(#fuzz);
}
.steps li:nth-child(2) .step-dot { --wool: #cfd9bd; }
.steps li:nth-child(3) .step-dot { --wool: #ddd2e6; }
.steps h3 { font-size: 1.25rem; }
.steps p { margin: 0; color: var(--soft); font-size: 0.94rem; }

/* --------------------------------------------------------- builder */
.builder-wrap { padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem); }
.builder {
  max-width: 46rem; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.8rem);
}
fieldset { border: 0; padding: 0; margin: 0 0 1.7rem; }
legend { font-family: var(--font-display); font-size: 1.15rem; padding: 0; margin-bottom: 0.8rem; }

/* wool-puff style picker — fuzzy edges, squishes when picked */
.wool-options { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.wool-options label { position: relative; cursor: pointer; }
.wool-options input { position: absolute; opacity: 0; pointer-events: none; }
.wool-chip {
  position: relative; z-index: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  min-width: 128px; padding: 0.95rem 1.2rem;
  border-radius: 56% 44% 52% 48% / 52% 54% 46% 48%;
  font-weight: 800; text-align: center; line-height: 1.25;
  transition: transform 0.14s;
}
.wool-chip::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; background: var(--wool, #e7dfd0);
  filter: url(#fuzz);
  transition: background 0.15s;
}
.wool-chip small { font-weight: 600; font-size: 0.74rem; color: var(--soft); }
.wool-chip .chip-price { font-family: var(--font-display); font-weight: 400; font-size: 0.95rem; margin-top: 0.15rem; }
.wool-options label:hover .wool-chip { transform: translateY(-2px); }
.wool-options input:checked + .wool-chip {
  transform: scale(0.94);
  box-shadow: inset 0 4px 10px rgba(58, 46, 40, 0.28);
  border-radius: 50% 50% 48% 52% / 50% 48% 52% 50%;
}
.wool-options input:checked + .wool-chip::after {
  content: "✓"; position: absolute; top: -7px; right: -4px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--moss); color: var(--linen); font-size: 0.8rem;
}
.wool-options input:focus-visible + .wool-chip { outline: 3px solid var(--heather); outline-offset: 4px; }
.wool-moss    { --wool: #d3dcbf; }
.wool-heather { --wool: #ded1e8; }
.wool-butter  { --wool: #f0dfae; }
.picker-hint { margin: 0.7rem 0 0; font-size: 0.86rem; color: var(--soft); }

/* pet detail fields */
.pet-details { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 800; font-size: 0.92rem; margin-bottom: 0.35rem; }
.field input, .field textarea {
  width: 100%; font: 600 1rem var(--font-body); color: var(--espresso);
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.15s;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #a89d92; font-weight: 400; }
.field input:hover, .field textarea:hover { border-color: var(--soft); }
.field input:focus, .field textarea:focus { outline: 3px solid var(--heather); outline-offset: 2px; border-color: var(--espresso); }

.order-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-top: 0.4rem; padding-top: 1.3rem; border-top: 1.5px dashed var(--line);
}
.order-price { display: flex; flex-direction: column; }
.order-label { font-weight: 800; font-size: 0.85rem; color: var(--soft); }
#orderTotal { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; }
.order-fine { font-size: 0.8rem; color: var(--soft); margin: 0.9rem 0 0; }
.form-error {
  margin: 0.9rem 0 0; font-weight: 800; color: #8f3535;
  background: #f6e0dc; border: 1.5px solid #b06a5f; border-radius: 14px; padding: 0.65rem 0.95rem;
}

/* ------------------------------------------------------------- faq */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 0.8rem; overflow: hidden; }
.faq summary { cursor: pointer; font-weight: 800; padding: 1rem 2.8rem 1rem 1.25rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.15rem; top: 50%; translate: 0 -50%;
  font-family: var(--font-display); font-size: 1.25rem; color: var(--moss); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 1.25rem 1.1rem; color: var(--soft); }

/* ---------------------------------------------------------- footer */
.site-foot {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 2.5rem clamp(1rem, 4vw, 3rem); text-align: center;
  display: grid; gap: 1.1rem; justify-items: center;
}
.site-foot .brand { font-size: 1.2rem; }
.socials { display: flex; gap: 0.9rem; }
.socials a {
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 1.5px solid var(--espresso); border-radius: 50%;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.socials a:hover { background: var(--espresso); color: var(--linen); transform: translateY(-2px); }
.foot-fine { font-size: 0.8rem; color: var(--soft); margin: 0; }

/* ----------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 140%);
  background: var(--espresso); color: var(--linen); font-weight: 800;
  padding: 0.75rem 1.4rem; border-radius: 999px;
  font-size: 0.92rem; z-index: 60; transition: transform 0.3s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }


/* ------------------------------------------------ paw-print parade */
.paw-trail { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.pawprint {
  position: absolute; width: 21px; height: 23px; opacity: 0;
  background: center / contain no-repeat;
  animation: pawlife 4.6s ease forwards;
}
.paw-dog {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 26'><g fill='%238a6b4e'><ellipse cx='5' cy='9' rx='2.8' ry='3.7'/><ellipse cx='10' cy='5.4' rx='2.9' ry='3.9'/><ellipse cx='15' cy='5.4' rx='2.9' ry='3.9'/><ellipse cx='20' cy='9' rx='2.8' ry='3.7'/><path d='M12.5 12 C17.4 12 20.4 15.5 19.6 18.9 C18.9 22.2 15.9 23.8 12.5 23.8 C9.1 23.8 6.1 22.2 5.4 18.9 C4.6 15.5 7.6 12 12.5 12 Z'/></g></svg>");
}
.paw-cat {
  width: 16px; height: 17px;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 24'><g fill='%238e7a9b'><circle cx='5' cy='7.6' r='2.3'/><circle cx='9.4' cy='5.2' r='2.4'/><circle cx='13.8' cy='5.2' r='2.4'/><circle cx='18.2' cy='7.6' r='2.3'/><ellipse cx='11.5' cy='15.6' rx='6.4' ry='5.6'/></g></svg>");
}
@keyframes pawlife {
  0%   { opacity: 0; scale: 0.6; }
  10%  { opacity: 0.5; scale: 1; }
  70%  { opacity: 0.42; }
  100% { opacity: 0; }
}

/* ------------------------------------------------------ responsive */
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .mat-scene { order: 1; max-width: 340px; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-sub { margin-inline: auto; }
  .head-nav { display: none; }
  .needle { right: -2%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wisp { display: none; }
  .paw-trail { display: none; }
}
