/* NUT-WEB-001 — Nutropia Poultry & Feed PLC
   Shared stylesheet. Mobile-first. No framework, no build step. */

/* ---------- Fonts (self-hosted, subset) ---------- */
@font-face {
  font-family: 'Noto Sans Ethiopic';
  src: url('../fonts/noto-ethiopic-subset.woff2?v=945b3f16') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+1200-137F, U+1380-139F, U+2D80-2DDF;
}
@font-face {
  font-family: 'Noto Sans Ethiopic';
  src: url('../fonts/noto-latin-subset.woff2?v=4c2fed3a') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2122, U+20AC;
}

/* ---------- Tokens ---------- */
:root {
  /* sampled from SmallLogo.png */
  --orange:        #E68A38;
  --orange-deep:   #DE6323;
  --orange-ink:    #8A4413;   /* AA text weight of the brand orange */
  --blue:          #2B6EB6;
  --blue-deep:     #1F5488;   /* AA on white, AAA at large sizes */
  --blue-darkest:  #163C61;

  --ink:           #1A1D21;
  --ink-soft:      #4A5159;
  --line:          #DFE3E8;
  --paper:         #FFFFFF;
  --paper-warm:    #FCF7F1;
  --paper-cool:    #F3F6FA;

  --maxw: 68rem;
  --radius: 10px;
  --tap: 48px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans Ethiopic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
html[lang="am"] body { line-height: 1.8; }
img { max-width: 100%; height: auto; }
a { color: var(--blue-deep); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; color: var(--blue-darkest); }
html[lang="am"] h1, html[lang="am"] h2, html[lang="am"] h3 { line-height: 1.5; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }
/* Ethiopic must never be uppercased or letter-spaced */
html[lang="am"] * { text-transform: none !important; letter-spacing: normal !important; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--blue-darkest);
  color: #fff; padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--orange-deep); outline-offset: 2px; }

/* ---------- Notice bar ---------- */
.notice {
  background: var(--orange);
  color: #1A1D21;
  font-size: .95rem;
  padding: 10px 0;
}
.notice p { margin: 0; }

/* ---------- Header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.head-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 64px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; width: 121px; height: 70px; }
.head-tools { display: flex; align-items: center; gap: 8px; }

.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 64px; padding: 0 14px;
  border: 1px solid var(--blue-deep); border-radius: 999px;
  color: var(--blue-deep); text-decoration: none; font-size: .95rem; font-weight: 600;
  background: var(--paper);
}
.lang-toggle:hover { background: var(--paper-cool); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: inherit; font-size: .95rem;
  cursor: pointer;
}
.nav-toggle svg { display: block; }

.site-nav {
  display: none; flex: 0 0 100%; order: 3;
  border-top: 1px solid var(--line); padding: 8px 0 14px; margin-bottom: 4px;
}
.site-nav[data-open="true"] { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; min-height: var(--tap); padding: 12px 4px;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line);
}
.site-nav a[aria-current="page"] { color: var(--blue-deep); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: var(--tap); padding: 12px 22px; border-radius: var(--radius);
  font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer;
  font-size: 1.02rem; font-family: inherit;
}
.btn-primary { background: var(--blue-deep); color: #fff; }
.btn-primary:hover { background: var(--blue-darkest); }
.btn-secondary { background: var(--paper-warm); color: var(--orange-ink); border-color: var(--orange-deep); }
.btn-secondary:hover { background: #F7EBDD; }
.btn-row { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding: 32px 0 36px;
}
.hero h1 { font-size: 1.95rem; margin-bottom: .45em; }
.hero .lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 40rem; }
.hero-figure { margin: 24px 0 0; }
.hero-figure svg { display: block; width: 100%; height: auto; }
.hero-figure figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Sections ---------- */
section { padding: 36px 0; }
section + section { border-top: 1px solid var(--line); }
.section-tint { background: var(--paper-cool); border-top: 1px solid var(--line); }
.section-head { max-width: 46rem; }
.section-head p { color: var(--ink-soft); }

.cards { display: grid; gap: 16px; margin-top: 20px; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 40px; height: 40px; border-radius: 8px; background: var(--paper-warm);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
  border: 1px solid #F0DCC6;
}
.card-icon svg { display: block; }

/* ---------- Stats ---------- */
.stats { display: grid; gap: 14px; margin: 20px 0 14px; }
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 5px solid var(--orange); border-radius: var(--radius); padding: 16px 18px;
}
.stat .stat-label { font-size: .95rem; color: var(--ink-soft); margin: 0 0 6px; }
.stat .stat-value { font-size: 1.28rem; font-weight: 700; color: var(--blue-darkest); margin: 0; }
.stat .stat-value .from { color: var(--ink-soft); font-weight: 400; }
.source { font-size: .85rem; color: var(--ink-soft); margin: 0; }

