/* Ply: shared brand styles for the home, product and measure pages. */
:root {
  --bg: #ffffff;
  --ink: #1c1a1b;
  --muted: #6a6466;
  --surface: #f4f2f3;
  --line: #e6e2e4;
  --line-2: #cdc6ca;
  --plum: #5b2a4e;
  --plum-deep: #3f1c36;
  --plum-tint: #f1e9ef;
  --serif: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --sans: "Rethink Sans", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 4.4vw, 72px);
  --nav-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);

  /* Photo-dependent crops. Every focal point lives here: if a photo changes, adjust these, not the layout. */
  --pos-cable: 50% 14%;       /* tan cable knit on white, home hero (wide frame): head to mid-hem */
  --pos-cable-sm: 50% 8%;     /* same photo in the 4:5 phone hero */
  --pos-cable-thumb: 50% 22%; /* same photo, product page main view and thumbnail */
  --pos-cream: 50% 35%;       /* cream chunky knit close-up: crops the chin, keeps the hands on the collar */
  --pos-grey: 50% 50%;        /* grey marl jumper on a winter street: hair to hem */
  --pos-stack: 25% 50%;       /* folded stack (landscape) in a portrait frame: centred on the stack, left of middle */
  --pos-moorit: 50% 46%;      /* dark brown sheep, full-bleed wide frame */
  --pos-moorit-sm: 54% 50%;   /* same photo in portrait frames (phone, product gallery): keeps the face */
  --white-photo-bg: var(--surface); /* cable.webp is a cut-out on pure white: it multiplies onto this backdrop */

  /* Wool tones for the colour swatches */
  --wool-toffee: #c9a27c;   /* sampled from cable.webp */
  --wool-natural: #e8dcc2;  /* sampled from cream.webp */
  --wool-grey: #7f8489;     /* sampled from grey.webp */
}
@media (max-width: 860px) {
  :root { --nav-h: 64px; }
}

