/* Maui Nord Farm Co., "Harvest Journal" direction. Tilth & Co prospecting mockup.
   Palette is the client's own mark, measured, with roles assigned (see build ledger). */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-normal-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic-latin.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Yellowtail"; src: url("../fonts/yellowtail-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #F8F3EA;      /* ground, 60% */
  --ink: #1C1A17;        /* text and line, 30% */
  --ink-2: #5C554B;      /* secondary text, 6.65:1 on paper */
  --white: #FFFFFF;      /* button text on cobalt, 5.34:1 */
  --cobalt: #0060F0;     /* the buy action, and nothing else */
  --coral: #F07080;      /* illustration and wash only, never text */
  --salmon: #F08080;     /* illustration and wash only */
  --periwinkle: #6080D0; /* illustration and wash only */
  --orange: #EE8445;     /* illustration, wash and the placeholder frame */
  --wash-coral: rgba(240, 112, 128, 0.14);
  --wash-salmon: rgba(240, 128, 128, 0.18);
  --wash-peri: rgba(96, 128, 208, 0.12);
  --wash-orange: rgba(238, 132, 69, 0.16);
  --line: rgba(28, 26, 23, 0.28);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --script: "Yellowtail", "Brush Script MT", cursive;
  --max: 1360px;
  --gutter: clamp(20px, 4vw, 56px);
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
p { margin: 0 0 1em; max-width: 62ch; }
figure { margin: 0; }
figcaption { font-style: italic; font-size: 15px; line-height: 1.4; color: var(--ink-2); margin-top: 10px; max-width: 46ch; }
small { font-size: 0.85em; }
.price, .btn-price, .ix .px, .size em { font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 4.6vw, 66px); line-height: 1.02; letter-spacing: -0.014em; font-weight: 480; font-variation-settings: "SOFT" 50, "WONK" 1; }
h2 { font-size: clamp(31px, 3.4vw, 52px); line-height: 1.06; letter-spacing: -0.008em; font-variation-settings: "SOFT" 30; }
h3 { font-size: clamp(23px, 2vw, 29px); line-height: 1.14; font-weight: 500; }
.pname a { text-decoration: none; }
.pname a:hover { text-decoration: underline; }
.lede { font-size: clamp(18px, 1.4vw, 20px); line-height: 1.45; color: var(--ink); max-width: 60ch; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; line-height: 1.45; }
.caps { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.note { font-family: var(--script); font-size: clamp(24px, 2.3vw, 32px); line-height: 1; display: inline-block; transform: rotate(-2.5deg); color: var(--ink); white-space: nowrap; }
.note.lo { transform: rotate(1.5deg); }
.note.wrap { white-space: normal; line-height: 1.1; font-size: clamp(22px, 2vw, 28px); max-width: 24ch; }
.ph { display: inline-block; border: 1px dashed var(--orange); background: var(--wash-orange); padding: 1px 8px; border-radius: 3px; font-size: 0.92em; }

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 16px; align-items: start; }
.g > * { grid-column: var(--gs, 1) / var(--ge, 13); }
.hang-r { margin-right: calc(-1 * var(--gutter)); }
.hang-l { margin-left: calc(-1 * var(--gutter)); }
.up { margin-top: -48px; }
.tilt { transform: rotate(-1.4deg); }
.tilt-r { transform: rotate(1.1deg); }
.photo img { width: 100%; border-radius: 2px; }
.photo.short img { aspect-ratio: 4 / 3; object-fit: cover; }
.photo.tall img { aspect-ratio: 4 / 5; object-fit: cover; }
.photo.sq img { aspect-ratio: 1; object-fit: cover; }
.photo.wide img { aspect-ratio: 16 / 10; object-fit: cover; }
.photo.wide.low img { object-position: center 78%; }
.shelf { padding: clamp(18px, 2.4vw, 32px) clamp(20px, 2.6vw, 36px); }
.shelf .entry { padding: 16px 0 18px; }
.shelf .entry:first-of-type { border-top: 0; padding-top: 6px; }
.kinds { font-size: 15px; color: var(--ink-2); margin: -4px 0 10px; }
.inset { width: min(100%, 300px); }
.paper { background: var(--wash-peri); padding: clamp(24px, 3vw, 44px); clip-path: polygon(0 1.5%, 100% 0, 99.4% 98.5%, 0.6% 100%); }
.paper.salmon { background: var(--wash-salmon); }
.paper.coral { background: var(--wash-coral); }

