/* UpMatter landing — palette
   SW 9179 Anchors Aweigh #2B3441 · SW 6229 Tempe Star #47626A
   SW 9138 Stardew #A6B2B5      · SW 6148 Wool Skein #D9CFBA */

:root {
  --navy: #2B3441;
  --navy-deep: #1F262F;
  --slate: #47626A;
  --mist: #A6B2B5;
  --wool: #D9CFBA;
  --paper: #F2EEE6;
  --paper-2: #E8E2D6;
  --ink: #232B35;
  --ink-soft: #55616B;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.65, 0, .25, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(46px, 7.4vw, 104px); line-height: 1.02; letter-spacing: -.025em; }
h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.06; letter-spacing: -.02em; }
h3 { font-size: 21px; line-height: 1.25; }

.dark  { color: #fff; background: var(--navy); }
.light { color: var(--ink); background: var(--paper); }

/* ---------- Buttons (square, Lio-like) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px;
  font: 400 15px/1 var(--sans);
  text-decoration: none; border: 1px solid transparent; border-radius: 0;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-light { background: var(--paper); color: var(--navy); }
.btn-light:hover { background: var(--wool); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost:hover { border-color: #fff; }
.btn-block { width: 100%; height: 48px; }

/* ---------- Announcement + Nav ---------- */
.announce {
  background: var(--paper-2); color: var(--ink);
  font-size: 13px; text-align: center; padding: 9px var(--gutter);
}
.announce a { color: var(--ink-soft); margin-left: 8px; text-decoration: none; }
.announce a:hover { color: var(--ink); }

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 var(--gutter);
  color: #fff;
  background: rgba(43, 52, 65, 0);
  transition: background .3s, backdrop-filter .3s;
}
.nav.scrolled { background: rgba(31, 38, 47, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font: 400 21px/1 var(--serif); text-decoration: none; letter-spacing: -.01em;
}
.brand svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 400; }
.nav-links a:not(.btn) { text-decoration: none; opacity: .88; }
.nav-links a:not(.btn):hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 36px);
  margin-top: -68px; padding-top: 68px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(70% 60% at 90% 0%, rgba(71,98,106,.55), transparent 70%),
    var(--navy);
}
.hero-inner { position: relative; padding-top: clamp(56px, 12vh, 140px); padding-bottom: 48px; }
.hero h1 { max-width: 14ch; }
.hero-options {
  display: flex; flex-wrap: wrap; gap: 10px clamp(20px, 3vw, 44px);
  margin: clamp(22px, 3vw, 34px) 0 0;
  font: 300 clamp(24px, 2.8vw, 38px)/1.2 var(--serif);
}
.opt { position: relative; }
.opt-pay { color: var(--mist); }
.opt-earn { color: var(--wool); }
.opt-earn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--wool); transform: scaleX(0); transform-origin: left;
  animation: draw 1s var(--ease) 1.4s forwards;
}
@keyframes draw { to { transform: scaleX(1); } }
.hero-lede {
  max-width: 34ch; margin: clamp(26px, 3vw, 40px) 0 0;
  font-size: clamp(16px, 1.3vw, 18px); color: rgba(255,255,255,.78);
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.hero-paths {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  padding-bottom: 28px;
}
.path {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start;
  padding: 22px 24px 4px 0; margin-right: 24px;
  border-top: 1px solid rgba(255,255,255,.2);
  text-decoration: none; font-size: 14px; color: rgba(255,255,255,.7);
  transition: border-color .25s, color .25s;
}
.path strong { font-weight: 400; color: #fff; font-size: 15px; }
.path-num { font: 300 13px/1.6 var(--sans); color: var(--wool); }
.path-arrow { transition: transform .25s; }
.path:hover { border-color: var(--wool); color: #fff; }
.path:hover .path-arrow { transform: translateX(4px); }

.reveal { opacity: 0; transform: translateY(14px); animation: rise .9s var(--ease) forwards; }
.hero-inner .reveal:nth-child(2) { animation-delay: .25s; }
.hero-inner .reveal:nth-child(3) { animation-delay: .5s; }
.hero-inner .reveal:nth-child(4) { animation-delay: .65s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Section commons ---------- */
section:not(.hero) { position: relative; overflow: hidden; padding: clamp(80px, 11vw, 140px) 0; }
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 22px; font-size: 13px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase;
}
.eyebrow span {
  display: inline-grid; place-items: center; width: 30px; height: 22px;
  border: 1px solid currentColor; font-size: 12px; letter-spacing: 0;
}
.light .eyebrow { color: var(--slate); }
.dark .eyebrow { color: var(--wool); }
.section-lede { max-width: 54ch; margin: 22px 0 0; font-size: clamp(16px, 1.3vw, 18px); }
.light .section-lede { color: var(--ink-soft); }
.dark .section-lede { color: rgba(255,255,255,.72); }

/* ---------- Waste to Market ---------- */
.market h2 { color: var(--navy); }
.market-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(32px, 5vw, 80px); align-items: end;
}
.market-head .section-lede { margin: 0; }
.brand-band {
  display: grid; place-items: center;
  padding: clamp(64px, 9vw, 128px) var(--gutter);
  background: radial-gradient(60% 140% at 50% 0%, rgba(71,98,106,.6), transparent 70%), var(--navy);
}
.market-logo {
  display: inline-flex; align-items: center; gap: clamp(10px, 1.2vw, 18px);
  font: 300 clamp(36px, 5.4vw, 76px)/1 var(--serif); letter-spacing: -.02em; color: var(--paper);
}
.market-logo svg {
  width: .9em; height: .9em; fill: none; stroke: var(--wool); stroke-width: 1.6; stroke-linejoin: round;
}

/* ---------- Industries ---------- */
.industries-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(32px, 5vw, 80px); align-items: end;
}
.industries h2 { color: var(--navy); }
.industries-head .section-lede { margin: 0; }
.industry-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px);
  margin-top: clamp(48px, 6vw, 72px);
}
.industry {
  position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--navy);
}
.industry img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.industry::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,26,34,0) 35%, rgba(20,26,34,.55) 62%, rgba(20,26,34,.92) 100%);
}
.industry:hover img { transform: scale(1.04); }
.industry-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: clamp(16px, 1.8vw, 24px);
  color: #fff;
}
.industry h3 { font-size: clamp(20px, 1.9vw, 25px); line-height: 1.15; }
.industry p { margin: 6px 0 0; max-width: 34ch; font-size: 14px; line-height: 1.45; color: rgba(255,255,255,.82); }

