/* ==========================================================================
   EXcEY Foods & Beverages Limited: site styles
   1 Tokens  2 Base  3 Layout  4 Components  5 Header/Footer
   6 Sections  7 Pages  8 Forms  9 Motion  10 Responsive
   ========================================================================== */

/* 1. TOKENS ------------------------------------------------------------- */
:root {
  --green: #17382a;
  --green-deep: #0f271c;
  --green-soft: #24493a;
  --cream: #f4ecdc;
  --paper: #fbf8f2;
  --sand: #e9dec8;
  --gold: #b58b3a;
  --gold-soft: #d4b46f;
  --bronze: #8c6a2f;
  --ink: #2b1f18;
  --muted: #6a5d52;
  --error: #9b2c1f;
  --line: rgba(43, 31, 24, 0.15);
  --line-light: rgba(244, 236, 220, 0.22);

  --f-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(72px, 10vw, 132px);
  --header-h: 78px;
}

/* 2. BASE --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); }
p { margin: 0 0 1.1em; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--green); color: var(--cream); padding: 10px 16px; text-decoration: none; }
.skip-link:focus { left: 8px; }

/* 3. LAYOUT ------------------------------------------------------------- */
.container { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--cream { background: var(--cream); }
.section--dark { background: var(--green); color: var(--cream); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.6; color: var(--muted); max-width: 40em; }
.section--dark .lead { color: rgba(244, 236, 220, 0.8); }
.measure { max-width: 38em; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }

/* 4. COMPONENTS --------------------------------------------------------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 22px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze);
}
.eyebrow::before { content: ''; width: 36px; height: 1px; background: currentColor; flex: none; }
.section--dark .eyebrow, .on-dark .eyebrow { color: var(--gold-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px; border: 1px solid transparent; border-radius: 2px;
  font: 600 0.88rem/1.2 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn-primary { background: var(--green); color: var(--cream); }
.btn-primary:hover { background: var(--green-soft); }
.btn-gold { background: var(--gold); color: #1d1610; }
.btn-gold:hover { background: var(--gold-soft); }
.btn-outline { border-color: var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green); color: var(--cream); }
.btn-outline-light { border-color: var(--line-light); color: var(--cream); }
.btn-outline-light:hover { border-color: var(--cream); background: rgba(244, 236, 220, 0.08); }
.btn-sm { padding: 11px 20px; font-size: 0.78rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.link-arrow { display: inline-block; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.link-arrow::after { content: ' \2192'; }
.link-arrow:hover { color: var(--bronze); border-color: var(--bronze); }
.on-dark .link-arrow:hover, .section--dark .link-arrow:hover { color: var(--gold-soft); }

.media { display: block; position: relative; overflow: hidden; aspect-ratio: var(--ratio, 4/3); background: var(--sand); }
.media img { width: 100%; height: 100%; object-fit: cover; }

.placeholder { background: rgba(181, 139, 58, 0.16); border-bottom: 1px dashed var(--gold); padding: 0 0.3em; font-style: normal; }
.site-footer .placeholder { background: rgba(212, 180, 111, 0.14); }

/* 5. HEADER / FOOTER ---------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: block; flex: none; }
.brand-logo { height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.site-nav ul { display: flex; gap: clamp(16px, 2.2vw, 32px); list-style: none; }
.site-nav ul a { display: block; padding: 6px 0; font-size: 0.95rem; font-weight: 500; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s, color 0.2s; }
.site-nav ul a:hover { border-color: var(--gold); }
.site-nav ul a[aria-current='page'] { border-color: var(--gold); color: var(--green); }

.nav-toggle { display: none; background: none; border: 0; padding: 12px; margin-right: -12px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform 0.25s, background-color 0.25s; }
.bars { position: relative; }
.bars::before, .bars::after { content: ''; position: absolute; left: 0; }
.bars::before { top: -7px; }
.bars::after { top: 7px; }
[data-open] .bars { background: transparent; }
[data-open] .bars::before { transform: translateY(7px) rotate(45deg); }
[data-open] .bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-footer { background: var(--green-deep); color: var(--cream); padding-top: clamp(56px, 8vw, 96px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: clamp(28px, 4vw, 56px); padding-bottom: 56px; }
.footer-brand .brand-logo { height: 44px; margin-bottom: 22px; }
.footer-tagline { font-family: var(--f-display); font-style: italic; font-size: 1.5rem; line-height: 1.25; margin-bottom: 10px; }
.footer-small { font-size: 0.85rem; color: rgba(244, 236, 220, 0.6); }
.footer-h { font-family: var(--f-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 18px; }
.footer-list { list-style: none; display: grid; gap: 10px; font-size: 0.95rem; color: rgba(244, 236, 220, 0.85); }
.footer-list a { text-decoration: none; }
.footer-list a:hover { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer-social { display: grid; gap: 10px; }
.footer-bottom { border-top: 1px solid var(--line-light); padding-block: 22px; font-size: 0.85rem; color: rgba(244, 236, 220, 0.6); }
.footer-bottom p { margin: 0; }

/* 6. HOME SECTIONS ------------------------------------------------------ */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { margin-bottom: 0.4em; max-width: 11em; }
.hero .lead { margin-bottom: 0; }
.hero-visual { position: relative; isolation: isolate; }
.hero-visual::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--gold); z-index: -1; }