/* marginalia: the one signature move. Lines draw in when they enter view; fills follow. */
svg.marg, svg.wreath, svg.rule { display: block; overflow: visible; height: auto; }
.js svg.marg .ln, .js svg.wreath .ln, .js svg.rule .ln { stroke-dasharray: 0 99999; }
.js svg.marg .fl, .js svg.wreath .fl, .js svg.rule .fl { opacity: 0; transition: opacity 700ms ease-out; }
.js svg.is-drawn .fl { opacity: 1; transition-delay: var(--fill-delay, 800ms); }
.js svg.is-armed .ln { stroke-dasharray: none; }
.marg-abs { position: absolute; pointer-events: none; }
.rel { position: relative; }
.m-hero { width: clamp(80px, 7vw, 96px); margin: 0 0 2px -4px; }
.m-xl { width: clamp(180px, 22vw, 330px); }
.m-lg { width: clamp(150px, 18vw, 270px); }
.m-md { width: clamp(120px, 14vw, 200px); }
.m-sm { width: clamp(72px, 7vw, 110px); }
svg.rule { width: 240px; height: 40px; margin: 0 auto; }
svg.wreath { width: min(100%, 520px); height: auto; margin: 0 auto; }
.divider { padding: 56px 0 24px; display: flex; justify-content: center; }

