:root {
  --ink: #10141c;
  --ink-soft: #5a6578;
  --paper: #e8ecf2;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #f7f8fb;
  --line: rgba(16, 20, 28, 0.1);
  --accent: #1ec8a5;
  --accent-deep: #12a888;
  --signal: #ff5a3d;
  --white: #ffffff;
  --shadow: 0 28px 70px rgba(16, 20, 28, 0.16);
  --radius: 16px;
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Sora", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(30, 200, 165, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(255, 90, 61, 0.1), transparent 50%),
    linear-gradient(180deg, #f3f5f9 0%, #e6eaf1 45%, #dde3ec 100%);
  line-height: 1.55;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.ambient-beam {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: drift 14s var(--ease) infinite alternate;
}

.ambient-beam-a {
  top: -8%;
  right: -6%;
  background: rgba(30, 200, 165, 0.45);
}

.ambient-beam-b {
  bottom: 10%;
  left: -10%;
  background: rgba(90, 120, 180, 0.28);
  animation-delay: -5s;
}

.ambient-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem clamp(1.2rem, 4vw, 3rem);
  backdrop-filter: blur(14px);
  background: rgba(243, 245, 249, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(243, 245, 249, 0.88);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  font-weight: 500;
  font-size: 0.92rem;
  opacity: 0.8;
  transition: opacity 0.2s var(--ease);
}

.nav a:hover {
  opacity: 1;
}

.nav-cta {
  padding: 0.55rem 1.05rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  opacity: 1 !important;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding:
    calc(5.5rem + env(safe-area-inset-top))
    clamp(1.2rem, 4vw, 3rem)
    clamp(2.5rem, 6vh, 4rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.06);
  animation: kenburns 18s var(--ease) infinite alternate;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(16, 20, 28, 0.35) 0%,
      rgba(16, 20, 28, 0.2) 35%,
      rgba(232, 236, 242, 0.55) 72%,
      rgba(232, 236, 242, 0.96) 100%
    ),
    linear-gradient(90deg, rgba(16, 20, 28, 0.45) 0%, transparent 55%);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, transparent 20%, rgba(16, 20, 28, 0.25) 100%);
  animation: pulse-soft 8s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  animation: rise-in 0.95s var(--ease) both;
}

.brand-mark {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 12vw, 7.5rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(243, 245, 249, 0.35);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 16ch;
  color: var(--ink);
}

.hero-lead {
  margin: 1rem 0 0;
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(30, 200, 165, 0.28);
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: var(--white);
}

.btn-ghost {
  background: rgba(247, 248, 251, 0.75);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: var(--white);
}

.btn-small {
  min-height: 2.35rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  border-radius: 10px;
}

.gallery,
.how {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1.2rem, 4vw, 3rem);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 1.75rem;
  animation: rise-in 0.8s var(--ease) both;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.section-head p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.search {
  position: relative;
  flex: 1 1 18rem;
  max-width: 28rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 1.05rem;
  height: 1.05rem;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 1rem 0.7rem 2.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search input:focus {
  border-color: rgba(30, 200, 165, 0.55);
  box-shadow: 0 0 0 4px rgba(30, 200, 165, 0.15);
}

.result-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}

.video-item {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  animation: rise-in 0.7s var(--ease) both;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(145deg, #1a2433 0%, #2a3d52 48%, #1ec8a5 140%);
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.video-item:hover .video-thumb,
.video-item:focus-within .video-thumb {
  transform: translateY(-5px) scale(1.015);
  box-shadow: var(--shadow);
}

.video-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(30, 200, 165, 0.35), transparent 45%),
    linear-gradient(125deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  background-size: 100% 100%, 220% 100%;
  animation: sheen 7s ease-in-out infinite;
}

.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(16, 20, 28, 0.72));
}

.thumb-label {
  position: absolute;
  left: 0.95rem;
  bottom: 0.9rem;
  z-index: 1;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 0;
  transform: translate(-50%, -50%) scale(0.92);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(16, 20, 28, 0.28);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.video-item:hover .play-badge,
.video-item:focus-within .play-badge {
  transform: translate(-50%, -50%) scale(1);
  background: var(--accent);
}

.video-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.video-body p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.pagination[hidden] {
  display: none;
}

.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.page-btn {
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.page-btn:hover {
  border-color: rgba(30, 200, 165, 0.45);
  background: rgba(30, 200, 165, 0.08);
}

.page-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.page-ellipsis {
  min-width: 1.5rem;
  text-align: center;
  color: var(--ink-soft);
}

.pagination .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.meta-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.meta-row span::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
}

.empty-state,
.error-state {
  margin: 1.5rem 0 0;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.error-state {
  color: #9a2f1c;
  border-color: rgba(255, 90, 61, 0.35);
  background: rgba(255, 90, 61, 0.08);
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.how-steps li {
  padding: 0;
  border-top: 2px solid var(--ink);
  padding-top: 1.15rem;
}

.how-steps span {
  display: block;
  font-family: var(--font-display);
  color: var(--accent-deep);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.7rem;
  font-weight: 700;
}

.how-steps strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  margin-bottom: 0.4rem;
}

.how-steps p {
  margin: 0;
  color: var(--ink-soft);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 2.5rem clamp(1.2rem, 4vw, 3rem) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: end;
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.site-footer p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

.player-dialog {
  width: min(920px, calc(100vw - 1.5rem));
  max-width: 920px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  overflow: visible;
}

.player-dialog::backdrop {
  background: rgba(10, 14, 22, 0.7);
  backdrop-filter: blur(8px);
}

.player-shell {
  position: relative;
  background: var(--surface-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: rise-in 0.35s var(--ease) both;
}

.player-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 2.45rem;
  height: 2.45rem;
  border: 0;
  border-radius: 10px;
  background: rgba(247, 248, 251, 0.92);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease);
}

.player-close:hover {
  background: var(--white);
}

.player-close svg {
  width: 1.05rem;
  height: 1.05rem;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0e16;
}

.player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  padding: 1.2rem 1.3rem 1.4rem;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-meta h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.player-meta p:last-child {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-24px, 28px, 0) scale(1.1);
  }
}

@keyframes kenburns {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.14) translate3d(-1.5%, -1%, 0);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

@keyframes sheen {
  0%,
  100% {
    background-position: 0 0, 120% 0;
  }
  50% {
    background-position: 0 0, -20% 0;
  }
}

@media (max-width: 860px) {
  .how-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav a:not(.nav-cta) {
    display: none;
  }

  .hero {
    align-items: end;
  }

  .brand-mark {
    font-size: clamp(3.2rem, 18vw, 4.8rem);
  }

  .player-meta {
    align-items: stretch;
  }

  .player-actions {
    width: 100%;
  }

  .player-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-image {
    transform: none;
  }
}