.pillars { background: var(--green); color: var(--cream); }
.pillars ul { list-style: none; display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-block: 22px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.pillars li + li { position: relative; }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 56px; }
.feature .media { margin-bottom: 26px; }
.feature h3 { font-size: clamp(1.9rem, 3vw, 2.4rem); margin-bottom: 0.3em; }
.formats { list-style: none; margin: 20px 0 26px; }
.formats li { padding: 12px 0; border-top: 1px solid var(--line); font-weight: 500; }
.formats li:last-child { border-bottom: 1px solid var(--line); }
.future-note { margin-top: 56px; padding: 22px 26px; border: 1px dashed var(--gold); display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.future-note p { margin: 0; max-width: 46em; color: var(--muted); }

.principles { list-style: none; }
.principles li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px 40px; padding: 30px 0; border-top: 1px solid var(--line-light); align-items: baseline; }
.principles li:last-child { border-bottom: 1px solid var(--line-light); }
.principles h3 { margin: 0; }
.principles p { margin: 0; color: rgba(244, 236, 220, 0.8); }
.sticky-head { position: sticky; top: calc(var(--header-h) + 32px); }

.promise { font-family: var(--f-display); font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.1; font-weight: 500; margin: 0 0 clamp(40px, 6vw, 72px); max-width: 16em; }
.promise-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.promise-cols > div { border-top: 1px solid var(--gold); padding-top: 20px; }
.promise-cols h3 { font-size: 1.5rem; }
.promise-cols p { margin: 0; color: var(--muted); }

.rows { list-style: none; margin-top: 40px; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px 40px; padding: 24px 0; border-top: 1px solid var(--line); align-items: baseline; }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { margin: 0; font-size: 1.6rem; }
.rows p { margin: 0; color: var(--muted); }

.cta-band { background: var(--green-deep); color: var(--cream); text-align: center; padding-block: clamp(72px, 9vw, 120px); }
.cta-band h2 { max-width: 14em; margin-inline: auto; }
.cta-band p { max-width: 34em; margin-inline: auto; color: rgba(244, 236, 220, 0.8); }
.cta-band .btn-row { justify-content: center; }

/* 7. INNER PAGES -------------------------------------------------------- */
.page-hero { background: var(--cream); padding-top: clamp(48px, 7vw, 96px); }
.page-hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); max-width: 14em; }
.page-hero .lead { margin-bottom: clamp(36px, 5vw, 64px); }
.page-hero .media { margin-bottom: calc(var(--section) * -0.35); position: relative; z-index: 1; }
.page-hero + .section { padding-top: calc(var(--section) + var(--section) * 0.35); }

.chain { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.chain li { counter-increment: step; border-top: 1px solid var(--gold); padding-top: 16px; }
.chain li::before { content: counter(step); display: block; font-family: var(--f-display); font-size: 1.6rem; color: var(--bronze); margin-bottom: 8px; }
.chain strong { display: block; font-family: var(--f-display); font-size: 1.4rem; font-weight: 500; margin-bottom: 4px; }
.chain span { color: var(--muted); font-size: 0.95rem; display: block; }

.statement-rows { list-style: none; }
.statement-rows li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 16px 48px; padding: 36px 0; border-top: 1px solid var(--line); }
.statement-rows li:last-child { border-bottom: 1px solid var(--line); }
.statement-rows h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 0; }
.statement-rows p { margin: 0; font-family: var(--f-display); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; }

