/* Nowrangroy Agro - site styles. Mobile first; breakpoints at 600, 900 and 1040px. */

/* ---------- Tokens ---------- */
:root {
  --paper: #fbf8f2;
  --surface: #ffffff;
  --ink: #18212b;
  --muted: #56606b;
  --line: #e7e0d4;
  --navy: #12304f;
  --navy-deep: #0c2238;
  --red: #c4161c;
  --red-dark: #a31015;
  --wheat: #d9b45b;
  --wheat-soft: #f4ead2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(24, 33, 43, 0.06), 0 10px 28px rgba(24, 33, 43, 0.08);
  --wrap: 1180px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  /* Per-page theme values; the theme classes further down override these. */
  --accent: var(--red);
  --mark: var(--navy);
  --accent-soft: var(--wheat-soft);
  --band: var(--navy);
  --band-deep: var(--navy-deep);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.25rem + 3.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.35rem); }
h3, .h3 { font-size: 1.22rem; line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--wheat); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(3.25rem, 7vw, 6rem); }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.lede { font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.2rem); color: var(--muted); max-width: 38rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--navy); color: #fff; padding: 0.7rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.65rem 1.25rem;
  font: 600 0.95rem/1.2 var(--font-body);
  text-decoration: none; text-align: center;
  border: 1.5px solid transparent; border-radius: 999px;
  cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--wheat-soft); }
.btn--lg { min-height: 52px; padding-inline: 1.6rem; font-size: 1rem; }
.link-arrow { font-weight: 600; color: var(--mark); text-decoration: none; }
.link-arrow::after { content: " \2192"; transition: margin 0.15s; }
.link-arrow:hover::after { margin-left: 0.25rem; }