/* ---------- Compliance ---------- */
.compliance { background: var(--paper-2); }
.compliance h2 { color: var(--navy); }
.compliance-img { margin: clamp(40px, 5vw, 64px) 0 0; background: var(--navy); }
.compliance-img img { width: 100%; height: auto; aspect-ratio: 2.4; object-fit: cover; }
.diwass-note {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(24px, 4vw, 56px);
  margin-top: clamp(32px, 4vw, 48px);
}
.diwass-col { padding-top: 18px; border-top: 1px solid rgba(43,52,65,.18); }
.diwass-col h3 { font-size: 22px; color: var(--navy); }
.diwass-col p { margin: 10px 0 0; font-size: 15px; color: var(--ink-soft); }
.diwass-link {
  display: inline-block; margin-top: clamp(28px, 3vw, 40px);
  font-size: 15px; font-weight: 400; color: var(--navy);
  text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.diwass-link:hover { color: var(--slate); }

/* ---------- Materials ---------- */
.materials { background: var(--navy-deep); }
.stage {
  position: relative;
  display: grid; grid-template-columns: minmax(240px, 380px) 210px minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 32px); align-items: end;
  margin-top: clamp(48px, 6vw, 80px);
}
.stage-label {
  margin: 0 0 14px; font-size: 13px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase;
  color: var(--wool);
}
.grid-slot {
  position: relative; z-index: 1; aspect-ratio: 1; width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(circle, rgba(166,178,181,.16) 0 1.5px, transparent 2px) 0 0 / 10% 10%, var(--navy-deep);
  overflow: hidden;
}
.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--wool), transparent);
  box-shadow: 0 0 18px 4px rgba(217,207,186,.35);
  opacity: 0; z-index: 3;
}
.stage[data-state="1"] .scan { animation: scan 1.8s var(--ease) 1; }
@keyframes scan { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* Decision engine */
.engine {
  position: relative; z-index: 1; align-self: center;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.engine-title {
  font: 300 clamp(26px, 2.4vw, 34px)/1.1 var(--serif); color: var(--wool); letter-spacing: -.01em;
}
.stage[data-state="1"] .engine-title { animation: glow 0.9s ease-in-out infinite alternate; }
@keyframes glow { to { text-shadow: 0 0 18px rgba(217,207,186,.55); } }
.engine-text { margin: 16px 0 0; max-width: 175px; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.72); }

.engine-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.engine-lines path {
  fill: none; stroke: rgba(217,207,186,.22); stroke-width: 1; stroke-dasharray: 3 6;
}
.engine-lines path.out { opacity: .5; transition: opacity .6s, stroke .6s; }
.stage[data-state="1"] .engine-lines path.in,
.stage[data-state="2"] .engine-lines path { stroke: rgba(217,207,186,.6); animation: flow 1.2s linear infinite; }
.stage[data-state="2"] .engine-lines path.out { opacity: 1; }
.engine-lines circle { fill: var(--wool); opacity: .5; }
@keyframes flow { to { stroke-dashoffset: -18; } }

/* Applications */
.stage-right { position: relative; z-index: 1; display: flex; flex-direction: column; align-self: stretch; }
.group {
  flex: 1;
  display: grid; grid-template-columns: 32% 1fr; align-items: stretch;
  border: 1px solid rgba(255,255,255,.12); background: var(--navy-deep);
  opacity: .4; transition: opacity .6s;
}
.group + .group { margin-top: 12px; }
.stage[data-state="2"] .group { opacity: 1; }
.stage[data-state="2"] .group:nth-child(3) { transition-delay: .2s; }
.stage[data-state="2"] .group:nth-child(4) { transition-delay: .4s; }
.cluster-slot { margin: 12px; }
.app { position: relative; margin: 0; overflow: hidden; min-height: 100%; }
.app img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,26,34,.92) 0%, rgba(20,26,34,.7) 45%, rgba(20,26,34,.15) 100%);
}
.app figcaption {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 12px clamp(14px, 1.6vw, 20px); max-width: 300px;
}
.app strong { font: 300 clamp(19px, 1.7vw, 23px)/1.15 var(--serif); color: #fff; }
.app span { font-size: 13px; line-height: 1.4; color: rgba(255,255,255,.8); }

.atoms { position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: opacity .4s; }
.atoms.faded { opacity: 0; }
.atom {
  position: absolute; left: 0; top: 0;
  width: var(--d); height: var(--d); border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255,255,255,.85) 0, rgba(255,255,255,0) 32%),
    radial-gradient(circle at 50% 55%, var(--c) 45%, var(--c2) 100%);
  box-shadow: 0 3px 6px rgba(0,0,0,.35);
  will-change: transform;
  transition: transform 1.15s var(--ease);
  transition-delay: var(--delay, 0s);
}
.atoms.instant .atom { transition: none; }

