/* ============================================================
   NASTASI FOODS — Base: reset, typography, layout primitives
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select, button { font: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

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

::selection { background: var(--brass); color: var(--bone-pure); }

/* ---- Headings ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 460;
  line-height: var(--lh-snug);
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 480; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { text-wrap: pretty; }

/* ============================================================
   Layout primitives
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }

.section--dark { background: var(--green-900); color: var(--on-dark); }
.section--ink  { background: var(--ink); color: var(--on-dark); }
.section--paper { background: var(--bone-pure); }

/* ---- The sunlit band ----
   Replaces every full-bleed green-with-diagonal-hatching band on the
   site. The hatching was a repeating-linear-gradient at 115deg; over a
   dark fill it stopped reading as paper grain and started reading as
   corduroy. What stands in for it here is light instead of texture:
   a warm sun coming in high from the left, a cool label-blue settling
   in the bottom-right, over aged cream. Nothing repeats, so nothing
   stripes.

   Type keeps the normal light-mode colours — that is the point of not
   redefining the dark modifiers. */
.section--sunlit {
  position: relative;
  color: var(--text);
  background:
    radial-gradient(78% 62% at 12% 0%,  color-mix(in srgb, var(--saffron) 34%, transparent), transparent 68%),
    radial-gradient(64% 58% at 96% 104%, color-mix(in srgb, var(--adriatic) 52%, transparent), transparent 72%),
    linear-gradient(176deg, var(--bone-pure) 0%, var(--bone) 58%, var(--bone-deep) 100%);
}
/* the paper itself: a fibre speckle, not a hatch. Two offset dot grids at
   coprime spacings never line up into a visible direction. */
.section--sunlit::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(rgba(22,20,15,.055) .6px, transparent .7px),
    radial-gradient(rgba(22,20,15,.04)  .5px, transparent .6px);
  background-size: 13px 13px, 29px 29px;
  background-position: 0 0, 7px 11px;
}
.section--sunlit > * { position: relative; z-index: 1; }
.section--sunlit .eyebrow { color: var(--stamp); }

/* ---- Eyebrow + manifest type ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 1.8em; height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.section--dark .eyebrow, .section--ink .eyebrow { color: var(--brass-soft); }

.manifest {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-mono);
  color: var(--text-muted);
}

/* ---- Section heading block ---- */
.s-head { max-width: 52ch; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.5rem); }
.s-head .eyebrow { margin-bottom: var(--sp-4); }
.s-head p { color: var(--text-muted); font-size: var(--fs-lead); margin-top: var(--sp-4); }
.section--dark .s-head p, .section--ink .s-head p { color: var(--on-dark-muted); }
.s-head--center { margin-inline: auto; text-align: center; }
.s-head--center .eyebrow { justify-content: center; }

.lede { font-size: var(--fs-lead); color: var(--text-muted); max-width: var(--maxw-text); }

/* ---- Utility ---- */
.visually-hidden {
  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-link {
  position: absolute; top: -100%; left: var(--sp-4); z-index: var(--z-toast);
  background: var(--ink); color: var(--bone-pure);
  padding: 0.75rem 1.25rem; border-radius: var(--r-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--sp-4); }

.text-brass { color: var(--brass); }
.text-stamp { color: var(--stamp); }
.no-wrap { white-space: nowrap; }

/* ============================================================
   Motion: scroll-reveal base + reduced-motion guard
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  /* Never let the hero intro leave content hidden when motion is reduced */
  html.js .hero h1 .line > span { transform: none !important; }
  html.js .hero__fade { opacity: 1 !important; transform: none !important; }
}