/* reveal: calm fade-up on prose and figures only, never on a buy action */
.js .rv { opacity: 0; transform: translateY(10px); transition: opacity 600ms ease-out, transform 600ms ease-out; }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js svg.marg .ln, .js svg.wreath .ln, .js svg.rule .ln { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; transition: none !important; }
  .js svg.marg .fl, .js svg.wreath .fl, .js svg.rule .fl { opacity: 1 !important; transition: none !important; }
}

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(248, 243, 234, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand-t { font-size: 17px; font-weight: 500; line-height: 1.1; }
.brand-t small { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
.nav { display: flex; gap: clamp(14px, 1.8vw, 28px); }
.nav a { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; font-weight: 500; padding: 8px 0; }
.nav a:hover { text-decoration: underline; }
.basket-btn, .menu-btn { font: 500 13px/1 var(--serif); letter-spacing: 0.1em; text-transform: uppercase; background: none; border: 1px solid var(--ink); border-radius: 3px; padding: 10px 14px; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
.basket-btn:hover, .menu-btn:hover { background: var(--ink); color: var(--paper); }
.basket-btn:hover .ico path { stroke: var(--paper); }
.count { min-width: 22px; height: 22px; border-radius: 3px; background: var(--ink); color: var(--paper); display: inline-grid; place-items: center; font-size: 12px; padding: 0 5px; }
.basket-btn:hover .count { background: var(--paper); color: var(--ink); }
.basket { position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 8px); width: min(92vw, 360px); background: var(--paper); border: 1px solid var(--ink); border-radius: 3px; padding: 20px; box-shadow: 0 12px 30px rgba(28, 26, 23, 0.12); }
.basket h2 { font-size: 22px; margin-bottom: 8px; }
.basket ul { list-style: none; margin: 0 0 12px; padding: 0; }
.basket li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: 16px; }
.basket .sub { display: flex; justify-content: space-between; font-weight: 500; margin: 8px 0 14px; }
.basket .btn { width: 100%; justify-content: center; }
.basket .empty { color: var(--ink-2); font-size: 16px; }

/* sections */
section { padding: clamp(40px, 6vw, 88px) 0 0; position: relative; overflow-x: clip; }
main, footer { overflow-x: clip; }
.chapter-head { margin-bottom: clamp(20px, 3vw, 40px); }
.chapter-head p { margin-top: 16px; }
blockquote { margin: 0; font-size: clamp(21px, 1.9vw, 27px); line-height: 1.35; font-style: italic; font-variation-settings: "SOFT" 60; max-width: 30ch; }
blockquote cite { display: block; font-style: normal; font-size: 15px; color: var(--ink-2); margin-top: 12px; }

/* hero */
.hero { padding-top: clamp(12px, 1.5vw, 20px); }
.hero h1 { margin-bottom: 14px; font-size: clamp(40px, 4.3vw, 62px); }
.hero .lede { margin-bottom: 18px; }
.hero .entry-hero { padding-top: 16px; }
.hero .pcopy { margin-bottom: 12px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; }
.pick .variants, .pick .sizes { margin-bottom: 12px; }
.hero-fig { position: relative; }
.hero-fig img { width: 100%; max-height: 760px; object-fit: cover; object-position: center 40%; border-radius: 2px; }
.hero-fig figcaption { position: absolute; left: 0; bottom: -34px; }

/* product entries */
.entry { padding: 22px 0 26px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.entry.with-media { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
.entry-media img { border-radius: 2px; aspect-ratio: 1; object-fit: cover; }
.entry-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 8px; }
.entry-head .price { color: var(--ink-2); font-size: 17px; }
.pcopy { margin-bottom: 14px; }
.entry-hero { border-top: 1px solid var(--line); padding-top: 20px; }
.variants, .sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.size, .variant { position: relative; border: 1px solid var(--ink); border-radius: 4px; padding: 8px 12px; font-size: 15px; line-height: 1.2; cursor: pointer; display: inline-flex; align-items: baseline; gap: 8px; background: transparent; }
.size input, .variant input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.size em { font-style: normal; color: var(--ink-2); }
.size.on, .variant.on { background: var(--ink); color: var(--paper); }
.size.on em { color: var(--paper); }
.size.is-out { border-style: dashed; color: var(--ink-2); cursor: not-allowed; }
.size.is-out small { font-size: 12px; }
.size:has(input:focus-visible), .variant:has(input:focus-visible) { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn { background: var(--cobalt); color: var(--white); font: 500 16px/1 var(--serif); letter-spacing: 0.01em; padding: 15px 22px; border: 0; border-radius: 3px; display: inline-flex; align-items: center; gap: 14px; cursor: pointer; text-decoration: none; }
.btn .btn-price { opacity: 0.92; }
.btn:hover { filter: brightness(0.88); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: default; filter: none; }
.added { font-size: 15px; color: var(--ink-2); min-height: 1.4em; }
.soldout { display: inline-flex; align-items: center; gap: 12px; position: relative; margin: 4px 0 0; }
.so-txt { font-size: 17px; font-weight: 500; padding: 6px 6px; position: relative; z-index: 1; }
.loop { position: absolute; left: -10px; right: -10px; top: -3px; bottom: -3px; width: auto; height: auto; pointer-events: none; }
.so-why { font-size: 15px; color: var(--ink-2); margin: 6px 0 0; max-width: 46ch; }
.proof { font-size: 15px; color: var(--ink-2); margin: 14px 0 0; }
.ship { font-size: 15px; color: var(--ink-2); margin-top: 10px; }

/* index */
.index { columns: 2; column-gap: 56px; margin-top: 24px; }
.ix { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; text-decoration: none; break-inside: avoid; }
.ix:hover .nm { text-decoration: underline; }
.ix .dots { flex: 1; border-bottom: 1px dotted rgba(28, 26, 23, 0.5); transform: translateY(-5px); min-width: 16px; }
.ix .px { white-space: nowrap; }
.ix .out { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ix.head { font-weight: 500; padding-top: 18px; border-top: 1px solid var(--line); margin-top: 8px; }

/* bread */
.bread-list { list-style: none; padding: 0; margin: 0 0 18px; }
.bread-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.bread-list li:last-child { border-bottom: 1px solid var(--line); }
.bread-list .await { font-size: 14px; color: var(--ink-2); }
.review { font-size: 20px; line-height: 1.4; font-style: italic; font-variation-settings: "SOFT" 60; max-width: 34ch; }
.review cite { display: block; font-style: normal; font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.slot { border: 1px dashed var(--orange); background: var(--wash-orange); border-radius: 2px; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--ink-2); font-size: 15px; aspect-ratio: 4 / 5; }

/* markets */
.market { border-top: 1px solid var(--line); padding: 18px 0; }
.market h3 { margin-bottom: 6px; }
.market p { margin: 0; }

/* footer */
footer { margin-top: clamp(56px, 8vw, 120px); border-top: 1px solid var(--ink); padding: 40px 0 56px; }
.foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.foot > * { grid-column: var(--gs, 1) / var(--ge, 13); }
.foot p { margin: 0 0 8px; font-size: 16px; }
.foot .brand img { width: 56px; height: 56px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 0 0 8px; font-size: 16px; }
.foot .tag { font-family: var(--script); font-size: 30px; line-height: 1.1; margin: 18px 0 8px; }
.fine { font-size: 14px; color: var(--ink-2); margin-top: 24px; }

/* product page */
.pp { padding-top: clamp(20px, 3vw, 40px); }
.pp .back { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; font-weight: 500; display: inline-block; margin-bottom: 20px; }
.pp .back:hover { text-decoration: underline; }
.pp h1 { font-size: clamp(36px, 4.2vw, 64px); }
.pp .buy { margin-top: 24px; }
.pp .pcopy { font-size: 19px; }
.pp-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.also { margin-top: 64px; }
.also .index { margin-top: 12px; }

/* responsive */
@media (max-width: 1100px) {
  .index { column-gap: 40px; }
}
@media (max-width: 900px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--nav-h); background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; padding: 12px var(--gutter) 20px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px dotted var(--line); font-size: 15px; }
  .menu-btn { display: inline-flex; }
  .brand-t { display: none; }
  .top-in { gap: 12px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .g > *, .foot > * { grid-column: 1 / -1 !important; }
  .up { margin-top: 0; }
  .hang-r, .hang-l { margin: 0; }
  .m-xl, .m-lg, .m-md { width: clamp(110px, 32vw, 170px); float: left; margin: 0 18px 6px 0; shape-outside: margin-box; }
  .m-sm { width: 80px; }
  .m-hero { width: 96px; }
  .marg-abs { position: static; }
  .chapter-head::after { content: ""; display: block; clear: both; }
  .index { columns: 1; }
  .entry { clear: both; }
  .entry.with-media { grid-template-columns: 96px minmax(0, 1fr); }
  .menu-btn, .basket-btn { min-height: 44px; }
  .nav a { padding: 13px 0; }
  .ix { padding: 10px 0; }
  .pp .back { padding: 12px 0; }
  .foot a { display: inline-block; padding: 10px 0; }
  .hero h1 { font-size: 37px; }
  .hero .entry-hero .entry-body { display: flex; flex-direction: column; }
  .hero .entry-hero .entry-head { order: 1; }
  .hero .entry-hero .buy { order: 2; }
  .hero .entry-hero .pcopy { order: 3; margin: 14px 0 0; }
  .hero .entry-hero .proof { order: 4; }
  .hero-fig figcaption { position: static; margin-top: 10px; }
  .hero-fig img { max-height: 70vh; }
  .tilt, .tilt-r { transform: none; }
  .pp-gallery { grid-template-columns: 1fr; }
  .basket { right: var(--gutter); left: var(--gutter); width: auto; }
  .basket-btn span.lbl { display: none; }
  .inset { width: min(100%, 220px); }
}
