@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-2: #111111;
  --surface: #161616;
  --text: #f2ece3;
  --muted: #a8a096;
  --dim: #6f6a62;
  --border: rgba(242, 236, 227, 0.1);
  --blue: #4a9eff;
  --blue-dim: rgba(74, 158, 255, 0.15);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --nav-height: 4.25rem;
  --max: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

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

::selection {
  background: var(--blue);
  color: var(--bg);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 15% 0%, rgba(74, 158, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(255, 107, 53, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(74, 158, 255, 0.06), transparent 55%);
}

.bg-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Nav --- */

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s;
}

.site-nav.is-scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.site-nav__inner {
  width: min(var(--max), 100% - 2rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-nav__logo img {
  height: 36px;
  width: auto;
}

.site-nav__logo span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.site-nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.site-nav__links a:hover,
.site-nav__links a.is-active {
  color: var(--text);
}

.nav-cta {
  display: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s, color 0.2s;
}

.nav-cta:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.site-nav__toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .nav-cta {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .site-nav__toggle {
    display: block;
  }

  .site-nav__links {
    position: fixed;
    inset: var(--nav-height) 1rem auto;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease);
  }

  .site-nav__links.is-open {
    transform: translateY(8px);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__links a {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
  }
}

/* --- Layout --- */

.section {
  width: min(var(--max), 100% - 2rem);
  margin: 0 auto;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1rem;
}

/* --- Hero --- */

.hero {
  min-height: 92vh;
  min-height: 92dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-height) + 2rem) 0 4rem;
}

.hero__brand {
  margin-bottom: 2rem;
}

.hero__brand img {
  width: min(280px, 72vw);
  height: auto;
}

.hero__brand img {
  width: min(300px, 78vw);
  height: auto;
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 16ch;
}

.hero__title em {
  font-style: italic;
  color: var(--blue);
}

.hero__lead {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 2rem;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s;
}

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

.btn--primary {
  background: var(--blue);
  color: var(--bg);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--blue);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.85rem;
  color: var(--dim);
  font-weight: 500;
}

/* --- Motto --- */

.motto {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.motto__quote {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 22ch;
}

.motto__quote em {
  font-style: italic;
  color: var(--blue);
}

.motto__sub {
  margin: 1.25rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.motto__sub strong {
  color: var(--text);
  font-weight: 600;
}

/* --- About --- */

.about {
  padding: 5rem 0 6rem;
  border-top: 1px solid var(--border);
}

.about__heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
}

.about__intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.about__avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--border);
}

.about__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.about__name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.about__role {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: var(--dim);
}

.about__content p {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0 0 1.15rem;
  line-height: 1.75;
  max-width: 40rem;
}

.about__content strong {
  color: var(--text);
  font-weight: 600;
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* --- Work --- */

.work {
  padding: 5rem 0 6rem;
  border-top: 1px solid var(--border);
}

.work__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.project-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.25rem;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.project-card:hover {
  border-color: rgba(74, 158, 255, 0.35);
  transform: translateY(-2px);
}

.project-card--static {
  border-style: dashed;
  opacity: 0.92;
}

.project-card--static .project-card__link {
  color: var(--muted);
}

.project-card--community,
.project-card--static {
  background: linear-gradient(145deg, var(--surface), rgba(74, 158, 255, 0.04));
}

/* --- Community --- */

.community {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.community__panel {
  background: linear-gradient(145deg, rgba(74, 158, 255, 0.08), rgba(255, 107, 53, 0.04));
  border: 1px solid rgba(74, 158, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.community__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.community__lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.25rem;
  max-width: 44rem;
}

.community__list {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  color: var(--text);
  line-height: 1.7;
}

.community__list li {
  margin-bottom: 0.35rem;
}

.community__story {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 0 1rem;
  max-width: 44rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--blue);
}

.community__note {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dim);
}

.community__note a {
  color: var(--blue);
}

.project-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.project-card__num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.08em;
}

.project-card__status {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.project-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 0.85rem;
}

.project-card__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
}

/* --- Pillars --- */

.pillars {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.pillars__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .pillars__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.pillar h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 0.85rem;
}

.pillar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pillar li {
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.25rem 0;
  color: var(--text);
}

.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.pillar a {
  color: var(--blue);
  font-weight: 600;
}

/* --- Contact --- */

.contact {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.contact__title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.contact__lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
  max-width: 32rem;
}

.contact__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 0.15rem;
  transition: gap 0.25s var(--ease);
}

.contact__cta:hover {
  gap: 0.75rem;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}

.contact__links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}

.contact__links a:hover {
  color: var(--text);
}

/* --- Footer --- */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--dim);
}

.site-footer__inner {
  width: min(var(--max), 100% - 2rem);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

/* --- Reveal --- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Subpages --- */

.page-sub {
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 4rem;
}

.page-sub .wrap {
  width: min(var(--max), 100% - 2rem);
  margin: 0 auto;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}

.back:hover {
  color: var(--blue);
}

.prose {
  max-width: 42rem;
}

.prose h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.prose h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--muted);
  line-height: 1.65;
}

.prose .lead {
  font-size: 0.95rem;
  color: var(--dim);
}

.prose a {
  color: var(--blue);
  font-weight: 600;
}

.product-hero .eyebrow {
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.product-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.product-hero .lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 0.5rem;
}

.product-note {
  color: var(--dim);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.btn-primary {
  background: #ef476f;
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.product-card-page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
}

.product-card-page h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.product-card-page ul {
  color: var(--muted);
  padding-left: 1.2rem;
  margin: 0;
  line-height: 1.65;
}

.disclaimer {
  background: rgba(239, 71, 111, 0.08);
  border: 1px solid rgba(239, 71, 111, 0.22);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}

.disclaimer p {
  color: #ffb4c4;
  font-size: 0.9rem;
  margin: 0;
}
