@font-face {
  font-family: "InterVariable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/InterVariable.woff2") format("woff2");
}

@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/Quicksand-Light.woff2") format("woff2");
}

:root {
  --text: #403f58;
  --muted: #6b6a80;
  --bg: #fcfcfc;
  --surface: #ffffff;
  --alt: #c8f1ff;
  --alt-soft: #e3faf7;
  --inverse: #324148;
  --accent: #369dc5;
  --link: #316f98;
  --nav-link: #347296;
  --card-gradient: radial-gradient(circle, #ffffff 30%, #e3faf7 100%);
  --cta-gradient: linear-gradient(180deg, #0f6fd8 0%, #0a55bd 100%);
  --cta-gradient-hover: linear-gradient(180deg, #0b5fb8 0%, #084090 100%);
  --font-body: "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Quicksand", "InterVariable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-card: 3px 3px 4px rgba(70, 68, 96, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 20px;
  background: var(--inverse);
  color: #fff;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid rgba(64, 63, 88, 0.06);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(50, 65, 72, 0.12);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  min-height: 66px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: 135px;
  height: auto;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--nav-link);
  font-size: 1.0625rem;
  font-weight: 400;
  padding: 0.55rem 1rem;
  border-radius: 0.25rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: #0a55bd;
  background: #f2fbff;
}

.site-nav .nav-donate {
  margin-left: 0.75rem;
  background: var(--cta-gradient);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(10, 85, 189, 0.24);
}

.site-nav .nav-donate:hover {
  background: var(--cta-gradient-hover);
  color: #fff;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  max-width: 1600px;
  min-height: 480px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: #dfeef3;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  padding: 2rem;
}

.hero-card {
  max-width: 24rem;
  margin: 6rem 4rem 2rem auto;
  padding: 2rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.hero-card h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.22;
  color: var(--text);
}

.hero-card p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.download-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 40px;
  border-radius: 0.35rem;
  background: var(--cta-gradient);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 14px 32px -10px rgba(10, 85, 189, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  animation: cta-glow 3s ease-in-out infinite;
  cursor: pointer;
}

.download-primary:hover {
  background: var(--cta-gradient-hover);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 20px 42px -10px rgba(8, 64, 144, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.download-primary:active {
  transform: translateY(0) scale(0.99);
}

@keyframes cta-glow {
  0%, 100% {
    box-shadow: 0 14px 32px -10px rgba(10, 85, 189, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  }
  50% {
    box-shadow: 0 18px 44px -8px rgba(10, 85, 189, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

.platform-note {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-credit {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0.5rem 2rem 0.75rem;
  background: var(--inverse);
  color: var(--alt);
  font-size: 0.9rem;
}

.hero-credit a {
  color: var(--alt);
  text-decoration: underline;
}

/* Shared section */
.section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.2;
}

.ghost-button {
  display: inline-block;
  padding: 0.55rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 0.2rem;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ghost-button:hover {
  background: var(--alt-soft);
  border-color: #7fd3e8;
  color: #1f7f9f;
  transform: scale(1.04);
}

.ghost-button.small {
  margin-top: 0.5rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.72rem;
}

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid #eef6f8;
  transition: background 0.2s ease, border-radius 0.2s ease;
}

.news-card:hover {
  background: var(--alt);
  border-radius: 3px;
}

.news-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.25;
}

.news-date {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.news-card p {
  margin: 0 0 1.25rem;
  font-size: 1rem;
}

.text-link {
  margin-top: auto;
  align-self: flex-start;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}

.text-link:hover {
  border-bottom-color: var(--accent);
}

/* Features */
.center-title {
  margin: 0 0 2rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.2;
}

.feature-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  margin-bottom: 1.5rem;
  background: var(--card-gradient);
  border: 1px solid var(--alt);
  overflow: hidden;
}

.feature-card.reverse .feature-media {
  order: 2;
}

.feature-media {
  position: relative;
  min-height: 380px;
}

.feature-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-credit {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: #fff;
  font-size: 0.8rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.feature-body {
  align-self: center;
  padding: 2.5rem;
}

.feature-body h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.25;
}

.feature-body p {
  margin: 0 0 1rem;
}

.feature-body ul {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.feature-body li {
  position: relative;
  margin: 0 0 0.6rem;
  padding-left: 1.4rem;
  font-size: 1rem;
}

.feature-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Open source panel */
.opensource-panel {
  padding: 3rem 2rem 5rem;
  background: var(--inverse);
  color: #fff;
  text-align: center;
}

.panel-inner {
  max-width: 1600px;
  margin: 0 auto;
}

.opensource-panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 1.15;
  color: #fff;
}

.opensource-panel p {
  display: inline-block;
  max-width: 545px;
  margin: 0 auto 1rem;
  color: #fff;
}

.panel-link {
  color: var(--alt);
  text-decoration: underline;
}

.panel-link:hover {
  color: #fff;
}

/* Interviews */
.interview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

.interview-card {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 1rem;
  align-items: start;
}

.interview-media {
  height: 13rem;
  background: #e8e8eb;
  border: 1px solid #cbcbcd;
  overflow: hidden;
}

.interview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.interview-body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.3;
}

.interview-date {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.interview-body p {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

/* Team + give back */
.team-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 0 0.5rem;
}

.team-photo {
  height: 480px;
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-credit {
  margin: 0;
  padding: 0.5rem 1rem;
  color: #808080;
  text-align: center;
  font-size: 0.95rem;
}

.give-back {
  padding: 3rem 1.5rem 6rem;
  text-align: center;
}

.give-back h2 {
  margin: 2.5rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.1;
}

.give-back p {
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Footer */
.site-footer {
  padding: 2rem;
  background: var(--inverse);
  color: var(--alt);
}

.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--alt);
}

.footer-col a {
  margin: 0.35rem 0;
  color: var(--alt);
  font-size: 1rem;
  opacity: 0.92;
}

.footer-col a:hover {
  color: #fff;
  opacity: 1;
  text-decoration: underline;
}

.footer-social {
  flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.6rem;
  max-width: 220px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 50%;
  background: rgba(200, 241, 255, 0.1);
}

.footer-social a:hover {
  background: rgba(200, 241, 255, 0.22);
}

.footer-social img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.copyright {
  margin: 2rem 0 0;
  color: rgba(200, 241, 255, 0.72);
  font-size: 0.9rem;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--alt-soft);
}

/* Responsive */
@media (max-width: 1100px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .hero-card {
    margin: 4rem 2rem 2rem auto;
  }

  .feature-card {
    grid-template-columns: 1fr;
  }

  .feature-card.reverse .feature-media {
    order: 0;
  }

  .feature-media {
    min-height: 300px;
  }

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

  .opensource-panel h2 {
    font-size: 2.6rem;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 17px;
  }

  .header-inner {
    padding: 0 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
    background: #fff;
    border-bottom: 1px solid rgba(64, 63, 88, 0.1);
    box-shadow: 0 16px 30px rgba(50, 65, 72, 0.14);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem 0.75rem;
  }

  .site-nav .nav-donate {
    margin: 0.5rem 0 0;
    text-align: center;
  }

  .hero {
    min-height: 560px;
  }

  .hero-inner {
    padding: 1rem;
  }

  .hero-card {
    max-width: none;
    margin: 1rem 0 0;
    padding: 1.5rem;
  }

  .hero-card h1 {
    font-size: 1.7rem;
  }

  .hero-credit {
    padding: 0.5rem 1rem 0.75rem;
  }

  .download-primary {
    width: 100%;
    min-height: 54px;
    padding: 0 24px;
    font-size: 1.0625rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .section-head {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.75rem;
  }

  .section-head h2 {
    font-size: 1.9rem;
  }

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

  .center-title {
    font-size: 1.9rem;
  }

  .feature-body {
    padding: 1.5rem;
  }

  .feature-body h3 {
    font-size: 1.5rem;
  }

  .interview-card {
    grid-template-columns: 1fr;
  }

  .interview-media {
    height: 220px;
  }

  .team-photo {
    height: 260px;
  }

  .give-back {
    padding: 2rem 1rem 4rem;
  }

  .site-footer {
    padding: 1.5rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-social {
    max-width: none;
  }

  .opensource-panel {
    padding: 2.5rem 1rem 3.5rem;
  }

  .opensource-panel h2 {
    font-size: 2.2rem;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .download-primary,
  .download-primary:hover,
  .download-primary:active {
    animation: none;
    transition: none;
    transform: none;
  }

  .ghost-button,
  .news-card,
  .back-to-top {
    transition: none;
  }
}