.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 96px); margin: 40px 0 0; }
.values div { padding: 20px 0; border-top: 1px solid var(--line); }
.values dt { font-family: var(--f-display); font-size: 1.5rem; margin-bottom: 4px; }
.values dd { margin: 0; color: var(--muted); }

.video-frame { aspect-ratio: 16/9; background: var(--green-deep); }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }

/* products */
.section-head { max-width: 40em; margin-bottom: 48px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.product { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; }
.section--cream .product { background: var(--paper); }
.product-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze); margin-bottom: 8px; }
.product h3 { margin-bottom: 0.3em; }
.product-body p:not(.product-cat) { color: var(--muted); }
.product .link-arrow { margin-top: auto; align-self: flex-start; }
.note-small { font-size: 0.9rem; color: var(--muted); margin-top: 28px; }

.future { border: 1px dashed var(--gold); padding: clamp(28px, 4vw, 56px); background: var(--paper); }
.badge { display: inline-block; padding: 6px 12px; margin-bottom: 20px; background: var(--ink); color: var(--cream); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.future-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); margin: 32px 0 0; }
.future-grid div { padding: 18px 0; border-top: 1px solid var(--line); }
.future-grid dt { font-family: var(--f-display); font-size: 1.45rem; }
.future-grid dd { margin: 0; color: var(--muted); }

/* quality */
.row-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px clamp(32px, 6vw, 96px); padding: 44px 0; border-top: 1px solid var(--line); }
.row-split:last-of-type { border-bottom: 1px solid var(--line); }
.row-split h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); margin: 0; }
.row-split p:last-child, .row-split ul:last-child { margin-bottom: 0; }
.dash-list { list-style: none; margin: 0 0 1.1em; }
.dash-list li { position: relative; padding: 7px 0 7px 28px; }
.dash-list li::before { content: ''; position: absolute; left: 0; top: 1.05em; width: 16px; height: 1px; background: var(--gold); }
.claims-box { margin-top: 56px; padding: clamp(24px, 4vw, 44px); background: var(--cream); border-left: 3px solid var(--gold); }
.claims-box h2 { font-size: 1.8rem; }
.claims-box p:last-child { margin-bottom: 0; }

/* contact */
.contact-list { margin: 32px 0 0; }
.contact-list div { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 16px; }
.contact-list div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bronze); padding-top: 3px; }
.contact-list dd { margin: 0; }
.contact-list a { text-underline-offset: 3px; }
.contact-social { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* 8. FORMS -------------------------------------------------------------- */
.form-card { background: var(--cream); padding: clamp(24px, 4vw, 48px); }
.section--cream .form-card { background: var(--paper); border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field .req { color: var(--bronze); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid rgba(43, 31, 24, 0.3); border-radius: 2px; padding: 13px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.field [aria-invalid='true'] { border-color: var(--error); }
.field-error { min-height: 0; margin: 0; font-size: 0.85rem; color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.form-actions .btn:disabled { opacity: 0.6; cursor: wait; }
.form-hint { font-size: 0.88rem; color: var(--muted); margin: 0; }
.form-status { margin-top: 20px; padding: 0; font-size: 0.97rem; }
.form-status:not(:empty) { padding: 16px 18px; border-left: 3px solid var(--gold); background: #fff; }
.form-status[data-state='success'] { border-color: var(--green); }
.form-status[data-state='error'] { border-color: var(--error); color: var(--error); }

/* 9. MOTION ------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 10. RESPONSIVE -------------------------------------------------------- */
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 8px var(--gutter) 28px; background: var(--paper); border-bottom: 1px solid var(--line);
  }
  [data-open] .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav ul a[aria-current='page'] { border-bottom-color: var(--gold); }
  .site-nav .btn { align-self: flex-start; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .hero-grid, .split, .split--even { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { margin-right: 18px; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .principles li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .promise-cols { grid-template-columns: minmax(0, 1fr); }
  .rows li, .statement-rows li, .row-split { grid-template-columns: minmax(0, 1fr); }
  .values, .future-grid { grid-template-columns: minmax(0, 1fr); }
  .sticky-head { position: static; }
  .pillars ul { flex-direction: column; gap: 8px; }
  .page-hero .media { aspect-ratio: 16/9; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .chain { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-list div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .btn-row .btn { width: 100%; }
  .brand-logo { height: 34px; }
}
