:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --ink: #1d2426;
  --muted: #5f6867;
  --line: #d9dde1;
  --teal: #20c3b9;
  --teal-dark: #13948d;
  --accent: #20c3b9;
  --charcoal: #101719;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(16, 23, 25, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(245, 246, 247, 0.92);
  border-bottom: 1px solid rgba(217, 221, 225, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  font-size: 1.05rem;
  font-weight: 800;
}

.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--teal-dark);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.language-option {
  min-width: 38px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.language-option.active,
.language-option:hover {
  background: var(--teal);
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: calc(100svh - 69px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--charcoal);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 23, 25, 0.88) 0%, rgba(16, 23, 25, 0.7) 35%, rgba(16, 23, 25, 0.18) 72%),
    url("assets/coder-hero.png") center / cover;
}

.hero-overlay {
  position: relative;
  width: min(720px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 96px);
  color: #ffffff;
  padding: 80px 0 110px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #20c3b9;
}

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

h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(3.1rem, 7vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.hero-overlay p:not(.eyebrow),
.section-heading p,
.download p,
.viewer-copy p,
.feature-list p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-overlay p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--teal);
  color: white;
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.section {
  padding: clamp(72px, 9vw, 120px) clamp(18px, 4vw, 56px);
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.compact {
  margin-bottom: 24px;
}

.video-frame {
  width: min(1050px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101719;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.video-library {
  background: #eceff1;
}

.video-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 1000px;
  margin: 0 auto 22px;
}

.video-tab {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.video-tab.active,
.video-tab:hover {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.viewer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: stretch;
  gap: 20px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.selected-video {
  margin: 0;
}

.viewer-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.community {
  background: var(--bg);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.feature-list article,
.tally-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature-list article {
  padding: 24px;
}

.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--charcoal);
  color: #ffffff;
}

.download > div {
  max-width: 760px;
}

.download p {
  color: rgba(255, 255, 255, 0.74);
}

.download-button {
  flex: 0 0 auto;
}

.contact {
  background: #fafafa;
}

.tally-panel {
  width: min(920px, 100%);
  min-height: 420px;
  margin: 0 auto;
  overflow: hidden;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.legal-page {
  width: min(880px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0;
}

.legal-page a {
  color: var(--teal-dark);
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header,
  .site-footer,
  .download {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav,
  .site-footer nav {
    flex-wrap: wrap;
  }

  .language-switcher {
    align-self: stretch;
    justify-content: space-between;
  }

  .language-option {
    flex: 1 1 0;
  }

  .hero {
    min-height: 720px;
  }

  .hero-media {
    background:
      linear-gradient(180deg, rgba(16, 23, 25, 0.92) 0%, rgba(16, 23, 25, 0.72) 52%, rgba(16, 23, 25, 0.35) 100%),
      url("assets/coder-hero.png") center / cover;
  }

  .hero-overlay {
    margin: 0 auto;
    padding-top: 72px;
  }

  .viewer-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .viewer-copy {
    min-height: 220px;
  }
}

@media (max-width: 520px) {
  .main-nav {
    gap: 10px 14px;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 3rem;
  }

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