:root {
  --ink: #f8fafc;
  --muted: #bfd0dc;
  --night: #061015;
  --panel: rgba(7, 17, 24, 0.76);
  --line: rgba(255, 255, 255, 0.16);
  --cyan: #58e6ff;
  --green: #6cffb3;
  --pink: #ff4d8d;
  --gold: #ffd166;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: linear-gradient(to bottom, rgba(4, 11, 16, 0.82), rgba(4, 11, 16, 0.18));
  backdrop-filter: blur(18px);
}

.brand,
.topnav,
.hero-actions,
.admin-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
  font-weight: 900;
  letter-spacing: 0;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 15px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--green) 52%, var(--gold));
  box-shadow: 0 0 28px rgba(88, 230, 255, 0.7);
}

.topnav {
  gap: 10px;
}

.topnav a,
.ghost-button,
.secondary-button,
.primary-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.topnav a,
.ghost-button {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
}

.topnav a:hover,
.ghost-button:hover,
.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 230, 255, 0.62);
  background: rgba(88, 230, 255, 0.12);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  padding: 130px clamp(20px, 6vw, 82px) 70px;
  isolation: isolate;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  overflow: hidden;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 116%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.08);
  transform: translateY(calc(var(--hero-parallax, 0) * 1px)) scale(1.04);
  transition: transform 80ms linear;
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 10, 14, 0.94) 0%, rgba(3, 10, 14, 0.62) 44%, rgba(3, 10, 14, 0.1) 100%),
    linear-gradient(to top, var(--night) 0%, rgba(6, 16, 21, 0) 38%);
}

.hero-content {
  width: min(820px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: #d9e7ee;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  font-weight: 900;
}

.primary-button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #031016;
  box-shadow: 0 14px 36px rgba(88, 230, 255, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.intro-band {
  padding: 34px clamp(20px, 6vw, 82px) 88px;
  background: linear-gradient(180deg, #061015 0%, #0a171d 100%);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 36px;
  align-items: center;
}

.intro-grid p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.55;
}

.intro-grid strong {
  display: block;
  color: var(--ink);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.metric strong {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.story {
  padding: 40px 0 0;
  background:
    radial-gradient(ellipse at top left, rgba(255, 77, 141, 0.16), transparent 38%),
    linear-gradient(180deg, #0a171d 0%, #071116 100%);
}

.section-heading {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 24px;
}

.section-heading h2,
.impact-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow) {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.7;
}

.story-rail {
  display: grid;
  gap: 16vh;
  padding-bottom: 16vh;
}

.story-card {
  --zoom: 1;
  --shift: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.72fr);
  gap: clamp(22px, 5vw, 72px);
  align-items: center;
  min-height: 84vh;
  width: min(1260px, calc(100% - 40px));
  margin: 0 auto;
}

.story-card:nth-child(even) {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.03fr);
}

.story-card:nth-child(even) .story-image {
  order: 2;
}

.story-image {
  position: sticky;
  top: 96px;
  height: min(68vh, 680px);
  min-height: 420px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform:
    perspective(1000px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    scale(calc(var(--zoom) + var(--hover-zoom, 0)))
    translateY(var(--shift));
  transform-origin: center;
  transition: transform 160ms ease, box-shadow 220ms ease;
  will-change: transform;
}

.story-image::after,
.impact-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255, 255, 255, 0.24), transparent 34%);
  opacity: 0;
  transition: opacity 220ms ease;
  mix-blend-mode: screen;
}

.story-image:hover,
.impact-media:hover {
  --hover-zoom: 0.045;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48), 0 0 42px rgba(88, 230, 255, 0.18);
}

.story-image:hover::after,
.impact-media:hover::after {
  opacity: 1;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 420ms ease, filter 420ms ease;
}

.story-image:hover img,
.impact-media:hover img {
  transform: scale(1.1);
  filter: saturate(1.2) contrast(1.08);
}

.story-copy {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.story-card:nth-child(even) .story-copy {
  transform: translateX(-48px);
}

.story-card.is-visible .story-copy {
  opacity: 1;
  transform: translateX(0);
}

.step-label {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(108, 255, 179, 0.32);
  border-radius: 999px;
  color: var(--green);
  font-weight: 900;
}

.story-copy h3 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: 0.98;
}

.story-copy p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.7;
}

.impact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  padding: 110px clamp(20px, 6vw, 82px) 120px;
  background:
    linear-gradient(135deg, rgba(88, 230, 255, 0.15), transparent 38%),
    linear-gradient(180deg, #071116, #04090d);
}

.impact-media {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform:
    perspective(1000px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    scale(calc(1 + var(--hover-zoom, 0)));
  transition: transform 180ms ease, box-shadow 220ms ease;
  will-change: transform;
}

.impact-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 420ms ease, filter 420ms ease;
}

.impact-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.impact-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.impact-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: #e8f4f8;
}

.impact-item::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.5);
}

