/* MK Grains & Commodities: sample 02, "one hero object, moved by scroll" */
:root {
  --cream: #F3E8D8;
  --black: #0d0b09;
  --sage: #5E6D55;
  --umber: #3D3A36;
  --gold: #E3A64F;
  --serif: "Caudex", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* light theme (default) */
  --bg: var(--cream);
  --ink: #12100d;
  --ink-soft: #4a453f;
  --card: rgba(243, 232, 216, .84);
  --card-line: rgba(61, 58, 54, .16);
  --accent: var(--sage);
}
html[data-theme="dark"] {
  --bg: #17140f;
  --ink: #F3E8D8;
  --ink-soft: #c9bba6;
  --card: rgba(23, 20, 15, .78);
  --card-line: rgba(243, 232, 216, .14);
  --accent: #a9b89c;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #17140f;
    --ink: #F3E8D8;
    --ink-soft: #c9bba6;
    --card: rgba(23, 20, 15, .78);
    --card-line: rgba(243, 232, 216, .14);
    --accent: #a9b89c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #20160e; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- intro ---------- */
#intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--cream);
  color: #12100d;
  overflow: hidden;
}
.intro-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #F3E8D8 0%, #f1dcbc 62%, #ebc48f 100%);
  opacity: 0;
}
.intro-inner { position: relative; text-align: center; }
.intro-sun {
  position: absolute; left: 50%; top: 50%;
  width: 120px; height: 120px; margin: -60px 0 0 -60px;
  border-radius: 50%;
  background: radial-gradient(circle, #f6c46f 0%, rgba(240, 170, 80, .55) 35%, rgba(240, 170, 80, 0) 70%);
  transform: scale(0);
}
.intro-mark {
  position: relative;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(84px, 14vw, 168px); line-height: .9;
  display: flex; justify-content: center; overflow: hidden; padding: 0 .08em .05em;
}
.intro-mark span { display: inline-block; transform: translateY(105%); }
.intro-line { width: min(320px, 60vw); height: 1px; margin: 18px auto 16px; background: #12100d; transform: scaleX(0); }
.intro-name { position: relative; font-family: var(--serif); font-size: 18px; letter-spacing: .02em; opacity: 0; }

/* ---------- scene ---------- */
#scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0;
}
.scene-fallback {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 30% at 62% 57%, rgba(255, 213, 140, .9), rgba(255, 213, 140, 0) 70%),
    linear-gradient(180deg, #9a93a8 0%, #e2b487 45%, #f6cf92 58%, #2a1e15 58.4%, #120d0a 100%);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 50; top: 18px; left: 50%; transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: flex; align-items: center; gap: 24px;
  padding: 10px 10px 10px 22px;
  background: rgba(243, 232, 216, .72);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: #12100d;
  box-shadow: 0 10px 40px -18px rgba(40, 20, 0, .45);
}
html[data-theme="dark"] .nav { background: rgba(23, 20, 15, .66); color: var(--cream); border-color: rgba(243, 232, 216, .12); }
@media (prefers-color-scheme: dark) { html[data-theme="system"] .nav { background: rgba(23, 20, 15, .66); color: var(--cream); border-color: rgba(243, 232, 216, .12); } }
.wordmark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-right: auto; white-space: nowrap; }
.wm-mk { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1; }
.wm-rest { font-family: var(--serif); font-size: 15px; letter-spacing: .01em; opacity: .85; }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a {
  text-decoration: none; font-size: 15px; padding: 9px 14px; border-radius: 999px;
  transition: background .3s var(--ease);
}
.nav nav a:hover { background: rgba(94, 109, 85, .16); }
.nav nav a.nav-cta { background: #12100d; color: var(--cream); }
html[data-theme="dark"] .nav nav a.nav-cta { background: var(--cream); color: #12100d; }
@media (prefers-color-scheme: dark) { html[data-theme="system"] .nav nav a.nav-cta { background: var(--cream); color: #12100d; } }
.theme-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: inherit; background: rgba(94, 109, 85, .14);
  transition: transform .4s var(--ease), background .3s;
}
.theme-btn:hover { transform: rotate(-25deg); background: rgba(94, 109, 85, .26); }

/* ---------- story panels ---------- */
#story { position: relative; z-index: 2; }
.panel { position: relative; height: 170vh; }
.panel-hero { height: 150vh; }
.sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center;
  padding: 110px clamp(20px, 5vw, 80px) 48px;
}
.side-right .sticky { justify-content: flex-end; }
.side-left .sticky { justify-content: flex-start; }

.card {
  width: min(470px, 100%);
  padding: 34px 36px 36px;
  background: var(--card);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--card-line);
  border-radius: 22px;
  box-shadow: 0 30px 80px -40px rgba(30, 14, 0, .6);
  color: var(--ink);
}
.wide .card { width: min(560px, 100%); }
.card h2 { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.05; margin: 10px 0 16px; }
.card > p { font-size: 17px; line-height: 1.6; color: var(--ink-soft); font-weight: 300; }
.card > p + p { margin-top: 12px; }
.card.product h2 { font-size: clamp(46px, 5.2vw, 72px); font-style: italic; }
.eyebrow {
  font-family: var(--serif); font-style: italic; font-size: 17px;
  color: var(--accent); display: flex; align-items: center; gap: 10px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-grain { background: radial-gradient(circle at 35% 35%, #f3cf86, #c98f3c); }
.dot-seed { background: radial-gradient(circle at 35% 35%, #b88a5a, #4b3020); }
.dot-oil { background: radial-gradient(circle at 35% 35%, #ffe08a, #d09118); box-shadow: 0 0 12px rgba(240, 180, 40, .7); }
.big-figure {
  margin-top: 26px !important; padding-top: 20px; border-top: 1px solid var(--card-line);
  display: flex; align-items: center; gap: 16px; font-size: 15px !important; line-height: 1.45 !important;
}
.big-figure span { font-family: var(--serif); font-size: 58px; line-height: 1; color: var(--ink); font-style: italic; }

.svc-list { list-style: none; margin: 22px 0 0; padding: 0; }
.svc-list li { padding: 15px 0 15px 22px; border-top: 1px solid var(--card-line); position: relative; }
.svc-list li::before {
  content: ""; position: absolute; left: 0; top: 23px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); opacity: .85;
}
.svc-list h3 { font-size: 23px; line-height: 1.2; }
.svc-list p { font-size: 15.5px; line-height: 1.5; color: var(--ink-soft); margin-top: 4px; font-weight: 300; }

/* ---------- hero ---------- */
.panel-hero .sticky { align-items: flex-end; padding-bottom: clamp(56px, 9vh, 110px); }
.hero-copy { max-width: 920px; color: var(--cream); }
.hero-copy .eyebrow { color: rgba(243, 232, 216, .9); }
.hero-title {
  font-size: clamp(50px, 6.6vw, 100px); line-height: .98; margin: 14px 0 22px;
}
.hero-title em { font-style: italic; color: #f4cf8f; }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .w > span { display: inline-block; }
.hero-sub { font-size: 18px; line-height: 1.6; max-width: 560px; color: rgba(243, 232, 216, .86); font-weight: 300; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font-size: 15.5px; font-weight: 500; text-decoration: none;
  transition: background .3s, color .3s, transform .5s var(--ease);
  will-change: transform;
}
.btn-solid { background: var(--cream); color: #12100d; }
.btn-solid:hover { background: #fff6e8; }
.btn-ghost { color: var(--cream); border: 1px solid rgba(243, 232, 216, .45); background: rgba(20, 12, 4, .18); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(243, 232, 216, .14); }
.scroll-cue {
  position: absolute; right: clamp(20px, 5vw, 80px); bottom: clamp(56px, 9vh, 110px);
  display: flex; align-items: center; gap: 14px;
  color: rgba(243, 232, 216, .8); font-family: var(--serif); font-style: italic; font-size: 16px;
}
.scroll-cue i { width: 1px; height: 64px; background: rgba(243, 232, 216, .25); position: relative; overflow: hidden; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--cream);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }

/* ---------- contact ---------- */
.contact {
  position: relative; z-index: 3;
  background: var(--bg); color: var(--ink);
  padding: clamp(90px, 14vh, 160px) clamp(20px, 5vw, 80px) clamp(80px, 12vh, 140px);
  border-radius: 36px 36px 0 0;
  margin-top: -36px;
  transition: background .4s, color .4s;
}
.contact-inner { max-width: 1180px; margin: 0 auto; }
.contact .eyebrow { color: var(--accent); }
.contact-title { font-size: clamp(38px, 5vw, 76px); line-height: 1.02; margin: 16px 0 56px; max-width: 18ch; text-wrap: balance; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 40px; align-items: start; border-top: 1px solid var(--card-line); padding-top: 34px; }
.contact-grid h3 { font-size: 18px; font-style: italic; color: var(--accent); margin-bottom: 8px; }
.contact-grid p { font-size: 18px; line-height: 1.6; margin-bottom: 22px; }
.contact-grid a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.contact-grid a:hover { background-size: 100% 1px; }
.contact .btn-solid { background: var(--ink); color: var(--bg); }
.contact .btn-solid:hover { background: var(--sage); color: var(--cream); }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 3; background: #0d0b09; color: var(--cream); padding: 56px clamp(20px, 5vw, 80px) 28px; }
.footer-top { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid rgba(243, 232, 216, .12); }
.footer-top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-top nav a { text-decoration: none; font-size: 15px; opacity: .78; transition: opacity .3s; }
.footer-top nav a:hover { opacity: 1; }
.wordmark-light { margin-right: 0; }
.footer-bottom {
  max-width: 1180px; margin: 0 auto; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: rgba(243, 232, 216, .62);
}
.footer-credit { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-credit img { height: 27px; width: auto; }
.footer-credit a { display: inline-flex; }

/* ---------- no WebGL ---------- */
html.no-webgl #scene { display: none; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .nav { top: 10px; padding: 7px 7px 7px 16px; gap: 10px; width: calc(100% - 20px); }
  .nav nav a:not(.nav-cta) { display: none; }
  .nav nav a { font-size: 14px; padding: 8px 14px; }
  .wm-rest { display: none; }
  .theme-btn { width: 36px; height: 36px; }
  .panel { height: 150vh; }
  .panel-hero { height: 130vh; }
  .sticky { align-items: flex-end; padding: 90px 14px 22px; }
  .side-right .sticky, .side-left .sticky { justify-content: center; }
  .card { padding: 22px 22px 24px; border-radius: 18px; }
  .card h2 { font-size: 30px; margin: 6px 0 10px; }
  .card.product h2 { font-size: 44px; }
  .card > p { font-size: 15.5px; line-height: 1.55; }
  .big-figure span { font-size: 44px; }
  .services .svc-list { margin-top: 12px; }
  .svc-list li { padding: 10px 0 10px 20px; }
  .svc-list li::before { top: 17px; }
  .svc-list h3 { font-size: 19px; }
  .svc-list p { font-size: 14px; }
  .services > p { display: none; }
  .panel-hero .sticky { padding-bottom: 40px; }
  .hero-title { font-size: 42px; }
  .hero-sub { font-size: 15.5px; }
  .hero-actions { margin-top: 22px; }
  .btn { min-height: 46px; padding: 0 20px; font-size: 14.5px; }
  .scroll-cue { display: none; }
  .contact { border-radius: 26px 26px 0 0; }
  .contact-title { margin-bottom: 36px; }
  .contact-grid { grid-template-columns: 1fr; gap: 6px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue i::after { animation: none; }
  .btn, .theme-btn { transition: none; }
}
