:root {
  --sky: #1fb6ff;
  --sky-dark: #0577b8;
  --sky-soft: #e6f7ff;
  --ink: #102033;
  --muted: #5f7186;
  --paper: #f7fbfd;
  --white: #ffffff;
  --line: #cde9f7;
  --green: #20b26b;
  --amber: #f5a524;
  --coral: #ef6f6c;
  --shadow: 0 18px 50px rgba(16, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(205, 233, 247, 0.9);
  background: rgba(247, 251, 253, 0.94);
  backdrop-filter: blur(14px);
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: calc(100% - 32px);
  max-width: 1180px;
  min-height: 74px;
  margin: 0 auto;
}

.project-link {
  color: var(--sky-dark);
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

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

.nav-links a {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--sky-dark);
  background: var(--sky-soft);
  outline: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 128px;
  font-weight: 900;
  text-transform: lowercase;
}

.brand-logo img {
  display: block;
  width: 128px;
  max-height: 46px;
  object-fit: contain;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--white);
  background: var(--sky);
  font-size: 1rem;
  letter-spacing: 0;
}

.brand-name {
  color: var(--sky-dark);
  font-size: 1rem;
}

.section-band {
  scroll-margin-top: 96px;
  padding: 88px 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: 42px;
  width: calc(100% - 32px);
  max-width: 1180px;
  min-height: min(680px, calc(100svh - 140px));
  margin: 0 auto;
  padding-top: 56px;
  padding-bottom: 64px;
}

.hero-copy {
  min-width: 0;
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--sky-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: 3.25rem;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 2.3rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-text,
.section-head p,
.ml-intro p,
.method-card p,
.media-card figcaption {
  color: var(--muted);
}

.hero-text {
  max-width: 610px;
  margin-bottom: 28px;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 850;
  text-align: center;
}

.button.primary {
  color: var(--white);
  background: var(--sky-dark);
  box-shadow: 0 12px 30px rgba(5, 119, 184, 0.22);
}

.button.secondary {
  color: var(--sky-dark);
  border-color: var(--line);
  background: var(--white);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.hero-visual {
  display: grid;
  gap: 16px;
  align-self: center;
  min-width: 0;
  min-height: auto;
}

.scan-stage {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.scan-stage::before,
.scan-stage::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(31, 182, 255, 0.55);
  border-radius: 8px;
}

.scan-stage::before {
  inset: 34px;
}

.scan-stage::after {
  inset: 82px 66px;
  border-color: rgba(32, 178, 107, 0.5);
}

.scan-line {
  position: absolute;
  top: 50%;
  left: 28px;
  right: 28px;
  height: 3px;
  background: var(--green);
  box-shadow: 0 0 20px rgba(32, 178, 107, 0.52);
  animation: scan 3.4s ease-in-out infinite;
}

.sample-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font-size: 0.86rem;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.1);
}

.chip-plastic {
  top: 54px;
  left: 48px;
  border-color: rgba(31, 182, 255, 0.5);
}

.chip-paper {
  right: 46px;
  bottom: 64px;
  border-color: rgba(245, 165, 36, 0.5);
}

.chip-organic {
  left: 94px;
  bottom: 102px;
  border-color: rgba(32, 178, 107, 0.5);
}

.lens-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 128px;
  height: 128px;
  border: 18px solid rgba(31, 182, 255, 0.15);
  border-top-color: rgba(5, 119, 184, 0.72);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.visual-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.visual-metrics div {
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.visual-metrics span,
.visual-metrics strong {
  display: block;
}

.visual-metrics span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.visual-metrics strong {
  margin-top: 4px;
  color: var(--sky-dark);
  font-size: 1.55rem;
  line-height: 1.1;
}

.process-section,
.result-section {
  background: var(--white);
}

.section-head,
.ml-intro {
  width: min(900px, 100%);
  margin: 0 auto 34px;
  text-align: center;
}

.media-grid,
.method-grid,
.impact-tool,
.code-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

.media-card {
  margin: 0;
}

.media-real {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--sky-soft);
}

.media-placeholder {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 22px;
  border: 1px dashed rgba(5, 119, 184, 0.45);
  border-radius: 8px;
  text-align: center;
  background: var(--sky-soft);
}

.media-placeholder span,
.media-placeholder strong {
  display: block;
}

