:root {
  color-scheme: light;
  --ink: #17231d;
  --muted: #5e7065;
  --line: #d9ddcf;
  --paper: #f8f7ee;
  --panel: #ffffff;
  --cream: #fffdf5;
  --sky: #cfeaf2;
  --soil: #6e442c;
  --leaf: #2f8640;
  --leaf-bright: #67b95c;
  --gold: #c8912f;
  --flower: #c8525f;
  --focus: #245d38;
  --teal: #207e7a;
  --clay: #a34d34;
  --shadow: 0 20px 54px rgba(55, 45, 28, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, #f9fbf2 0%, var(--paper) 36%, #eef5e8 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(31, 43, 36, 0.12);
  background: rgba(248, 247, 238, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 3px solid #163d27;
  border-radius: 50% 50% 50% 8px;
  background:
    radial-gradient(circle at 65% 35%, #f3d173 0 18%, transparent 19%),
    linear-gradient(135deg, #dca33f, #8f4c2d);
  box-shadow: 0 7px 16px rgba(36, 93, 56, 0.24);
  transform: rotate(-18deg);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav-links a,
.network-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #405148;
  font-size: 14px;
  line-height: 1;
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav-links a:hover {
  border-color: rgba(36, 93, 56, 0.35);
  background: #fff;
  transform: translateY(-1px);
}

.network-pill {
  background: #fff;
  color: var(--focus);
  font-weight: 700;
}

.nav-links a[href^="https://"] {
  color: var(--focus);
  font-weight: 800;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(28px, 5vw, 72px) clamp(18px, 4vw, 56px) clamp(22px, 4vw, 46px);
  background:
    linear-gradient(180deg, rgba(255, 253, 245, 0.2) 0%, rgba(234, 244, 229, 0.84) 100%),
    linear-gradient(115deg, #fffdf5 0%, #e5f3ec 46%, #faecd0 100%);
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 28px;
  content: "";
  background: repeating-linear-gradient(
    90deg,
    rgba(47, 134, 64, 0.16) 0 18px,
    rgba(200, 145, 47, 0.12) 18px 36px
  );
  opacity: 0.55;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 680px;
}

.hero-copy h1 {
  margin: 8px 0 0;
  color: #13221b;
  max-width: 100%;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  margin: clamp(18px, 3vw, 28px) 0 0;
  color: #42574a;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(22px, 4vw, 34px);
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 12px 18px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-button:hover,
.hero-button:focus-visible {
  transform: translateY(-2px);
  outline: 2px solid rgba(36, 93, 56, 0.18);
  outline-offset: 2px;
}

.primary-link {
  background: #173f29;
  color: #fff;
  box-shadow: 0 12px 22px rgba(23, 63, 41, 0.24);
}

.secondary-link {
  border-color: rgba(23, 63, 41, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: #173f29;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 680px;
  margin-top: clamp(22px, 4vw, 42px);
}

.hero-facts span {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(36, 93, 56, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(42, 55, 36, 0.08);
}

.hero-facts strong {
  color: var(--ink);
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1;
  text-transform: none;
}

.hero-field {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(36, 93, 56, 0.16);
  border-radius: 8px;
  background: #dceff7;
  box-shadow: var(--shadow);
}

.hero-crop-svg {
  display: block;
  width: 100%;
  min-height: 420px;
}

.hero-sun {
  transform-origin: center;
  animation: sunPulse 4s ease-in-out infinite;
}

.wind-line {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: windDrift 5.6s ease-in-out infinite;
}

.wind-two {
  animation-delay: 1.2s;
}

.soil-line {
  stroke-dasharray: 960;
  stroke-dashoffset: 960;
  animation: drawSoil 3.8s ease forwards;
}

.crop {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: cropSway 4.8s ease-in-out infinite;
}

.crop-left {
  animation-delay: 0.25s;
}

.crop-right {
  animation-delay: 0.75s;
}

.crop .stem {
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: stemGrow 2.8s ease forwards;
}

.leaf {
  opacity: 0;
  animation: leafOpen 1.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.leaf-left {
  animation-delay: 0.9s;
}

.leaf-right {
  animation-delay: 1.15s;
}

.leaf-top {
  animation-delay: 1.45s;
}

.head {
  transform-box: fill-box;
  transform-origin: center bottom;
  opacity: 0;
  animation: headBloom 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 2.15s;
}

.head circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: grainPop 2.8s ease-in-out infinite;
}

.head circle:nth-of-type(2n) {
  animation-delay: 0.22s;
}

.head circle:nth-of-type(3n) {
  animation-delay: 0.42s;
}

@keyframes sunPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.92;
  }

  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes windDrift {
  0% {
    stroke-dashoffset: 240;
    transform: translateX(-20px);
    opacity: 0;
  }

  35%,
  70% {
    opacity: 0.62;
  }

  100% {
    stroke-dashoffset: -240;
    transform: translateX(34px);
    opacity: 0;
  }
}

@keyframes drawSoil {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes cropSway {
  0%,
  100% {
    transform: rotate(-0.8deg);
  }

  50% {
    transform: rotate(1.2deg);
  }
}

@keyframes stemGrow {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes leafOpen {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes headBloom {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.72);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes grainPop {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: stretch;
  padding: clamp(32px, 5vw, 76px) clamp(18px, 4vw, 48px);
}

.stage-viewer,
.tool-panel,
.form-panel,
.metadata-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.stage-viewer {
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  min-height: 540px;
  overflow: hidden;
  border-color: rgba(36, 93, 56, 0.16);
}

.art-frame {
  display: grid;
  place-items: center;
  min-height: 0;
  background:
    linear-gradient(180deg, #dff3ff 0%, #f4f8e8 62%, #efd39b 100%);
}

.art-frame svg {
  width: min(100%, 78vh);
  max-height: 100%;
  aspect-ratio: 1;
  display: block;
}

.stage-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  border-top: 1px solid var(--line);
  overflow-x: auto;
  background: #fff;
}

.stage-tick {
  min-height: 86px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #fbfaf1 100%);
  transition: background 180ms ease, border-color 180ms ease;
}

.stage-tick:last-child {
  border-right: 0;
}

.stage-tick strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.stage-tick span {
  color: var(--muted);
  font-size: 13px;
}

.stage-tick.active {
  background: linear-gradient(180deg, #eff8e8 0%, #fff6df 100%);
  border-top: 4px solid var(--leaf);
}

.tool-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(18px, 3vw, 30px);
  border-color: rgba(200, 145, 47, 0.28);
}

.panel-title h1,
.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.kicker {
  margin: 0;
  color: var(--clay);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-group,
.form-row,
.mint-controls {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  padding: 10px 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus {
  border-color: rgba(36, 93, 56, 0.65);
  box-shadow: 0 0 0 3px rgba(36, 93, 56, 0.13);
  outline: none;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--focus);
}

.range-readout,
.button-row,
.control-grid,
.mint-layout {
  display: grid;
  gap: 12px;
}

.range-readout,
.button-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.range-readout span:last-child {
  color: var(--focus);
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

button:hover,
button:focus-visible {
  border-color: var(--focus);
  outline: 2px solid rgba(36, 93, 56, 0.18);
  outline-offset: 1px;
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: #e9ece5;
  color: #8c978f;
}

.primary-button {
  border-color: var(--focus);
  background: linear-gradient(135deg, #173f29, #2f8640);
  color: #fff;
  box-shadow: 0 10px 20px rgba(36, 93, 56, 0.18);
}

.control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fffdf8;
  box-shadow: 0 10px 22px rgba(57, 45, 28, 0.08);
}

.mini-card svg {
  width: 100%;
  display: block;
  aspect-ratio: 1.25;
}

.mini-card div {
  padding: 12px;
}

.mini-card strong {
  display: block;
  margin-bottom: 4px;
}

.mini-card span {
  color: var(--muted);
  font-size: 13px;
}

.mint-band,
.nutrition-band {
  padding: clamp(34px, 6vw, 72px) clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.mint-band {
  background:
    linear-gradient(180deg, #eef7ea 0%, #e2f1ec 100%);
}

.nutrition-band {
  background:
    linear-gradient(135deg, #fff8e7 0%, #f3f8e8 52%, #e8f3f1 100%);
}

.section-heading {
  max-width: 940px;
  margin-bottom: 24px;
}

.mint-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-panel {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 26px);
  border-color: rgba(36, 93, 56, 0.15);
}

.button-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contract-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.supply-progress {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fffdf8 0%, #f6faef 100%);
  padding: 16px;
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.progress-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-copy strong {
  color: var(--ink);
  font-size: 22px;
  text-align: right;
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe4d1;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--leaf-bright), var(--gold));
  transition: width 220ms ease;
}

.contract-stats div {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(57, 45, 28, 0.06);
}

.contract-stats span,
.status-line {
  color: var(--muted);
  font-size: 13px;
}

.contract-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.nutrition-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(18px, 4vw, 38px);
  align-items: stretch;
}

.nutrition-copy,
.live-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 12px 28px rgba(57, 45, 28, 0.08);
}

.nutrition-copy {
  display: grid;
  align-content: center;
  gap: 16px;
}

.nutrition-copy p,
.live-summary p,
.nutrition-note {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.nutrition-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nutrition-points div {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fffdf8 0%, #f8f7e9 100%);
  padding: 18px;
  box-shadow: 0 10px 22px rgba(57, 45, 28, 0.07);
}

.nutrition-points strong,
.live-summary strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 22px;
}

.nutrition-points span,
.live-summary span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.nutrition-note {
  max-width: 780px;
  margin-top: 18px;
  font-size: 13px;
}

.live-summary {
  display: grid;
  gap: 8px;
}

.single-action {
  grid-template-columns: 1fr;
}

.utility-warning {
  max-width: 1120px;
  margin-bottom: 18px;
  border: 1px solid #c95f4f;
  border-left: 8px solid #c95f4f;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #fff1ec 0%, #fffdf8 100%);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: 0 12px 26px rgba(143, 45, 34, 0.08);
}

.utility-warning strong {
  display: block;
  margin-bottom: 8px;
  color: #8f2d22;
  font-size: 20px;
}

.utility-warning p {
  margin: 0;
  color: #53362f;
  font-size: 16px;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: #fffdf8;
}

.site-footer div {
  display: grid;
  gap: 4px;
}

.site-footer strong {
  font-size: 20px;
}

.site-footer span {
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  border: 1px solid var(--focus);
  border-radius: 999px;
  color: var(--focus);
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .workbench,
  .mint-layout,
  .nutrition-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-field {
    order: -1;
  }

  .stage-viewer {
    min-height: 470px;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
    gap: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(46px, 6.2vw, 72px);
  }

  .hero-text {
    font-size: 18px;
  }

  .hero-crop-svg {
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  .topbar {
    gap: 12px;
    padding: 10px 14px;
  }

  .network-pill {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero,
  .workbench,
  .mint-band,
  .nutrition-band,
  .metadata-band {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .hero-crop-svg {
    min-height: 300px;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .segmented,
  .control-grid,
  .comparison-grid,
  .button-row,
  .contract-stats,
  .nutrition-points {
    grid-template-columns: 1fr;
  }

  .stage-viewer {
    min-height: 390px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
