/* Northfield Potato Co. — tokens
   Palette is warm near-black (soil) with an ochre accent (skin/flesh).
   Accent is reserved for availability marks, focus and link hover. */

:root {
  --bg: #0b0a09;
  --bg-2: #121110;
  --line: #252220;
  --line-2: #35312c;
  --text: #ede9e2;
  --muted: #a8a198;
  --fine: #8a847b;
  --accent: #d9a441;
  --max: 1180px;
  --pad: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.14vw, 1.0625rem);
  line-height: 1.62;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-2);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
a:hover { text-decoration-color: var(--accent); }
.btn, .mark, .nav a, .skip { text-decoration: none; }

::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 6px;
  font-size: 0.875rem;
  transition: top 0.2s ease;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 10, 9, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
@supports (backdrop-filter: blur(10px)) {
  .site-header { backdrop-filter: blur(12px) saturate(120%); }
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1rem;
}
.mark-glyph { color: var(--accent); flex: none; }
.mark em {
  font-style: normal;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--fine);
  margin-left: 5px;
  letter-spacing: 0;
}

.nav {
  display: none;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 0.9375rem;
  color: var(--muted);
}
.nav a:hover { color: var(--text); }

@media (min-width: 760px) {
  .nav { display: flex; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 9px 16px; font-size: 0.875rem; }

.tel {
  display: inline-flex;
  align-items: center;
  padding: 13px 20px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.tel:hover { border-color: var(--accent); }

@media (max-width: 420px) {
  .mark em { display: none; }
  .btn--sm { padding: 8px 13px; font-size: 0.8125rem; }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(64px, 11vw, 148px) clamp(52px, 8vw, 104px);
}

.display {
  font-size: clamp(2.35rem, 1.3rem + 5.3vw, 5.2rem);
  line-height: 0.97;
  letter-spacing: -0.045em;
  font-weight: 600;
  font-stretch: 107%;
  max-width: 900px;
  text-wrap: balance;
}

.lede {
  margin-top: clamp(20px, 3vw, 32px);
  max-width: 54ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 44px);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(44px, 8vw, 88px);
  border-top: 1px solid var(--line);
}
.facts > div { padding-top: 18px; }
.facts dt { font-size: 0.8125rem; color: var(--fine); }
.facts dd { margin-top: 6px; font-size: 1.125rem; letter-spacing: -0.01em; }

@media (max-width: 700px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
}

.hero > * {
  animation: rise 0.9s var(--ease) both;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(60px, 9vw, 116px);
  border-top: 1px solid var(--line);
}

.head {
  display: grid;
  gap: 18px 56px;
  margin-bottom: clamp(32px, 5vw, 60px);
}
.head h2 {
  font-size: clamp(1.75rem, 1.15rem + 2.2vw, 2.9rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  font-stretch: 105%;
  max-width: 24ch;
  text-wrap: balance;
}
.head p {
  color: var(--muted);
  max-width: 48ch;
  text-wrap: pretty;
}
.head p + p { margin-top: 14px; }

@media (min-width: 860px) {
  .head {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
  }
  .head h2 { max-width: 20ch; }
  .head p { align-self: end; padding-bottom: 4px; }
}

.head--stack { display: block; margin-bottom: 0; }
.head--stack h2 { max-width: 26ch; }
.head--stack p { margin-top: 22px; max-width: 56ch; }

.fine {
  color: var(--fine);
  font-size: 0.875rem;
  line-height: 1.6;
}
.section > .wrap > .fine { margin-top: 22px; max-width: 62ch; }

/* ---------- Tables ---------- */

.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.specs {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  text-align: left;
}
.specs th {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--fine);
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.specs td {
  padding: 17px 16px 17px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.specs td:first-child { color: var(--text); }
.specs tbody th {
  padding: 17px 16px 17px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
}
.specs tbody tr { transition: background-color 0.2s ease; }
.specs tbody tr:hover { background: rgba(255, 255, 255, 0.022); }

/* ---------- Harvest calendar ---------- */

.cal {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}
.cal caption { text-align: left; }
.cal th,
.cal td {
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.cal thead th {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
  font-size: 0.75rem;
  color: var(--fine);
  text-align: left;
  letter-spacing: 0.01em;
}
.cal thead td { border-bottom: 1px solid var(--line-2); }
.cal thead th:first-child { border-bottom: 1px solid var(--line-2); }
.cal col:first-child { width: 132px; }
.cal th[scope="row"] {
  width: 132px;
  font-size: 0.9375rem;
  color: var(--text);
  white-space: nowrap;
}
.cal td { padding-inline: 2px; }

.cal td.on::before {
  content: "";
  display: block;
  height: 8px;
  width: calc(100% - 4px);
  margin-inline: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.82;
  transform-origin: left center;
  transform: scaleX(1);
}

.key {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.82;
  vertical-align: -1px;
}
.key--off {
  margin-left: 18px;
  background: transparent;
  border: 1px solid var(--line-2);
  opacity: 1;
}

/* ---------- Delivery terms ---------- */

.terms {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.terms > div {
  background: var(--bg);
  padding: clamp(20px, 3vw, 28px);
}
.terms dt {
  font-size: 0.8125rem;
  color: var(--fine);
  margin-bottom: 6px;
}
.terms dd {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

@media (min-width: 700px) {
  .terms { grid-template-columns: 1fr 1fr; }
}

/* ---------- Who we supply ---------- */

.supply { display: grid; gap: clamp(32px, 5vw, 56px); }
.head--stack a { text-decoration-color: var(--line-2); }

.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(24px, 3.5vw, 36px);
}
.panel h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.checks { display: grid; gap: 13px; }
.checks li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 1px;
  background: var(--accent);
  opacity: 0.8;
}
.panel .fine {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 40ch;
}

@media (min-width: 940px) {
  .supply {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: start;
    column-gap: clamp(48px, 7vw, 96px);
  }
}

/* ---------- Quote form ---------- */

.form {
  display: grid;
  gap: 18px 20px;
  max-width: 820px;
}
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.8125rem;
  color: var(--muted);
}
.opt { color: var(--fine); }

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
input:hover,
select:hover,
textarea:hover { border-color: #453f38; }
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #161412;
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.14);
}
textarea { resize: vertical; min-height: 108px; }
::placeholder { color: var(--fine); opacity: 1; }
option { background: var(--bg-2); color: var(--text); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238a847b' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  margin-top: 4px;
}

@media (min-width: 700px) {
  .form { grid-template-columns: 1fr 1fr; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: clamp(44px, 6vw, 72px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 34px 24px;
  padding-bottom: clamp(36px, 5vw, 56px);
}
.footer-mark {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.footer-grid .fine { margin-bottom: 8px; }
.footer-grid p:not(.fine) { font-size: 0.9375rem; color: var(--muted); line-height: 1.7; }
.footer-grid a:hover { color: var(--text); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.footer-base .fine { color: var(--fine); }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Scroll reveals ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js [data-reveal] .cal td.on::before {
  transform: scaleX(0);
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms + 120ms);
}
.js [data-reveal].is-visible .cal td.on::before {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > * { animation: none; }
  .js [data-reveal],
  .js [data-reveal] .cal td.on::before {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js [data-reveal] { transform: none; }
}