.video-showcase {
  padding: 110px clamp(20px, 6vw, 82px);
  background:
    radial-gradient(ellipse at 85% 18%, rgba(255, 209, 102, 0.16), transparent 34%),
    linear-gradient(180deg, #04090d 0%, #08141a 100%);
}

.video-showcase .section-heading {
  width: min(1120px, 100%);
}

.video-frame {
  position: relative;
  width: min(1120px, 100%);
  margin: 38px auto 0;
  border: 1px solid rgba(88, 230, 255, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: #02070a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.video-frame::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 9;
}

.video-frame iframe,
.video-frame video,
.video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-frame iframe,
.video-frame video {
  border: 0;
  object-fit: cover;
}

.project-video {
  background: #02070a;
}

.video-open-link {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(3, 11, 16, 0.72);
  color: #f7fdff;
  font-size: 0.82rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.video-placeholder {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.video-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.08) brightness(0.72);
  transform: scale(1.04);
}

.play-orb {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(74px, 12vw, 126px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(3, 11, 16, 0.58);
  box-shadow: 0 0 38px rgba(88, 230, 255, 0.32);
  backdrop-filter: blur(12px);
}

.play-orb::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid var(--ink);
}

.video-caption {
  position: absolute;
  left: clamp(18px, 4vw, 42px);
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(18px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #eafaff;
  font-weight: 900;
}

.video-caption span:last-child {
  color: var(--green);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.gallery-section {
  padding: 100px clamp(20px, 6vw, 82px) 120px;
  background:
    linear-gradient(135deg, rgba(255, 77, 141, 0.14), transparent 36%),
    linear-gradient(180deg, #08141a 0%, #03070a 100%);
}

.gallery-section .section-heading {
  width: min(1120px, 100%);
}

.gallery-grid {
  width: min(1120px, 100%);
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition:
    opacity 620ms ease,
    transform 620ms ease,
    border-color 180ms ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}

.gallery-section.is-visible .gallery-item,
.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(88, 230, 255, 0.55);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.06);
  transition: transform 420ms ease, filter 420ms ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: saturate(1.2) contrast(1.08) brightness(0.82);
}

.gallery-item span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(3, 11, 16, 0.58);
  color: #f7fdff;
  font-size: 0.84rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 720ms ease, transform 720ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.admin-shell.is-open {
  display: block;
}

.admin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.admin-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  overflow: auto;
  padding: 26px;
  border-left: 1px solid var(--line);
  background: rgba(6, 16, 21, 0.96);
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.46);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-header h2 {
  margin: 0;
  font-size: 2rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
}

.login-box,
.editor-box,
.field-grid,
.editor-section,
.gallery-edit-grid {
  display: grid;
  gap: 16px;
}

.field-grid {
  grid-template-columns: 1fr 1fr;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: #dcecf2;
  font-size: 0.9rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(88, 230, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(88, 230, 255, 0.12);
}

.editor-section {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.editor-section h3 {
  margin: 0;
}

.section-edit {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.gallery-edit-grid {
  grid-template-columns: 1fr 1fr;
}

.gallery-edit {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.full {
  width: 100%;
}

.form-note {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 820px) {
  .topbar {
    gap: 12px;
    padding: 12px 16px;
  }

  .topnav a {
    display: none;
  }

  .brand {
    max-width: calc(100vw - 128px);
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 13px;
    height: 32px;
  }

  .ghost-button {
    min-height: 42px;
    padding: 9px 15px;
  }

  .hero {
    min-height: 86svh;
    padding: 96px 20px 44px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 10.5vw, 3.35rem);
    line-height: 1.02;
  }

  .hero-copy {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 22px;
  }

  .primary-button,
  .secondary-button {
    min-height: 46px;
    padding: 12px 14px;
    font-size: 0.92rem;
    text-align: center;
  }

  .intro-band {
    padding: 28px 20px 56px;
  }

  .intro-grid {
    gap: 22px;
  }

  .intro-grid p {
    font-size: 1.02rem;
  }

  .intro-grid,
  .story-card,
  .story-card:nth-child(even),
  .impact {
    grid-template-columns: 1fr;
  }

  .gallery-grid,
  .gallery-edit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .metric {
    min-height: 90px;
    padding: 14px 10px;
  }

  .metric strong {
    font-size: 1.7rem;
  }

  .metric span {
    font-size: 0.74rem;
  }

  .story {
    padding-top: 56px;
  }

  .section-heading {
    width: calc(100% - 32px);
    margin-bottom: 20px;
  }

  .section-heading h2,
  .impact-copy h2 {
    font-size: clamp(2rem, 10vw, 2.85rem);
    line-height: 1.05;
  }

  .section-heading p:not(.eyebrow) {
    margin-top: 14px;
    font-size: 0.98rem;
  }

  .story-rail {
    gap: 64px;
    padding-bottom: 70px;
  }

  .story-card {
    width: calc(100% - 32px);
    min-height: auto;
    gap: 18px;
  }

  .story-card:nth-child(even) .story-image {
    order: 0;
  }

  .story-image {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .story-copy,
  .story-card:nth-child(even) .story-copy {
    transform: translateY(24px);
  }

  .story-copy h3 {
    font-size: clamp(1.85rem, 9vw, 2.75rem);
  }

  .story-copy p {
    margin-top: 16px;
    font-size: 0.98rem;
  }

  .impact {
    padding: 62px 20px 72px;
  }

  .impact-copy p {
    font-size: 0.98rem;
  }

  .video-showcase,
  .gallery-section {
    padding: 64px 20px 76px;
  }

  .video-frame {
    margin-top: 26px;
  }

  .gallery-grid {
    gap: 10px;
    margin-top: 26px;
  }

  .gallery-item span {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 8px;
    font-size: 0.76rem;
  }

  .admin-panel {
    padding: 20px;
  }

  .admin-actions {
    display: grid;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .gallery-edit-grid {
    grid-template-columns: 1fr;
  }

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

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

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .video-caption {
    display: grid;
  }
}

@media (max-width: 390px) {
  h1 {
    font-size: clamp(2.18rem, 10vw, 2.8rem);
  }

  .metric span {
    font-size: 0.7rem;
  }
}

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