em, i { font-style: normal; }
html { background: var(--bg); }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, figure, ul, ol, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
img { height: auto; }
::selection { background: var(--plum); color: #fff; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
[hidden] { display: none !important; }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100; padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 15px; text-decoration: none; transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip:focus-visible { transform: none; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.display { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -0.012em; font-kerning: normal; text-wrap: balance; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Buttons: one hover style for the whole brand (kit "fill") ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 54px; padding: 14px 30px; border-radius: 999px; border: 1px solid transparent;
  font: 500 16px/1.25 var(--sans); letter-spacing: 0.005em; text-decoration: none; text-align: center;
  background: none; transition: transform 0.25s var(--ease), color 0.45s var(--ease-io), border-color 0.45s var(--ease-io), background-color 0.45s var(--ease-io);
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-plum { background: var(--plum); color: #fff; --k-fill: var(--plum-deep); --k-fill-ink: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); --k-fill: var(--ink); --k-fill-ink: #fff; }
/* The fill colour only exists while it is visible (so the resting button reads as ink on white). */
.btn-line[data-hover="fill"]::before { background: transparent; transition: transform 0.55s var(--ease-io), background-color 0s linear 0.55s; }
.btn-line[data-hover="fill"]:is(:hover, :focus-visible)::before { background: var(--ink); transition: transform 0.55s var(--ease-io), background-color 0s linear 0s; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--surface); color: var(--muted); border-color: var(--surface); cursor: not-allowed; }
.btn[disabled]::before, .btn[aria-disabled="true"]::before { display: none; }
.btn[disabled]:active { transform: none; }

.tlink {
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em;
  text-decoration-color: var(--line-2); transition: text-decoration-color 0.35s var(--ease), color 0.35s var(--ease);
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
}
.tlink:hover { text-decoration-color: currentColor; color: var(--plum); }

/* Swatch dot used in captions */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); vertical-align: -1px; margin-right: 10px; border: 1px solid rgba(28, 26, 27, 0.12); }

/* ---------- Shop navigation ---------- */
.pn { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color 0.4s var(--ease); }
.pn.is-scrolled, .pn.is-open { border-bottom-color: var(--line); }
.pn-in { height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.pn-l, .pn-r { display: flex; align-items: center; gap: clamp(22px, 2.6vw, 40px); }
.pn-r { justify-self: end; position: relative; }
.pn-links { display: flex; gap: clamp(22px, 2.6vw, 40px); }
.pn a, .pn button { font-size: 15px; line-height: 1.4; text-decoration: none; background: none; border: 0; padding: 8px 0; color: var(--ink); letter-spacing: 0.005em; }
.pn-links a, .pn-r button { background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat; transition: background-size 0.5s var(--ease-io), color 0.3s; }
.pn-links a:hover, .pn-r button:hover, .pn-links a[aria-current="page"], .pn-r button[aria-expanded="true"] { background-position: 0 100%; background-size: 100% 1px; }
.pn-mark { font-family: var(--serif) !important; font-size: 38px !important; line-height: 1; letter-spacing: 0.01em; padding: 0 !important; }
.pn-bag .bag-n { display: inline-block; font-variant-numeric: tabular-nums; }
.pn-bag.bump .bag-n { animation: bagbump 0.7s var(--ease); }
@keyframes bagbump { 0% { transform: none; } 30% { transform: translateY(-5px) scale(1.25); color: var(--plum); } 100% { transform: none; } }
.pn-menu { display: none !important; align-items: center; gap: 10px; }
.pn-menu i { position: relative; width: 18px; height: 8px; display: inline-block; }
.pn-menu i::before, .pn-menu i::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform 0.4s var(--ease); }
.pn-menu i::before { top: 0; }
.pn-menu i::after { bottom: 0; }
.pn-menu[aria-expanded="true"] i::before { transform: translateY(3.25px) rotate(45deg); }
.pn-menu[aria-expanded="true"] i::after { transform: translateY(-3.25px) rotate(-45deg); }

/* Account and bag panels */
.pop {
  position: absolute; top: calc(50% + var(--nav-h) / 2); right: 0; width: min(380px, calc(100vw - 32px));
  background: var(--bg); border: 1px solid var(--line); padding: 30px 30px 28px; z-index: 60;
}
.pop h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.pop p { margin-top: 12px; font-size: 15px; color: var(--muted); }
.pop .btn { margin-top: 22px; width: 100%; }
.pop-list { margin-top: 18px; border-top: 1px solid var(--line); }
.pop-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pop-list li span { color: var(--muted); font-size: 14px; }
.pop-list li > b.num { justify-self: end; }
.pop-list li button { grid-column: 2; grid-row: 2; justify-self: end; font-size: 14px; color: var(--muted); }
.pop-total { display: flex; justify-content: space-between; margin-top: 16px; font-size: 15px; }
@media (max-width: 860px) {
  .pop { right: calc(16px - var(--pad)); }
}

/* Phone drawer */
.drawer { position: fixed; left: 0; right: 0; top: var(--nav-h); bottom: 0; z-index: 49; background: var(--bg); padding: 40px var(--pad) 32px; display: flex; flex-direction: column; overflow-y: auto; }
.drawer ul { display: grid; gap: 6px; }
.drawer a { font-family: var(--serif); font-size: 44px; line-height: 1.2; text-decoration: none; }
.drawer a[aria-current="page"] { color: var(--plum); }
.drawer p { margin-top: auto; padding-top: 40px; font-size: 15px; color: var(--muted); }
@media (max-width: 860px) {
  .pn-links, .pn-acc { display: none !important; }
  .pn-menu { display: inline-flex !important; }
  .pn-mark { font-size: 32px !important; }
}
@media (min-width: 861px) {
  .drawer { display: none !important; }
}

/* ---------- Figure (silhouette) shared by home and measure ---------- */
.fig-body { fill: #fff; stroke: var(--ink); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.fig-tone { fill: #e9e4e7; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* A cut-out photo on pure white sits on the soft studio backdrop instead of floating on the page. */
.on-white { background: var(--white-photo-bg); }
.on-white img, img.on-white { mix-blend-mode: multiply; }

/* ---------- Media: slow crossfade and a quiet 1.03 zoom on hover ---------- */
.zoom { overflow: hidden; }
.zoom img { transition: transform 1.4s var(--ease); }
@media (hover: hover) {
  a:hover .zoom img, .zoom:hover img { transform: scale(1.03); }
}

/* ---------- Footer ---------- */
.pf { border-top: 1px solid var(--line); padding-top: clamp(96px, 11vw, 170px); padding-bottom: 36px; }
.pf-news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pf-news h2 { font-size: clamp(40px, 4.4vw, 68px); max-width: 9em; }
.pf-news p { color: var(--muted); max-width: 30em; }
.pf-form { margin-top: 26px; display: flex; gap: 12px; max-width: 520px; }
.pf-form input {
  flex: 1; min-width: 0; height: 54px; padding: 0 22px; border: 1px solid var(--line-2); border-radius: 999px;
  font: 400 16px var(--sans); color: var(--ink); background: var(--bg);
}
.pf-form input::placeholder { color: var(--muted); }
.pf-form input:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; border-color: var(--ink); }
.pf-msg { margin-top: 14px; min-height: 1.5em; font-size: 15px; color: var(--plum) !important; }
.pf-cols { margin-top: clamp(88px, 10vw, 150px); display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 32px; font-size: 15px; }
.pf-cols h3 { font: 500 14px/1.4 var(--sans); color: var(--muted); margin-bottom: 14px; }
.pf-cols li + li { margin-top: 8px; }
.pf-cols a { text-decoration: none; }
.pf-cols a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.pf-brand { font-family: var(--serif); font-size: 44px; line-height: 1; }
.pf-legal { margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) {
  .pf-news { grid-template-columns: 1fr; gap: 20px; }
  .pf-form { flex-direction: column; }
  .pf-form input { flex: none; width: 100%; }
  .pf-form .btn { width: 100%; }
  .pf-cols { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .pf-cols > :first-child { grid-column: 1 / -1; }
}