/* ---------- Demo (Lio-style form) ---------- */
.demo { background: linear-gradient(180deg, var(--slate) 0%, #3D555C 100%); }
.demo-panel {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px);
  padding: clamp(28px, 4vw, 48px);
  background: rgba(31,38,47,.22);
  border: 1px solid rgba(255,255,255,.1);
}
.demo-copy { display: flex; flex-direction: column; }
.demo-copy h2 { font-size: clamp(30px, 3vw, 40px); }
.demo-copy > p { margin: 22px 0 0; max-width: 44ch; color: rgba(255,255,255,.78); }

.demo-form {
  display: grid; gap: 18px;
  padding: clamp(18px, 2vw, 24px);
  background: rgba(31,38,47,.35);
}
.demo-form label { display: grid; gap: 8px; font-size: 12.5px; font-weight: 400; color: rgba(255,255,255,.88); }
.demo-form input[type="text"], .demo-form input[type="email"], .demo-form input[type="tel"],
.demo-form select, .demo-form textarea {
  width: 100%; height: 44px; padding: 0 12px;
  font: 300 15px var(--sans); color: #fff;
  background: rgba(255,255,255,.14); border: 0; border-radius: 0; outline: none;
  transition: background .2s, box-shadow .2s;
}
.demo-form textarea { height: auto; min-height: 96px; padding: 11px 12px; resize: vertical; }
.demo-form ::placeholder { color: rgba(255,255,255,.45); }
.demo-form input:focus, .demo-form select:focus, .demo-form textarea:focus {
  background: rgba(255,255,255,.2); box-shadow: inset 0 -1px 0 var(--wool);
}
.demo-form .invalid { box-shadow: inset 0 -1px 0 #E4A99A; }
.phone { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.demo-form select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-opacity='.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 10px;
  background-color: rgba(255,255,255,.14);
}
.demo-form select option { color: var(--ink); }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 10px !important; font-weight: 300 !important; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0;
  background: rgba(255,255,255,.18); border-radius: 3px; cursor: pointer; flex: none;
  display: grid; place-items: center;
}
.check input:checked { background: var(--wool); }
.check input:checked::after { content: ""; width: 8px; height: 5px; border: solid var(--navy); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg) translate(1px, -1px); }
.form-done { margin: 0; font-size: 14px; color: var(--wool); }
.demo-alt { margin: 28px 0 0; text-align: center; font-size: 14px; color: rgba(255,255,255,.65); }
.demo-alt a { color: #fff; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: rgba(255,255,255,.6); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.footer .brand { color: #fff; font-size: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stage { grid-template-columns: minmax(220px, 320px) 170px 1fr; }
  .app span { display: none; }
}
@media (max-width: 860px) {
  .market-head { grid-template-columns: 1fr; }
  .hero-paths { grid-template-columns: 1fr; }
  .path { margin-right: 0; padding-bottom: 18px; }
  .industries-head { grid-template-columns: 1fr; }
  .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diwass-note { grid-template-columns: 1fr; }
  .demo-panel { grid-template-columns: 1fr; }
  .stage { grid-template-columns: 1fr; }
  .stage-left, .stage-right, .engine { max-width: 420px; width: 100%; margin: 0 auto; }
  .engine { padding: 12px 0 8px; }
  .engine-lines { display: none; }
  .group { height: 130px; flex: none; }
  .app span { display: block; }
}
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .nav .btn { height: 38px; padding: 0 14px; font-size: 14px; }
  .announce { font-size: 12px; }
  .hero-paths { grid-template-columns: 1fr; }
  .path { margin-right: 0; padding-bottom: 18px; }
  .stage-left, .stage-right { max-width: 340px; }
  .industry-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .opt-earn::after { animation: none; transform: scaleX(1); }
  .atom { transition: none !important; }
  .stage[data-state="1"] .scan { animation: none; }
}
