/* Wholesage one-page site. Colours and type from the brand guidelines v1.0:
   Ink on Mist, Sage as an accent only (it cannot carry small text), Figtree throughout. */

@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-700-normal.woff2) format('woff2'); }

:root {
  --ink: #17302A;
  --sage: #5F8C6F;
  --mist: #F3F5F2;
  --night: #10201A;
  --soft: #52665E;      /* muted text, 5.6:1 on Mist */
  --line: #C9D3CD;      /* rules between moments */
  --hair: #DDE4DF;      /* rules and borders inside cards */
  --box: #EEF2EF;       /* the green box in the weekly email */
  --card: #FFFFFF;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: Figtree, 'Segoe UI', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--sage); text-underline-offset: 4px; }
a:hover { color: var(--night); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.soft { color: var(--soft); }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1184px; margin: 0 auto; padding: 0 32px; }

/* Header */
.top { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding: 32px 0; }
.top img { width: 168px; height: auto; display: block; }
.top nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; font-weight: 600; }

/* Hero */
.hero { padding: 72px 0 96px; display: flex; flex-direction: column; gap: 28px; max-width: 900px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.hero p { font-size: clamp(20px, 2vw, 26px); line-height: 1.4; color: var(--soft); max-width: 720px; }

/* Sections open with the heavy rule */
.section { border-top: 2px solid var(--ink); }
.section > h2.label { font-size: 20px; font-weight: 700; padding: 24px 0 0; }

/* A moment: when it happens on the left, what you get on the right */
.moment { display: flex; flex-wrap: wrap; gap: 16px 40px; padding: 44px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.moment.first { border-top: 0; padding-top: 56px; }
.when { flex: 0 0 200px; font-size: 16px; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; }
.what { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.what h3 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.what > p { color: var(--soft); max-width: 620px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 10px; padding: 28px 32px; max-width: 660px; }
.card.wide { max-width: 740px; }
.card h4 { margin: 0; font-size: 17px; font-weight: 700; }

/* An email, as Gmail shows it: subject, then the sender's picture, name and time */
.mail { display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.mail .subject { font-size: 20px; line-height: 1.3; }
.sender { display: flex; gap: 12px; align-items: center; }
.sender img { width: 40px; height: 40px; border-radius: 50%; display: block; flex: none; }
.sender .who { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; }
.sender .who span { font-size: 14px; color: var(--soft); }
.sender time, .sender .at { font-size: 14px; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail .body { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 0 52px; }
.mail .body h4 { padding-top: 6px; }
.mail .stockist { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.mail .stockist .meta { font-size: 14px; color: var(--soft); }
.namelink {
  background: none; border: 0; padding: 6px 0; margin: -6px 0; text-align: left;
  font-weight: 700; text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 3px;
}
.namelink:hover { text-decoration-thickness: 2px; }
.mail .item-title { font-size: 19px; line-height: 1.3; font-weight: 700; padding-top: 10px; }
.box { background: var(--box); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.box .big { font-size: 17px; font-weight: 700; }
.box .note { padding-top: 6px; }
.three { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 24px; font-variant-numeric: tabular-nums; }
.three .h { font-size: 13px; font-weight: 600; color: var(--soft); }
.three .r { text-align: right; }
.three .b { font-weight: 600; }

/* The stockist page */
.page { display: flex; flex-direction: column; gap: 20px; max-width: 680px; }
.page-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.page-head .meta { font-size: 14px; color: var(--soft); }
.btn { font-size: 15px; font-weight: 600; background: var(--card); border: 2px solid var(--sage); border-radius: 8px; padding: 10px 16px; min-height: 44px; }
.btn:hover { background: var(--mist); }
.btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--mist); }
.buys { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--hair); padding-top: 18px; }
.buys > p { font-size: 15px; }
.scroll { overflow-x: auto; }
.grid4 { min-width: 500px; margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 76px 136px 60px; gap: 14px 24px; font-size: 15px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.grid4 .h { font-size: 13px; font-weight: 600; color: var(--soft); }
.grid4 .rule, .order .rule { grid-column: 1 / -1; border-top: 1px solid var(--hair); }
.grid4 .c { text-align: center; }
.grid4 .r { text-align: right; font-weight: 600; }
.grid4 .b { font-weight: 600; }

/* The order list */
.order { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 32px; align-items: center; font-size: 16px; font-variant-numeric: tabular-nums; }
.order .pill { grid-column: 1 / -1; justify-self: start; background: var(--ink); color: var(--mist); font-size: 15px; font-weight: 600; border-radius: 999px; padding: 8px 16px; }
.order .h { font-size: 13px; font-weight: 600; color: var(--soft); padding-top: 6px; }
.order .r { text-align: right; }
.order .b { font-weight: 600; }
.qty { justify-self: end; min-width: 56px; min-height: 36px; background: var(--card); color: var(--ink); font-weight: 700; border: 1px solid var(--ink); border-radius: 8px; padding: 5px 11px; }
.qty:hover { background: var(--mist); }
.qty[aria-expanded="true"] { background: var(--ink); color: var(--mist); }
.working { grid-column: 1 / -1; background: var(--mist); border: 1px solid var(--hair); border-radius: 8px; padding: 6px 18px 10px; display: flex; flex-direction: column; font-size: 15px; line-height: 1.4; }
.working[hidden] { display: none; }
.working h5 { margin: 0; font-size: 15px; font-weight: 700; color: var(--soft); padding: 10px 0; }
.working .row { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--hair); }
.working .row small { display: block; font-size: 14px; color: var(--soft); }
.working .row b { font-weight: 600; white-space: nowrap; }
.working .row.total p { font-weight: 600; }
.working .row.total b { font-size: 19px; font-weight: 700; }

/* Landed cost */
.cost { display: flex; flex-direction: column; gap: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 16px 24px; padding: 12px 0 14px; font-variant-numeric: tabular-nums; }
.stats div { display: flex; flex-direction: column; }
.stats .h { font-size: 13px; font-weight: 600; color: var(--soft); }
.stats .v { font-size: 30px; line-height: 1.2; font-weight: 700; }
.stats .w { font-size: 14px; color: var(--soft); }
.cost > p { font-size: 16px; }

/* The two plain sections */
.pair { padding: 64px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 48px 64px; }
.pair > div { display: flex; flex-direction: column; gap: 16px; }
.pair h2, .who-is h2 { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.who-is { padding: 64px 0; display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: flex-start; }
.who-is .photo { flex: 0 0 240px; height: 300px; background: var(--hair); border-radius: 10px; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--soft); }
.who-is .words { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; max-width: 640px; }

/* Contact */
.contact { padding: 64px 0 80px; display: flex; flex-direction: column; gap: 24px; }
.contact h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; max-width: 760px; text-wrap: balance; }
.contact div { display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 20px; font-weight: 600; }

/* Motion. Everything is visible without it: the script only hides what is still below the screen, then eases it in. */
@media (prefers-reduced-motion: no-preference) {
  .moment, .ease { transition: opacity .6s ease, transform .6s ease; }
  .moment.below, .ease.below { opacity: 0; transform: translateY(18px); }
  .page.swap { animation: swap .35s ease; }
  @keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .working:not([hidden]) { animation: swap .25s ease; }
}

/* Phones */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  .top { padding: 24px 0; }
  .top img { width: 140px; }
  .hero { padding: 40px 0 64px; }
  .when { flex-basis: 100%; }
  .moment { padding: 36px 0; }
  .card { padding: 20px 18px; }
  .mail .body { padding-left: 0; }
  .grid4 { min-width: 0; grid-template-columns: minmax(0, 1fr) 40px 92px 36px; gap: 12px 10px; font-size: 14px; }
  .grid4 .h { font-size: 12px; }
  .order { gap: 12px 16px; }
  .working { padding: 4px 14px 8px; }
  .who-is .photo { flex-basis: 100%; height: 260px; }
  .contact div { font-size: 18px; }
}
