/* What About Yarn — shared styles for the holding site */

:root {
  --ink: #141414;
  --muted: #6b6b6b;
  --line: #d9d9d9;
  --bg: #ffffff;
  --placeholder: #e5e5e5;
  --pad: 32px;
  --img: min(32.5vw, 475px);               /* homepage square image */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);   /* soft, long ease-out */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad);
}

/* ---------- Top row: nav | logo | socials ---------- */
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}
.logo { justify-self: center; display: block; }
.logo img { display: block; height: 28px; width: auto; }

.list { list-style: none; display: grid; gap: 2px; }
.list a,
.list .soon-item {
  position: relative;
  display: inline-block;
  font-weight: 550;
  padding-bottom: 1px;
}

/* 1px line that grows 0 → 100% on hover */
.ulink { position: relative; display: inline-block; }
.list a::after,
.ulink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.list a:hover::after,
.list a:focus-visible::after,
.ulink:hover::after,
.ulink:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.list a:focus-visible,
.ulink:focus-visible { outline: none; }

/* Coming-soon items: struck through, faded, with a small "soon" tag */
.soon-item { cursor: default; }
.soon-item s {
  opacity: 0.35;
  text-decoration-thickness: 1px;
}
.soon-item sup {
  position: absolute;
  left: 100%;
  top: -0.35em;
  margin-left: 4px;
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.socials { justify-self: end; width: var(--img); }

/* ---------- Homepage: bottom-left blurb ---------- */
.blurb {
  position: absolute;
  left: var(--pad);
  bottom: var(--pad);
  max-width: 340px;
}
.blurb p + p { margin-top: 10px; }
.blurb .soon { font-weight: 550; }

/* ---------- Homepage: bottom-right square image ---------- */
.hero {
  position: absolute;
  right: var(--pad);
  bottom: var(--pad);
  width: var(--img);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--placeholder);
}
.hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Consultations page ---------- */
.centre {
  min-height: calc(100svh - var(--pad) * 2 - 140px);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 72px 0 48px;
}
.centre-head { text-align: center; max-width: 520px; margin-bottom: 56px; }
.centre-head h1 {
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.centre-head p { color: var(--muted); text-wrap: balance; }

.offers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  width: 100%;
  max-width: 1080px;
}
.offer {
  border-top: 1px solid var(--ink);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
}
.offer h2 {
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.offer .meta { font-weight: 550; margin-bottom: 16px; }
.offer .lead { margin-bottom: 14px; }
.offer ul {
  list-style: none;
  color: var(--muted);
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}
.offer ul li::before { content: "— "; }
.offer .note { color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; }
.offer .book {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  padding-bottom: 2px;
  transition: opacity 0.6s var(--ease);
}
.offer .book::after { transform: scaleX(1); }   /* always underlined */
.offer .book:hover { opacity: 0.6; }

/* ---------- Collaborations page ---------- */
.collab { width: 100%; max-width: 860px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 26px 0 22px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .num {
  display: block;
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.stat .ulink { color: var(--muted); }
.stats-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 12px;
  margin-bottom: 56px;
}
.collab-ways { max-width: 640px; margin: 0 auto 56px; }
.collab-ways ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}
.collab-ways h2 {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 18px;
}
.collab-ways li {
  list-style: none;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.contact { text-align: center; }
.contact p { color: var(--muted); margin-bottom: 8px; }
.contact .email {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-bottom: 3px;
}
.contact .email::after { transform: scaleX(1); }   /* always underlined */
.contact .email { transition: opacity 0.6s var(--ease); }
.contact .email:hover { opacity: 0.6; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .collab-ways ul { grid-template-columns: 1fr; }
  .collab-ways h2 { text-align: left; }
  .contact .email { font-size: 1.15rem; }
}

/* ---------- Entrance animations (only when JS is on) ---------- */
.js .fade {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 100ms + 200ms);
}
.js .ready .fade { opacity: 1; transform: none; }

/* Image grows from 0 to full height, bottom up */
.js .hero {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.5s var(--ease) 0.25s;
}
.js .hero img {
  transform: scale(1.12);
  transition: transform 2s var(--ease) 0.25s;
}
.js .ready .hero { clip-path: inset(0 0 0 0); }
.js .ready .hero img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .js .fade, .js .hero, .js .hero img { transition: none; transform: none; opacity: 1; clip-path: none; }
  .list a::after, .ulink::after { transition: none; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 1000px) {
  .offers { grid-template-columns: 1fr; max-width: 520px; gap: 40px; }
}

@media (max-width: 760px) {
  :root { --pad: 20px; --img: 100%; }
  .top { grid-template-columns: 1fr auto; column-gap: 24px; row-gap: 28px; }
  .logo { grid-column: 1 / -1; grid-row: 1; }
  .socials { width: auto; text-align: right; }
  .blurb, .hero { position: static; }
  .blurb { margin-top: 48px; max-width: none; }
  .hero { margin-top: 32px; }
  .centre { min-height: 0; padding-top: 56px; }
  .centre-head { margin-bottom: 40px; }
}