.media-placeholder span {
  color: var(--sky-dark);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.media-placeholder strong {
  max-width: 220px;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.25;
}

.photo-placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(230, 247, 255, 0.92)),
    repeating-linear-gradient(45deg, rgba(5, 119, 184, 0.12) 0 1px, transparent 1px 18px);
}

.video-placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(226, 251, 238, 0.95)),
    repeating-linear-gradient(90deg, rgba(32, 178, 107, 0.13) 0 1px, transparent 1px 18px);
}

.play-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
}

.play-icon::after {
  position: absolute;
  top: 50%;
  left: 52%;
  content: "";
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid var(--white);
  transform: translate(-40%, -50%);
}

.media-card figcaption {
  min-height: 54px;
  padding: 12px 2px 0;
  font-size: 0.95rem;
}

.ml-section {
  background: var(--sky-soft);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.method-card {
  min-height: 280px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border-radius: 8px;
  color: var(--white);
  background: var(--sky-dark);
  font-weight: 900;
}

.code-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1d2c;
  box-shadow: var(--shadow);
}

.code-tabs {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--white);
}

.tab-button,
.copy-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.tab-button {
  min-width: 112px;
  padding: 9px 14px;
  color: var(--muted);
  background: var(--paper);
}

.tab-button.active {
  color: var(--white);
  border-color: var(--sky-dark);
  background: var(--sky-dark);
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 16px;
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.copy-button {
  min-width: 96px;
  padding: 8px 12px;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.code-area {
  display: block;
  width: 100%;
  min-height: 360px;
  padding: 22px;
  border: 0;
  resize: vertical;
  color: #e8f7ff;
  background: #0f1d2c;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
}

.code-area[hidden] {
  display: none;
}

.future-section {
  background: var(--paper);
}

.impact-tool {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.measurement-panel,
.impact-output {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(16, 32, 51, 0.08);
}

.measurement-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.measurement-panel label {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 8px 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.measurement-panel label:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.measurement-panel span {
  font-weight: 850;
}

.measurement-panel small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.measurement-panel input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
}

.measurement-panel input:focus {
  border-color: var(--sky);
  outline: 3px solid rgba(31, 182, 255, 0.18);
}

.impact-output {
  padding: 18px;
}

#impact-chart {
  display: block;
  width: 100%;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.impact-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.impact-stats div {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sky-soft);
}

.impact-stats span,
.impact-stats small {
  display: block;
}

.impact-stats span {
  color: var(--sky-dark);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.15;
}

.impact-stats small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.impact-narrative {
  min-height: 72px;
  margin: 16px 0 0;
  padding: 16px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  color: var(--ink);
  background: #ecfff5;
}

.site-footer {
  padding: 30px 24px;
  color: var(--muted);
  text-align: center;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

@keyframes scan {
  0%,
  100% {
    transform: translateY(-96px);
  }

  50% {
    transform: translateY(96px);
  }
}

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

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .brand-logo {
    grid-column: 2;
    grid-row: 1;
  }

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

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .media-grid,
  .method-grid,
  .impact-tool {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .impact-output {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .section-band {
    padding: 64px 16px;
    scroll-margin-top: 134px;
  }

  .topbar {
    width: calc(100% - 24px);
  }

  .project-link {
    white-space: normal;
  }

  .brand-name {
    display: none;
  }

  .brand-logo {
    min-width: auto;
  }

  .nav-links a {
    min-width: max-content;
    padding: 9px 10px;
    font-size: 0.86rem;
  }

  .hero {
    width: calc(100% - 24px);
    gap: 28px;
    padding-top: 38px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-actions,
  .code-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .button,
  .tab-button {
    width: 100%;
  }

  .hero-visual {
    min-height: auto;
  }

  .scan-stage {
    min-height: 280px;
  }

  .visual-metrics,
  .media-grid,
  .method-grid,
  .impact-tool,
  .impact-stats {
    grid-template-columns: 1fr;
  }

  .method-card {
    min-height: auto;
  }

  .measurement-panel label {
    grid-template-columns: 1fr;
  }

  #impact-chart {
    height: 280px;
  }

  .code-area {
    min-height: 330px;
    font-size: 0.86rem;
  }
}

@media (max-width: 440px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .sample-chip {
    font-size: 0.78rem;
  }

  .chip-plastic {
    left: 32px;
  }

  .chip-paper {
    right: 24px;
  }

  .chip-organic {
    left: 64px;
  }
}
