:root {
  --ink: #061923;
  --deep: #062532;
  --ocean: #0a3b4a;
  --cyan: #21c7df;
  --foam: #dff6f4;
  --paper: #f3f0e8;
  --muted: #9cb0b2;
  --line: rgba(218, 242, 239, 0.18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--foam);
  background: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  height: 88px;
  padding: 0 clamp(24px, 6vw, 96px);
  display: flex;
  align-items: start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand { display: flex; align-items: center; gap: 11px; color: white; text-decoration: none; font-size: 23px; font-weight: 500; letter-spacing: -.04em; }
.brand img { width: 43px; height: 43px; border-radius: 10px; object-fit: cover; }
.brand span span { color: var(--cyan); font-weight: 700; }
.header-link { color: var(--foam); text-decoration: none; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; }

.hero {
  min-height: 810px;
  padding: 150px clamp(24px, 6vw, 96px) 88px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .8fr);
  gap: clamp(50px, 8vw, 135px);
  align-items: center;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 12% 85%, rgba(25, 187, 210, .19), transparent 25%),
    radial-gradient(circle at 83% 25%, rgba(37, 176, 196, .12), transparent 31%),
    linear-gradient(120deg, #061923 0%, #082b38 60%, #073541 100%);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  width: 510px; height: 510px;
  border: 1px solid rgba(57, 204, 221, .08);
  border-radius: 50%;
  left: -260px; bottom: -250px;
  box-shadow: 0 0 0 90px rgba(42,195,214,.025), 0 0 0 180px rgba(42,195,214,.018);
}
.hero::after { width: 300px; height: 300px; left: auto; bottom: auto; top: 80px; right: -180px; }
.hero-copy, .upload-card { position: relative; z-index: 1; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #b4d5d5; display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 26px; height: 1px; background: var(--cyan); }
h1 { margin: 27px 0; font-family: var(--serif); font-size: clamp(64px, 7.1vw, 108px); font-weight: 400; letter-spacing: -.055em; line-height: .91; }
h1 em { color: var(--cyan); font-weight: 400; }
.intro { max-width: 600px; color: #bbcdcf; font-size: 18px; line-height: 1.7; }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px 26px; margin-top: 42px; color: #9db4b6; font-size: 12px; }
.trust-row span::before { content: "✓"; color: var(--cyan); margin-right: 7px; }

.upload-card { grid-column: 1 / -1; justify-self: center; width: min(680px, 100%); background: var(--paper); color: var(--ink); padding: 25px; box-shadow: 0 35px 90px rgba(0,0,0,.28); }
.card-topline { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; letter-spacing: .16em; color: #667a7b; margin-bottom: 18px; }
.drop-zone { min-height: 300px; border: 1px dashed #9cb5b5; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 28px; outline: none; transition: .2s ease; }
.drop-zone:hover, .drop-zone:focus, .drop-zone.dragging { background: #e1f4f0; border-color: #158fa4; }
.drop-zone h2 { margin: 20px 0 8px; font: 400 27px/1.15 var(--serif); }
.drop-zone p { margin: 0; color: #526a6d; font-size: 13px; }
.drop-zone u { color: #087b94; font-weight: 700; text-underline-offset: 3px; }
.drop-zone .file-types { margin-top: 22px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #839494; }
.sonar-mark { width: 74px; height: 74px; position: relative; display: grid; place-items: center; }
.sonar-mark span { position: absolute; inset: 0; border: 1px solid rgba(21,143,164,.22); border-radius: 50%; }
.sonar-mark span:nth-child(2) { inset: 10px; }
.sonar-mark span:nth-child(3) { inset: 20px; }
.sonar-mark img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; z-index: 1; }
.check-row { display: flex; gap: 11px; align-items: flex-start; margin: 18px 2px; color: #526467; font-size: 11px; line-height: 1.5; cursor: pointer; }
.check-row input { appearance: none; flex: 0 0 auto; width: 17px; height: 17px; margin: 0; border: 1px solid #72898a; background: white; display: grid; place-content: center; }
.check-row input::before { content: "✓"; color: white; font-size: 12px; transform: scale(0); transition: .1s; }
.check-row input:checked { border-color: #087e97; background: #087e97; }
.check-row input:checked::before { transform: scale(1); }
.primary-button { width: 100%; border: 0; background: #092d39; color: white; min-height: 55px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; transition: .2s; }
.primary-button:not(:disabled):hover { background: #0b6070; }
.primary-button:not(:disabled):focus-visible, .secondary-button:not(:disabled):focus-visible { outline: 3px solid rgba(33,199,223,.38); outline-offset: 2px; }
.primary-button:disabled { opacity: .42; cursor: not-allowed; }
.primary-button span { color: var(--cyan); font-size: 20px; }
.upload-actions { display: grid; gap: 10px; }
.action-control { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 45px; gap: 8px; }
.secondary-button { width: 100%; border: 1px solid #173f49; background: transparent; color: #0a3541; min-height: 55px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; transition: .2s; }
.secondary-button:not(:disabled):hover { background: #dcece9; border-color: #0b7183; }
.secondary-button:disabled { opacity: .42; cursor: not-allowed; }
.secondary-button span { color: #087e97; font-size: 20px; }
.action-info { position: relative; }
.action-info summary { list-style: none; width: 45px; height: 55px; border: 1px solid #8ca1a2; color: #31575d; display: grid; place-items: center; font: 700 14px var(--serif); cursor: help; transition: .2s; }
.action-info summary::-webkit-details-marker { display: none; }
.action-info summary:hover, .action-info summary:focus-visible, .action-info[open] summary { color: #087e97; border-color: #087e97; background: #e1f1ee; outline: none; }
.info-popover { display: none; position: absolute; z-index: 20; width: min(310px, calc(100vw - 60px)); right: 0; top: calc(100% + 9px); padding: 14px 16px; background: #062f3b; color: #d9eeee; box-shadow: 0 12px 30px rgba(1,20,27,.25); font-size: 11px; line-height: 1.55; }
.info-popover::before { content: ""; position: absolute; right: 15px; bottom: 100%; border: 6px solid transparent; border-bottom-color: #062f3b; }
.action-info:hover .info-popover, .action-info:focus-within .info-popover, .action-info[open] .info-popover { display: block; }
.direct-contribution { margin-top: 14px; border: 1px solid #9ab2b0; background: #e4efec; padding: 20px; }
.direct-contribution > p:not(.small-label) { color: #52696b; font-size: 12px; line-height: 1.55; margin: 8px 0 0; }
.direct-contribution .small-label { color: #087e97; margin: 0; }
.direct-contribution .check-row { margin-bottom: 15px; }
.direct-contribution-actions { max-width: 330px; }
.direct-contributed-message { margin-top: 14px; padding: 18px 20px; font-size: 12px; }
.security-check { margin-top: 14px; padding: 15px 17px; border: 1px solid #b4c5c3; background: #edf2ef; }
.security-check .small-label { color: #527174; margin: 0 0 10px; }
.security-check > p:last-child { margin: 8px 0 0; color: #617577; font-size: 10px; }
.selected-file { display: flex; align-items: center; gap: 12px; padding: 13px; background: #e0efec; margin-top: 12px; }
.file-thumb { width: 42px; height: 42px; background: #0c3b49; color: var(--cyan); display: grid; place-items: center; }
.selected-file > div:nth-child(2) { min-width: 0; flex: 1; }
.selected-file strong, .selected-file span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selected-file strong { font-size: 12px; }
.selected-file span { color: #637678; font-size: 10px; margin-top: 4px; }
.selected-file button { border: 0; background: none; font-size: 22px; color: #53696b; }
.video-details { margin-top: 14px; }
.video-details label { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 8px; color: #173b43; font-size: 12px; font-weight: 700; }
.video-details label span { color: #718486; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.video-details textarea { width: 100%; resize: vertical; min-height: 78px; border: 1px solid #9fb4b3; background: #fbfaf5; color: var(--ink); padding: 11px 12px; font-size: 12px; line-height: 1.5; }
.video-details textarea:focus { outline: 2px solid rgba(8,126,151,.24); border-color: #087e97; }
.field-help { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; color: #728486; font-size: 9px; line-height: 1.4; }
.field-help b { font-weight: 600; }
.form-error { margin: 12px 0 0; color: #a92e2e; font-size: 12px; }

.hero-model-section { padding: 0; display: block; background: transparent; }
.model-intro h2 { max-width: 650px; margin: 23px 0 20px; font: 400 clamp(40px, 4.7vw, 68px)/1 var(--serif); letter-spacing: -.04em; }
.model-intro > p:last-child { max-width: 650px; color: #b2c9ca; font-size: 15px; line-height: 1.75; }
.model-lists { display: grid; gap: 28px; align-content: center; margin-top: 28px; }
.model-lists .small-label { margin: 0 0 16px; }
.species-tags { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; margin: 0; padding: 0; }
.species-tags li { padding: 9px 12px; border: 1px solid rgba(223,246,244,.22); color: #d8eaea; font-size: 11px; }
.wanted-list { padding-top: 28px; border-top: 1px solid var(--line); }
.wanted-list p:last-child { max-width: 680px; margin: 0; color: #b2c9ca; font-size: 14px; line-height: 1.7; }

.process-section { background: var(--paper); color: var(--ink); padding: 100px clamp(24px, 7vw, 120px); display: grid; grid-template-columns: .75fr 1.5fr; gap: 90px; }
.process-section .eyebrow { color: #477074; }
.section-heading h2, .results h2 { font: 400 clamp(42px, 4.5vw, 66px)/1 var(--serif); letter-spacing: -.04em; margin: 24px 0 0; }
.steps { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px; }
.steps li { border-top: 1px solid #a9b9b7; padding-top: 18px; }
.steps b { color: #0b91a7; font-size: 11px; letter-spacing: .1em; }
.steps h3 { margin: 40px 0 12px; font: 400 23px var(--serif); }
.steps p { margin: 0; color: #66787a; font-size: 13px; line-height: 1.65; }

.analysis-panel { background: #082935; padding: 88px clamp(24px, 7vw, 120px); }
.analysis-shell { max-width: 1280px; margin: 0 auto; }
.analysis-status { min-height: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.analysis-status .eyebrow { justify-content: center; }
.analysis-status h2 { font: 400 clamp(38px, 5vw, 65px) var(--serif); margin: 18px 0 10px; }
.analysis-status > p:not(.eyebrow) { color: #a9c0c2; }
.scan-orbit { width: 110px; height: 110px; border: 1px solid rgba(35,198,221,.25); border-radius: 50%; display: grid; place-items: center; margin-bottom: 32px; animation: pulse 2s infinite; }
.scan-orbit img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
@keyframes pulse { 50% { box-shadow: 0 0 0 22px rgba(35,198,221,.05), 0 0 0 44px rgba(35,198,221,.025); } }
.progress-track { margin-top: 30px; width: min(420px, 90%); height: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 20%; background: var(--cyan); animation: scanning 2.1s infinite ease-in-out; }
.progress-track.determinate span { transform: none; animation: none; transition: width .35s ease; }
@keyframes scanning { from { transform: translateX(-100%); } to { transform: translateX(500%); } }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 45px; }
.quiet-button { border: 1px solid var(--line); background: transparent; color: var(--foam); padding: 13px 17px; }
.results-grid { display: grid; grid-template-columns: 1.5fr .75fr; border: 1px solid var(--line); }
.video-result { background: #020d12; min-height: 380px; display: grid; place-items: center; }
.video-result video { width: 100%; max-height: 620px; display: block; }
.field-notes { padding: 34px; border-left: 1px solid var(--line); }
.small-label { color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.summary-stats { display: flex; gap: 34px; margin: 30px 0; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.summary-stats strong { display: block; font: 400 35px var(--serif); }
.summary-stats span { color: #8ea8aa; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.species-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 15px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.species-item strong { font: 400 18px var(--serif); text-transform: capitalize; }
.species-item > span { color: var(--cyan); font-size: 12px; }
.confidence { grid-column: 1 / -1; height: 3px; background: rgba(255,255,255,.1); }
.confidence span { display: block; height: 100%; background: var(--cyan); }
.empty-result { color: #9db3b5; line-height: 1.6; font-size: 13px; }
.contribute-card { margin-top: 24px; background: var(--paper); color: var(--ink); padding: 34px; display: grid; grid-template-columns: 1fr 300px; gap: 70px; align-items: end; }
.contribute-card h3 { font: 400 29px var(--serif); margin: 14px 0 8px; }
.contribute-card p:not(.small-label) { color: #586d70; line-height: 1.6; font-size: 13px; max-width: 720px; }
.check-row.compact { max-width: 630px; font-size: 12px; }
.contribute-actions .primary-button { background: #0a3a46; }
.text-button { display: block; margin: 14px auto 0; background: none; border: 0; color: #6b7d7f; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.contributed-message { margin-top: 24px; padding: 25px 30px; background: #dff4ec; color: #0b463e; display: flex; gap: 16px; align-items: center; }
.contributed-message > span { width: 38px; height: 38px; background: #128273; color: white; border-radius: 50%; display: grid; place-items: center; }

footer { min-height: 150px; padding: 45px clamp(24px, 7vw, 120px); display: flex; align-items: center; justify-content: space-between; color: #839da0; font-size: 11px; }
.footer-brand { color: white; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 135px; }
  .hero-copy { max-width: 720px; }
  .upload-card { max-width: 680px; width: 100%; }
  .process-section { grid-template-columns: 1fr; gap: 45px; }
  .results-grid { grid-template-columns: 1fr; }
  .field-notes { border-left: 0; border-top: 1px solid var(--line); }
  .contribute-card { grid-template-columns: 1fr; gap: 20px; }
  .contribute-actions { max-width: 350px; }
}

@media (max-width: 650px) {
  .site-header { height: 72px; }
  .header-link { display: none; }
  .hero { padding-top: 120px; padding-bottom: 55px; gap: 45px; }
  h1 { font-size: 57px; }
  .intro { font-size: 15px; }
  .upload-card { padding: 15px; }
  .drop-zone { min-height: 260px; }
  .process-section, .analysis-panel { padding-top: 70px; padding-bottom: 70px; }
  .steps { grid-template-columns: 1fr; gap: 25px; }
  .steps h3 { margin-top: 20px; }
  .results-head { align-items: flex-start; gap: 25px; flex-direction: column; }
  .video-result { min-height: 220px; }
  .field-notes, .contribute-card { padding: 24px; }
  footer { flex-direction: column; justify-content: center; gap: 12px; text-align: center; }
}

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