/* ============ tokens ============ */
:root {
  --blue: #0082C8;
  --blue-600: #0071af;
  --blue-050: #e6f3fb;
  --ink: #0b0b0d;
  --grey-1: #919396;
  --grey-2: #525052;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --line: #ececef;

  --font-head: "Oswald", system-ui, sans-serif;
  --font-body: "Mulish", system-ui, sans-serif;

  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(11,11,13,.04), 0 2px 8px rgba(11,11,13,.04);
  --shadow-md: 0 4px 16px rgba(11,11,13,.06), 0 12px 40px rgba(0,130,200,.08);

  --ease: cubic-bezier(.2,.7,.2,1);
  --container: 1180px;
}

/* ============ reset ============ */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
h1,h2,h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; margin: 0; }

.accent { color: var(--blue); }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 13px;
  color: var(--grey-2);
  margin: 0 0 18px;
}

/* ============ nav ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 40px);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: rgba(255,255,255,0);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(255,255,255,.82);
  border-bottom-color: var(--line);
}
.nav__brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: .02em;
  font-size: 22px;
}
.nav__brand-dot { color: var(--blue); }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-weight: 600;
  font-size: 15px;
  color: var(--grey-2);
  transition: color .2s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav__links { display: none; } }

/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
  will-change: transform;
}
.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,130,200,.28);
}
.btn--primary:hover { background: var(--blue-600); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,130,200,.34); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ============ hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 140px clamp(20px,5vw,60px) 40px;
  overflow: hidden;
  isolation: isolate;
}
.hero__inner { margin: auto 0; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at top, #f4faff 0%, #ffffff 55%, #ffffff 100%);
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  animation: drift 18s ease-in-out infinite alternate;
}
.hero__glow--a {
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(0,130,200,.45), rgba(0,130,200,0) 65%);
  top: -120px; left: -140px;
}
.hero__glow--b {
  width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(0,130,200,.28), rgba(0,130,200,0) 65%);
  bottom: -160px; right: -120px;
  animation-delay: -6s;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(40px,-30px,0) scale(1.08); }
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(11,11,13,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,11,13,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
}

.hero__inner { position: relative; max-width: 900px; text-align: center; }
.hero__title {
  font-size: clamp(48px, 9vw, 120px);
  line-height: .95;
  letter-spacing: -.02em;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero__lede {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--grey-2);
  max-width: 600px;
  margin: 0 auto 36px;
}
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero__scroll {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}
.hero__scroll-label {
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--grey-1);
}
.hero__scroll-track {
  position: relative;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(145,147,147,.15), rgba(145,147,147,.55), rgba(145,147,147,.15));
  overflow: hidden;
  border-radius: 1px;
}
.hero__scroll-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  height: 10px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--blue);
  animation: scrollDrop 2.4s cubic-bezier(.65,.05,.36,1) infinite;
}
@keyframes scrollDrop {
  0%   { top: -10px; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { top: 48px;  opacity: 0; }
}
@media (max-width: 640px) { .hero__scroll { display: none; } }

/* ============ sections ============ */
.section {
  padding: clamp(80px, 12vw, 140px) clamp(20px, 5vw, 60px);
  max-width: var(--container);
  margin: 0 auto;
}
.section__head { max-width: 780px; margin-bottom: 64px; }
.section__title {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin-bottom: 18px;
}
.section__lede { font-size: 18px; color: var(--grey-2); max-width: 640px; }

/* ============ community stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2,1fr); } }
.stat {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(0,130,200,.25); }
.stat__num {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -.02em;
}
.stat__label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--grey-2);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
}

/* ============ filter ============ */
.filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 36px;
  padding: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
}
.filter__btn {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--grey-2);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.filter__btn:hover { color: var(--ink); }
.filter__btn.is-active { background: var(--ink); color: #fff; }

/* ============ community grid ============ */
.community__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.ccard {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(16px);
  animation: cardIn .6s var(--ease) forwards;
}
@keyframes cardIn { to { opacity: 1; transform: none; } }
.ccard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(0,130,200,.3); }

.ccard__top { display: flex; align-items: center; gap: 12px; }
.ccard__flag {
  font-size: 22px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--bg-soft);
  border-radius: 10px;
}
.ccard__country {
  font-family: var(--font-head);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--grey-2);
}
.ccard__title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.005em;
}
.ccard__type {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-050);
  color: var(--blue-600);
  width: fit-content;
}
.ccard__type--premium { background: #fff3d9; color: #8a6200; }
.ccard__type--community { background: #eaf7ee; color: #1f7a3a; }

.ccard__meta { font-size: 14px; color: var(--grey-2); }
.ccard__links { display: flex; gap: 12px; margin-top: auto; padding-top: 8px; }
.ccard__links a {
  font-size: 13px; font-weight: 600; color: var(--blue);
}
.ccard__links a:hover { color: var(--blue-600); }

/* ============ projects ============ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.project {
  position: relative;
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #f8fbfe);
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  overflow: hidden;
  isolation: isolate;
}
.project::before {
  content: "";
  position: absolute; inset: auto -20% -60% auto;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(0,130,200,.2), rgba(0,130,200,0) 65%);
  filter: blur(30px);
  z-index: -1;
  transition: opacity .4s var(--ease);
  opacity: .6;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(0,130,200,.3); }
.project:hover::before { opacity: 1; }
.project__badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-050);
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.project__title {
  font-size: 34px;
  margin-bottom: 12px;
}
.project__desc { color: var(--grey-2); margin: 0 0 24px; }
.project__link {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--blue);
  letter-spacing: .02em;
}

/* ============ about ============ */
.about { text-align: center; }
.about__inner { max-width: 760px; margin: 0 auto; }
.about .section__lede { margin-left: auto; margin-right: auto; }

/* ============ footer ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px clamp(20px,5vw,60px);
  background: var(--bg-soft);
}
.footer__inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.footer__brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
}
.footer__note { color: var(--grey-2); font-size: 14px; margin: 0; }
.footer__note a { color: var(--blue); font-weight: 600; }
.footer__copy { color: var(--grey-1); font-size: 13px; margin: 0; }

/* ============ reveal-on-scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