/* ---------- Product teaser ---------- */
.products { display: grid; gap: 14px; margin-top: 20px; }
.product {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  background: var(--paper); display: flex; flex-direction: column; gap: 6px;
}
.product h3 { margin: 0; }
.product .meta { color: var(--ink-soft); margin: 0; font-size: .97rem; }
.badge {
  align-self: flex-start; background: var(--paper-warm); color: var(--orange-ink);
  border: 1px solid #EBC9A3; border-radius: 999px; padding: 3px 12px;
  font-size: .88rem; font-weight: 700;
}

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: s; margin: 20px 0 0; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  content: counter(s); width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-deep); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.steps h3 { margin: 0 0 .2em; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue-darkest); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #DCE6F0; max-width: 42rem; }
.cta-band .btn-primary { background: var(--orange); color: #1A1D21; }
.cta-band .btn-primary:hover { background: #F0A05B; }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: #7FA6CC; }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,.08); }

/* ---------- Footer ---------- */
.site-foot {
  background: var(--paper-cool); border-top: 1px solid var(--line);
  padding: 32px 0; font-size: .97rem;
}
.foot-grid { display: grid; gap: 24px; }
.site-foot h2 { font-size: 1rem; margin-bottom: .5em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 2px; }
.site-foot li a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-bottom {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .9rem;
}
.foot-bottom p { margin: 0 0 4px; }
.placeholder { color: var(--orange-ink); font-weight: 600; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .btn-row { flex-direction: row; flex-wrap: wrap; }
  .cards, .products { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.1rem; }
  .hero h1 { font-size: 2.2rem; }
}
@media (min-width: 900px) {
  body { font-size: 18px; }
  .nav-toggle { display: none; }
  /* one row: brand | nav | language */
  .head-row { flex-wrap: nowrap; justify-content: flex-start; gap: 24px; }
  .site-nav {
    display: block; flex: 1 1 auto; order: 0;
    border-top: 0; padding: 0; margin-bottom: 0;
  }
  .head-tools { margin-left: auto; }
  .site-nav ul { display: flex; gap: 4px; align-items: center; }
  .site-nav a { border-bottom: 0; padding: 10px 12px; border-radius: 8px; font-size: .97rem; }
  .site-nav a:hover { background: var(--paper-cool); }
  .head-row { min-height: 76px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .products { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .hero { padding: 56px 0 60px; }
  .hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
  .hero-figure { margin: 0; }
  .hero h1 { font-size: 2.5rem; }
  section { padding: 56px 0; }
}

.section-close { margin-top: 14px; }

/* ---------- Inner pages ---------- */
.page-head { padding: 32px 0 8px; border-bottom: 0; }
.page-head h1 { margin-bottom: .3em; }
.page-head .lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 44rem; margin: 0; }
.page-head + section { border-top: 0; }

.prose { max-width: 46rem; }
.prose.narrow { max-width: 34rem; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose .lede { font-size: 1.1rem; color: var(--ink-soft); }

/* numbered commitments */
.rules { list-style: none; counter-reset: r; margin: 20px 0 0; padding: 0; display: grid; gap: 18px; }
.rules li {
  counter-increment: r; display: grid; grid-template-columns: 40px 1fr;
  column-gap: 14px; row-gap: 2px; align-items: start;
}
/* h3 and p are direct children of the li, so both must be pinned to column 2 —
   otherwise the paragraph falls into the 40px number column and wraps one word
   per line. The number spans both rows. */
.rules li > h3, .rules li > p { grid-column: 2; }
.rules li::before {
  grid-column: 1; grid-row: 1 / span 2;
  content: counter(r); width: 40px; height: 40px; border-radius: 50%;
  background: var(--paper-warm); border: 1px solid #EBC9A3; color: var(--orange-ink);
  font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.rules h3 { margin: 0 0 .2em; font-size: 1.05rem; }
.rules p { margin: 0; color: var(--ink-soft); }

.steps-compact { margin-top: 12px; }
.steps-compact li::before { width: 32px; height: 32px; font-size: .95rem; }
.steps-compact { grid-template-columns: 1fr !important; }
.steps-compact li { grid-template-columns: 32px 1fr; }

/* ---------- Forms ---------- */
.form-wrap { display: grid; gap: 32px; }
.form { max-width: 40rem; }
.field { margin-bottom: 20px; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; gap: 0 16px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.req { color: var(--orange-ink); }
.field input[type="text"], .field input[type="tel"], .field input[type="number"], .field textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; font-size: 1rem;
  border: 1px solid #B9C2CC; border-radius: var(--radius); background: var(--paper); color: var(--ink);
}
.field textarea { min-height: 110px; line-height: 1.6; }
.field input:focus, .field textarea:focus { border-color: var(--blue-deep); }
.hint { font-size: .9rem; color: var(--ink-soft); margin: 6px 0 0; }
.choice {
  display: flex; align-items: flex-start; gap: 10px; font-weight: 400;
  min-height: var(--tap); padding: 8px 0; margin-bottom: 0; cursor: pointer;
}
.choice input { width: 22px; height: 22px; margin: 4px 0 0; flex: 0 0 22px; accent-color: var(--blue-deep); }
.consent { background: var(--paper-warm); border: 1px solid #F0DCC6; border-radius: var(--radius); padding: 14px 16px; }
.consent .hint { margin-top: 2px; }
.form .btn { width: 100%; }
.field.invalid input, .field.invalid textarea { border-color: #A32A18; border-width: 2px; }
.field-error { color: #A32A18; font-size: .92rem; font-weight: 600; margin: 6px 0 0; }
.form-error {
  background: #FDF0EE; border: 1px solid #E2B5AC; border-left: 5px solid #A32A18;
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; color: #7A1F12;
}
.side-note {
  background: var(--paper-cool); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; align-self: start;
}
.side-note h2 { margin-top: 0; font-size: 1.15rem; }
.side-note p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 28px; }
.contact-list { list-style: none; margin: 0 0 1em; padding: 0; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.contact-label { font-weight: 600; min-width: 7.5rem; }
.map-figure { margin: 0 0 16px; }
.map-figure svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.map-figure figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: 8px; }

@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .form .btn { width: auto; min-width: 12rem; }
}
@media (min-width: 900px) {
  .page-head { padding: 48px 0 8px; }
  .form-wrap { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
}

.map-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.map-figure + .contact-list { margin-top: 16px; }

.contact-list li a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Photography ----------------------------------------------------
   Every photograph on this site is a licensed third-party image. NONE of them
   show Nutropia's own site, plant, staff or product — the mill is not built.
   They carry mood and context, never information: nothing a visitor needs to
   know exists only inside a photo, and each page that shows one says in words
   that the images are illustrative. content/photo-credits.md holds the
   photographer, licence and source for all of them, and is generated by
   tools/build_images.py so it cannot drift from what is shipped.

   Sizes are fixed in the markup via width/height so the page does not jump as
   photos arrive on a slow connection, which is the normal case here.          */
.photo {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); background: var(--paper-cool);
}
.hero-figure img.photo { border: 1px solid var(--line); }

/* A full-width photograph used to break up a long page. */
.band { margin: 24px 0 0; }
.band img { border: 1px solid var(--line); }
.band figcaption,
.hero-figure figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: 8px; }

/* Card images bleed to the card edge; .product owns the clipping so the image
   needs no radius of its own and cannot peek past the rounded corner. */
.product { overflow: hidden; padding: 0; }
.product > :not(.product-media) { margin-left: 20px; margin-right: 20px; }
.product > .badge { margin-top: 16px; }
.product > :last-child { margin-bottom: 18px; }
.product-media { margin: 0; }
.product-media img { display: block; width: 100%; height: auto; }

/* One line, repeated on every page that carries a photograph. It is small but
   it is not fine print: it is the difference between decoration and a claim. */
.photo-note { font-size: .85rem; color: var(--ink-soft); margin: 14px 0 0; }

@media (min-width: 1000px) {
  /* Four products need four columns or a 2x2 block; three columns leaves an
     orphan. Below this width they sit two-up, which the 640px rule handles. */
  .products { grid-template-columns: repeat(4, 1fr); }
}

/* Credit table. Four columns will not fit 360px, so it scrolls sideways inside
   its own box rather than forcing the whole page to scroll — the failure the
   360px check exists to catch. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
.credits { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .95rem; }
.credits th, .credits td {
  text-align: start; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.credits th { font-weight: 700; color: var(--ink-soft); }
.credits a { min-height: 44px; display: inline-flex; align-items: center; }

/* The footer's legal line is a row of links, not prose, so WCAG's inline-link
   exemption does not really apply to it and a 19px tap target is fiddly on the
   phones this site is actually read on. Give them the full 44px. */
.foot-bottom p a { display: inline-flex; align-items: center; min-height: 44px; }