/* ---------- Top bar & header ---------- */
.topbar { display: none; background: var(--navy-deep); color: #d7e0ea; font-size: 0.82rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.5rem; }
.topbar p { margin: 0; }
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; flex: none; margin-right: auto; }
.brand img { height: 44px; width: auto; }
.nav, .header-cta { display: none; }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 44px; padding: 0 0.9rem;
  font: 600 0.92rem var(--font-body); color: var(--navy);
  background: transparent; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
}
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 0.2s, background-color 0.2s;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.drawer {
  position: absolute; left: 0; right: 0; top: 100%;
  height: calc(100dvh - 64px); overflow-y: auto;
  background: var(--paper); border-top: 1px solid var(--line);
}
.drawer__inner { padding-block: 1rem 2rem; }
.drawer__list > li { border-bottom: 1px solid var(--line); }
.drawer__list a { display: block; padding: 0.95rem 0; font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.drawer__list a.is-active { color: var(--accent); }
.drawer__sub { padding: 0 0 0.75rem 1rem; }
.drawer__sub a { padding: 0.55rem 0; font-size: 1rem; font-weight: 500; color: var(--muted); }
.drawer__foot { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
body.menu-open { overflow: hidden; }
@media (min-width: 600px) { .header-cta { display: inline-flex; } }

@media (min-width: 1180px) {
  .topbar { display: block; }
  .site-header__inner { min-height: 76px; gap: 1.5rem; }
  .brand img { height: 52px; }
  .menu-toggle, .drawer { display: none !important; }
  .nav { display: block; }
  .nav__list { display: flex; align-items: center; gap: 0.15rem; }
  .nav__list > li { position: relative; display: flex; align-items: center; }
  .nav__list a {
    display: block; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm);
    font-size: 0.94rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  }
  .nav__list a:hover { background: var(--wheat-soft); }
  .nav__list > li > a.is-active { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
  .nav__caret {
    display: grid; place-items: center; width: 24px; height: 32px; margin-left: -0.55rem;
    background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 6px;
  }
  .menu {
    position: absolute; top: calc(100% + 6px); left: -0.5rem; min-width: 220px;
    padding: 0.4rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  }
  .menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
  .has-menu:hover .menu, .has-menu:focus-within .menu, .has-menu.is-open .menu {
    opacity: 1; visibility: visible; transform: none;
  }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto auto; width: min(60vw, 560px); height: 420px;
  background-image: radial-gradient(circle, rgba(18, 48, 79, 0.16) 1.5px, transparent 1.6px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; gap: 2.25rem; align-items: center; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero__media { position: relative; margin: 0; }
.hero__media img {
  width: 100%; aspect-ratio: 16 / 11; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow); background: var(--wheat-soft);
}
.hero__badge {
  position: absolute; left: 0.75rem; bottom: 0.75rem; max-width: calc(100% - 1.5rem);
  padding: 0.7rem 0.95rem; background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  font-size: 0.86rem; line-height: 1.4;
}
.hero__badge strong { display: block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.08fr 0.92fr; gap: clamp(2.5rem, 5vw, 4.5rem); }
  .hero__media img { aspect-ratio: 4 / 3.4; }
  .hero__badge { left: -1.5rem; bottom: 1.75rem; }
}

/* ---------- Stats band ---------- */
.stats { background: var(--band); color: #fff; }
.stats__grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat { padding: 1.4rem 0.25rem 1.3rem 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.stat:nth-child(-n + 2) { border-top: 0; }
.stat:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.stat__num { font-family: var(--font-display); font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); font-weight: 600; line-height: 1; }
.stat__unit { font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; color: var(--wheat); margin-left: 0.3rem; }
.stat__label { margin: 0.45rem 0 0; font-size: 0.9rem; color: #c8d4e1; line-height: 1.4; }
@media (min-width: 900px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 2rem 1.5rem; border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.14); }
  .stat:nth-child(even) { padding-left: 1.5rem; }
  .stat:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- Product cards ---------- */
.product-grid { display: grid; gap: 1rem; }
.product-card {
  position: relative; display: grid; grid-template-columns: 112px 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  border-top: 4px solid var(--card, var(--line));
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.product-card--wheat { --card: #d19a22; }
.product-card--rice { --card: #3f9a5a; }
.product-card--grain { --card: #c9722e; }
.product-card--coffee { --card: #6f3d1f; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card__media { background: var(--wheat-soft); }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 0.95rem 1rem 1rem; }
.product-card h3 { margin: 0.45rem 0 0.3rem; }
.product-card h3 a { text-decoration: none; }
.product-card h3 a::after { content: ""; position: absolute; inset: 0; }
.product-card p { margin: 0; font-size: 0.93rem; color: var(--muted); line-height: 1.5; }
.product-card .link-arrow { display: none; }
.tag {
  display: inline-block; align-self: flex-start; padding: 0.18rem 0.6rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  background: #e4edf6; color: var(--navy);
}
.tag--import { background: var(--wheat-soft); color: #6b4e0a; }
.tag--both { background: #f9e3e3; color: var(--red-dark); }
@media (min-width: 600px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .product-card { display: flex; flex-direction: column; }
  .product-card__media img { aspect-ratio: 16 / 10; height: auto; }
  .product-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.35rem; }
  .product-card p { flex: 1; }
  .product-card .link-arrow { display: inline-block; margin-top: 1rem; }
}
@media (min-width: 900px) { .product-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .product-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Split (image + text) ---------- */
.split { display: grid; gap: 2rem; align-items: center; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--wheat-soft); }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
  .split--reverse .split__media { order: 2; }
}
.checks { display: grid; gap: 0.9rem; margin: 1.5rem 0; }
.checks li { position: relative; padding-left: 2rem; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--mark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.5 3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.checks strong { display: block; }
.checks span { color: var(--muted); font-size: 0.95rem; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 1.05rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-weight: 500; text-decoration: none; transition: border-color 0.15s, background-color 0.15s;
}
.chips a:hover { border-color: var(--navy); background: #fff; }

/* ---------- Certifications ---------- */
.certs__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.certs__item {
  flex: 0 0 calc((100% - 2.25rem) / 4);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 0.85rem 0.4rem; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  font-size: 0.74rem; font-weight: 600; text-align: center; line-height: 1.25;
}
.certs__item img { width: 100%; max-width: 112px; height: 56px; object-fit: contain; }
.certs__mark {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft); color: var(--navy);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
}
@media (min-width: 760px) {
  .certs__list { gap: 1rem; }
  .certs__item { flex-basis: calc((100% - 6rem) / 7); padding: 1.1rem 0.5rem; font-size: 0.8rem; }
  .certs__item img { height: 72px; }
  .certs__mark { width: 72px; height: 72px; }
  .certs__mark { font-size: 0.86rem; }
}

/* ---------- Trade panels ---------- */
.trade { display: grid; gap: 1.25rem; }
.panel { padding: clamp(1.4rem, 3vw, 2.25rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel--navy { background: var(--band); border-color: var(--band); color: #fff; }
.panel--navy p { color: #d2dce7; }
.panel--navy .link-arrow { color: #fff; }
.panel h3 { font-size: 1.45rem; }
.panel p:last-child { margin-bottom: 0; }
.panel__list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.1rem; }
.panel__list li { padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.86rem; font-weight: 500; background: rgba(255, 255, 255, 0.12); }
.panel:not(.panel--navy) .panel__list li { background: var(--accent-soft); }
@media (min-width: 760px) { .trade { grid-template-columns: 1fr 1fr; } }

/* ---------- FAQ ---------- */
.faq__list { max-width: 52rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0; font-size: 1.05rem; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 1.2rem; max-width: 46rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--band-deep); color: #fff; }
.cta-band__inner { display: grid; gap: 1.5rem; align-items: center; padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.cta-band h2 { margin-bottom: 0.4rem; }
.cta-band p { margin: 0; color: #c8d4e1; max-width: 36rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta-band .btn--ghost { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.cta-band .btn--ghost:hover { background: #fff; color: var(--navy); }
@media (min-width: 900px) { .cta-band__inner { grid-template-columns: 1fr auto; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c8d4e1; font-size: 0.93rem; padding-bottom: 5rem; }
.footer__grid { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
.footer__name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: #fff; line-height: 1.2; margin-bottom: 0.6rem; }
.footer__name span { display: block; font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--wheat); margin-top: 0.25rem; }
.footer__col h2 { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: #fff; margin-bottom: 0.9rem; }
.footer__col li { margin-bottom: 0.15rem; }
.footer__col li a { display: inline-block; padding: 0.3rem 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer strong { color: #fff; font-weight: 600; }
.footer__social:empty { display: none; }
.footer__social a, .social-link { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.footer__social a { color: #fff; }
.social-link svg, .footer__social svg { flex: none; }
.footer__bottom { padding-block: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.85rem; }
.footer__bottom p { margin: 0; }
@media (min-width: 600px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer { padding-bottom: 0; }
}
@media (min-width: 1040px) { .footer__grid { grid-template-columns: 1.3fr 0.7fr 0.7fr 1.3fr; gap: 3rem; } }

/* ---------- Mobile action bar ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.6rem;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line);
}
body.menu-open .actionbar { display: none; }
@media (min-width: 600px) { .actionbar { display: none; } }

/* ---------- Inner pages ---------- */
.page-hero { padding-block: clamp(2rem, 5vw, 3.75rem) clamp(1.75rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero .lede { margin-bottom: 0; max-width: 44rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; font-size: 0.86rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: #b6ad9c; }

.prose { max-width: 44rem; }
.prose p, .prose li { font-size: 1.04rem; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }

.subnav { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 1.05rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-weight: 500; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
}
.subnav a:hover { border-color: var(--navy); }
.subnav a[aria-current="page"] { background: var(--mark); border-color: var(--mark); color: #fff; }

.flour-grid { display: grid; gap: 1.25rem; }
.flour-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.flour-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--wheat-soft); }
.flour-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.3rem 1.4rem; }
.flour-card p { color: var(--muted); font-size: 0.97rem; flex: 1; }
.flour-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.packs { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); }
.packs b { padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
@media (min-width: 700px) { .flour-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .flour-grid { grid-template-columns: repeat(3, 1fr); } }

.detail { display: grid; gap: 2rem; align-items: start; }
.detail__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--wheat-soft); }
@media (min-width: 900px) { .detail { grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 5vw, 4rem); } }

.facts { margin: 1.5rem 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: minmax(7.5rem, 0.8fr) 1.6fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding-top: 0.15rem; }
.facts dd { margin: 0; font-weight: 500; }
.facts--card { padding: 0.5rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts--card div:last-child { border-bottom: 0; }

.focus-grid { display: grid; gap: 1rem; }
.focus-card { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.focus-card b { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--accent); margin-bottom: 0.9rem; }
.focus-card h3 { margin-bottom: 0.35rem; }
.focus-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
@media (min-width: 760px) { .focus-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
@media (min-width: 600px) { .focus-grid--4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .focus-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--accent-soft); }
.gallery figcaption { padding: 0.6rem 0.8rem 0.7rem; font-size: 0.86rem; font-weight: 500; line-height: 1.35; }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

.grades { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.75rem; }
.grades li {
  display: grid; place-items: center; min-width: 3.4rem; height: 3.4rem; padding: 0 0.7rem; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
}

/* ---------- Team ---------- */
.team { display: grid; gap: 1.25rem; }
.team-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.team-card__avatar {
  width: 148px; height: 148px; margin-bottom: 1.1rem; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); background: var(--accent-soft);
}
.team-card h3 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.team-card p { color: var(--muted); max-width: 34rem; }
.team-card .team-card__role {
  margin-bottom: 1rem; color: var(--accent);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
}
.team-card .team-card__link { margin: auto 0 0; padding-top: 0.25rem; }
@media (min-width: 860px) { .team { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 960px) { .contact { grid-template-columns: 1.35fr 0.9fr; gap: clamp(2.5rem, 5vw, 4.5rem); } }
.form { display: grid; gap: 1rem; padding: clamp(1.25rem, 3vw, 2.25rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.form h2 { font-size: 1.6rem; margin-bottom: 0.2rem; }
.form > p { margin: 0 0 0.5rem; color: var(--muted); }
.form__grid { display: grid; gap: 1rem; }
@media (min-width: 600px) { .form__grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field label { display: block; margin-bottom: 0.35rem; font-size: 0.88rem; font-weight: 600; }
.field label span { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0.85rem;
  font: 400 1rem var(--font-body); color: var(--ink);
  background: #fff; border: 1.5px solid #cfc7b8; border-radius: var(--radius-sm);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18, 48, 79, 0.15); }
.form.was-validated :invalid { border-color: var(--red); }
.hp { position: absolute; left: -9999px; }
.form__status { margin: 0; padding: 0.85rem 1rem; border-radius: var(--radius-sm); font-size: 0.95rem; background: var(--wheat-soft); }
.form__status:empty { display: none; }
.form__status.is-error { background: #f9e3e3; color: var(--red-dark); }
.form__status.is-ok { background: #e2f1e6; color: #1d5a31; }

.office-list { display: grid; gap: 1rem; }
.office { padding: 1.4rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.office h3 { margin-bottom: 0.5rem; }
.office p { margin: 0 0 0.6rem; color: var(--muted); }
.office p:last-child { margin: 0; }
.office a { font-weight: 600; color: var(--mark); }

.notfound { text-align: center; padding-block: clamp(4rem, 12vw, 8rem); }
.notfound p { color: var(--muted); margin-inline: auto; }

/* ---------- Page themes ----------
   Each tab has its own colours and an illustrated scene along the bottom of its
   banner (drawn in src/scenes.mjs). Buttons, header and footer keep the brand
   colours so the site still reads as one company. */
.theme-heritage { --accent: #8f3d22; --accent-soft: #f8e2d6; --band: #74321c; --band-deep: #532313; --sky-1: #fffaf5; --sky-2: #f9dcc6; }
.theme-mill     { --accent: #35556f; --accent-soft: #e1eaf2; --band: #2c4a63; --band-deep: #1d3447; --sky-1: #f8fbfe; --sky-2: #d6e3ef; }
.theme-harvest  { --accent: #586610; --accent-soft: #eef1cf; --band: #4d5a10; --band-deep: #38420b; --sky-1: #fdfdf3; --sky-2: #edf1cc; }
.theme-wheat    { --accent: #875800; --accent-soft: #fbefc9; --band: #6b4a0b; --band-deep: #4a3206; --sky-1: #fffbf0; --sky-2: #fde7ad; }
.theme-rice     { --accent: #1d6b3f; --accent-soft: #dff3e6; --band: #17603a; --band-deep: #0f4429; --sky-1: #f7fdf9; --sky-2: #d3efde; }
.theme-grain    { --accent: #96450f; --accent-soft: #fbe6d2; --band: #7a3b10; --band-deep: #55290b; --sky-1: #fffaf3; --sky-2: #fbdcb9; }
.theme-lab      { --accent: #0f6b6b; --accent-soft: #d9f1f0; --band: #0e5a5a; --band-deep: #0a4040; --sky-1: #f6fdfd; --sky-2: #d5f0ee; }
.theme-port     { --accent: #0f5c91; --accent-soft: #d9ecfa; --band: #0d4f7e; --band-deep: #093a5d; --sky-1: #f5fafe; --sky-2: #c9e4f8; }
.theme-coffee   { --accent: #6f3d1f; --accent-soft: #f3e2d2; --band: #5b3218; --band-deep: #3d2110; --sky-1: #fbfbf5; --sky-2: #e3ecd9; }
.theme-label    { --accent: #9b2242; --accent-soft: #fbe3ea; --band: #7f1b37; --band-deep: #5a1227; --sky-1: #fffafb; --sky-2: #f8dbe3; }
.theme-contact  { --accent: #4b3fa0; --accent-soft: #e6e2f8; --band: #3d3385; --band-deep: #2b245f; --sky-1: #f9f8fe; --sky-2: #ddd7f6; }
body[class*="theme-"] { --mark: var(--accent); }

.page-hero { position: relative; overflow: hidden; }
.page-hero > .wrap { position: relative; z-index: 1; }
body[class*="theme-"] .page-hero {
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 100%);
  border-bottom: 0;
  padding-bottom: calc(clamp(100px, 12.8vw, 250px) + 0.75rem);
}
.scene {
  position: absolute; left: 0; bottom: 0; display: block;
  width: 100%; height: clamp(100px, 12.8vw, 250px);
  pointer-events: none;
}
.scene .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite alternate; }
.scene .sway--slow { animation-duration: 9s; animation-direction: alternate-reverse; }
.scene .drift { animation: drift 7s ease-in-out infinite alternate; }
.scene .drift--slow { animation-duration: 11s; animation-direction: alternate-reverse; }
@keyframes sway { from { transform: skewX(-1.4deg); } to { transform: skewX(1.4deg); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-34px); } }

@media (prefers-reduced-motion: reduce) {
  .scene .sway, .scene .drift { animation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
