/* ===== CSS Variables — BASE CLUB inspired ===== */
:root {
  --blue-primary: #0038FF;
  --blue-dark: #002BB8;
  --lime: #CCFF00;
  --lime-dark: #B8E600;
  --cream: #F7F7F7;
  --cream-dark: #EEEEEE;
  --gray-card: #F0F0F0;
  --ink: #0A0A0A;
  --ink-muted: #5C5C5C;
  --white: #FFFFFF;
  --border: #E0E0E0;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius-card: 24px;
  --radius-pill: 999px;
  --container: 1200px;
  --nav-height: 72px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== Utilities ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.5625rem, 3.5vw, 2.375rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.section-desc {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--ink-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pill--accent {
  background: var(--lime);
  color: var(--ink);
}

.pill--blue {
  background: rgba(0, 56, 255, 0.1);
  color: var(--blue-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 800;
  transition: transform 0.2s;
}

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

.btn--primary {
  background: var(--lime);
  color: var(--ink);
  border: 2px solid var(--ink);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
}

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover, .case-study__arrow:hover { transform: none; }
  .architecture__figure:hover img { transform: none; }
  .back-to-top, .back-to-top:hover { transform: none; transition: none; }
  .case-study__showcases { transition: none; }
  .case-study__carousel:hover .case-study__viewport { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05); }
}

/* ===== Navigation ===== */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav--scrolled {
  position: fixed;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav--scrolled .nav__logo-bubble {
  box-shadow: none;
}

.nav--scrolled .nav__link {
  color: var(--ink);
}

.nav--scrolled .nav__link:hover {
  color: var(--blue-primary);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.nav__logo {
  flex-shrink: 0;
}

.nav__logo-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav__logo-bubble {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  line-height: 1;
}

.nav__logo-bubble--white {
  background: var(--white);
  color: var(--ink);
  position: relative;
  z-index: 2;
  margin-right: -8px;
}

.nav__logo-bubble--lime {
  background: var(--lime);
  color: var(--ink);
  padding-left: 18px;
}

.nav--scrolled .nav__logo-bubble--white {
  background: var(--white);
  color: var(--ink);
}

.nav--scrolled .nav__logo-bubble--lime {
  background: var(--lime);
  color: var(--ink);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.nav__link {
  position: relative;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--white);
  padding: 4px 0;
  transition: color 0.2s;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s;
}

.nav__link:hover::after {
  transform: scaleX(1);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav--scrolled .nav__burger span {
  background: var(--ink);
}

.nav--open .nav__burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav--open .nav__burger span:nth-child(2) {
  opacity: 0;
}

.nav--open .nav__burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero — BASE CLUB replica ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--blue-primary);
  overflow: hidden;
  padding: calc(var(--nav-height) + 24px) 24px 80px;
}

.hero__grid,
.footer__grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.14) 0px, rgba(255,255,255,0.14) 1px, transparent 1px, transparent 56px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.14) 0px, rgba(255,255,255,0.14) 1px, transparent 1px, transparent 56px);
  pointer-events: none;
}

.hero__stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
  min-height: clamp(420px, 62vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__title,
.footer__title {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  font-weight: 900;
  line-height: 0.88;
  user-select: none;
  pointer-events: none;
}

.hero__title {
  font-size: clamp(3.125rem, 9.5vw, 7.25rem);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.hero__title-line {
  display: block;
}

.hero__hash,
.footer__hash {
  color: var(--lime);
}

.hero__eyebrow {
  position: relative;
  z-index: 4;
  margin: 0 0 12px;
  text-align: center;
  color: var(--lime);
  font-size: clamp(0.8125rem, 2.2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__subtitle,
.footer__tagline {
  position: relative;
  z-index: 4;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.875rem, 2vw, 1.0625rem);
  font-weight: 600;
  line-height: 1.65;
  max-width: 560px;
}

.hero__subtitle {
  margin-top: 32px;
}

/* Glass cards */
.hero__glass {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 14px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  min-width: 220px;
}

.hero__glass--1 {
  top: 8%;
  right: -5%;
  transform: rotate(2deg);
}

.hero__glass--2 {
  bottom: 1%;
  left: -4%;
  transform: rotate(-3deg);
}

.hero__glass-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background-size: cover;
  background-position: center top;
}

.hero__glass-avatar--a {
  background-color: var(--cream-dark);
}

.hero__glass-avatar--b {
  background-color: var(--cream-dark);
}

.hero__glass-avatar--cat {
  background-position: 28% 72%;
}

.hero__glass-name {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
}

.hero__glass-stat {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
}

/* Doodles */
.hero__doodle,
.footer__doodle {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  color: var(--lime);
}

.hero__doodle--hash {
  top: 6%;
  left: 2%;
  width: clamp(48px, 8vw, 88px);
  height: auto;
  animation: float-hash 5s ease-in-out infinite;
}

.hero__doodle--arrow-1 {
  top: 4%;
  right: 12%;
  width: clamp(56px, 9vw, 96px);
  transform: rotate(15deg);
  animation: float-arrow-1 4.5s ease-in-out infinite;
}

.hero__doodle--arrow-2 {
  bottom: 4%;
  left: 8%;
  width: clamp(56px, 9vw, 96px);
  transform: rotate(195deg) scaleX(-1);
  animation: float-arrow-2 5.5s ease-in-out infinite 0.5s;
}

@keyframes float-hash {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes float-arrow-1 {
  0%, 100% { transform: rotate(15deg) translateY(0); }
  50% { transform: rotate(15deg) translateY(-12px); }
}

@keyframes float-arrow-2 {
  0%, 100% { transform: rotate(195deg) scaleX(-1) translateY(0); }
  50% { transform: rotate(195deg) scaleX(-1) translateY(-10px); }
}

/* Circular CTA badge */
.hero__badge {
  position: absolute;
  z-index: 4;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(100px, 14vw, 140px);
  height: clamp(100px, 14vw, 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  transition: transform 0.25s;
  overflow: visible;
}

.hero__badge:hover {
  transform: translateY(-50%) scale(1.06);
}

.hero__badge-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin-slow 18s linear infinite;
}

.hero__badge-text {
  fill: var(--ink);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: 'Nunito', sans-serif;
}

.hero__badge-center {
  position: relative;
  z-index: 1;
  width: 44%;
  height: 44%;
  background: var(--lime);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__badge-ring,
  .hero__doodle--hash,
  .hero__doodle--arrow-1,
  .hero__doodle--arrow-2,
  .footer__doodle--hash,
  .footer__doodle--arrow {
    animation: none;
  }
}

/* ===== Pain Points (overlap section) ===== */
.pain-points {
  position: relative;
  margin-top: -56px;
  background: var(--white);
  border-radius: 40px 40px 0 0;
  z-index: 3;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.08);
}

.pain-points .section-title {
  text-transform: none;
  font-weight: 800;
}

.pain-points__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}

.pain-card {
  padding: 36px 28px;
  text-align: center;
  background: var(--gray-card);
  border: none;
  border-radius: 28px;
}

.pain-card:hover {
  background: var(--cream-dark);
  transform: none;
  box-shadow: none;
}

.pain-card__num {
  display: inline-block;
  margin-bottom: 16px;
}

.pain-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--blue-primary);
}

.pain-card__title {
  font-size: 1.125rem;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.pain-card__desc {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.pain-points__arrows {
  display: none;
}

@media (min-width: 1024px) {
  .pain-points__grid {
    gap: 32px;
  }

  .pain-points__arrows {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
  }

  .pain-points__arrow {
    position: absolute;
    color: var(--ink);
    width: 40px;
    height: 20px;
    opacity: 0.5;
  }

  .pain-points__arrow--1 { left: 31%; }
  .pain-points__arrow--2 { left: 64%; }
}

/* ===== Architecture ===== */
.architecture {
  background: var(--white);
  padding-bottom: 128px;
}

.architecture__figure {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid #ECECEC;
  border-radius: 28px;
  overflow: hidden;
  background: var(--white);
  cursor: pointer;
  transition: background 0.25s;
  padding: 16px 20px 28px;
}

.architecture__figure img {
  width: 94%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform 0.35s ease;
}

.architecture__figure:hover img {
  transform: scale(1.015);
}

.architecture__figure--intro {
  padding: 12px 14px 20px;
}

.architecture__figure--intro img {
  width: 100%;
}

.architecture__intro {
  margin-bottom: 40px;
}

.architecture__intro-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 32px;
}

.architecture__intro-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.architecture__intro-desc {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.architecture__connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px auto 32px;
  gap: 12px;
}

.architecture__connector::before,
.architecture__connector::after {
  content: '';
  width: 2px;
  height: 24px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border) 0px,
    var(--border) 6px,
    transparent 6px,
    transparent 12px
  );
}

.architecture__connector-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-primary);
  padding: 6px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--gray-card);
}

/* ===== Case Study ===== */
.case-study {
  position: relative;
  margin-top: -40px;
  background: var(--cream);
  border-radius: 40px 40px 0 0;
  z-index: 4;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.06);
}

.case-study .section-title {
  text-transform: none;
}

.case-study__carousel {
  position: relative;
  max-width: calc(1040px + 40px * 2 + 16px * 2);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-study__stage {
  display: flex;
  align-items: center;
  gap: 16px;
}

.case-study__viewport {
  flex: 1;
  min-width: 0;
  max-width: 1040px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.25s;
}

.case-study__carousel:hover .case-study__viewport {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.case-study__showcases {
  display: flex;
  flex-direction: row;
  transition: transform 0.45s ease;
  will-change: transform;
}

.case-study__figure {
  flex: 0 0 100%;
  min-width: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: none;
}

.case-study__arrow {
  flex-shrink: 0;
  align-self: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  color: var(--blue-primary);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.case-study__arrow--prev svg {
  transform: rotate(180deg);
}

.case-study__arrow:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: scale(1.04);
}

.case-study__arrow:focus-visible {
  box-shadow:
    0 0 0 2px var(--blue-primary),
    0 4px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.case-study__pager {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.case-study__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.case-study__dot.active {
  background: var(--lime);
  transform: scale(1.15);
}

.case-study__figure img {
  width: 96%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 16px;
  cursor: pointer;
}

.case-study__figure--02 {
  padding-bottom: 8px;
}

.case-study__figure--02 img {
  width: 92%;
  margin-bottom: 24px;
}

.case-study__caption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
}

.case-study__case-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* ===== Comparison ===== */
.comparison {
  background: var(--white);
}

.comparison .section-title {
  text-transform: none;
}

.comparison__table {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--white);
  border-radius: 28px;
  overflow: hidden;
  table-layout: fixed;
}

.comparison__table th,
.comparison__table td {
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.comparison__table thead th {
  background: var(--cream-dark);
  font-size: 0.9375rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-transform: none;
}

.comparison__table tbody th {
  background: var(--white);
  font-size: 0.9375rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-transform: none;
}

.comparison__table td {
  background: var(--white);
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.comparison__table th:first-child {
  width: 20%;
}

.comparison__table thead th:nth-child(2),
.comparison__table thead th:nth-child(3) {
  width: 40%;
}

.comparison__table tr:last-child td,
.comparison__table tr:last-child th {
  border-bottom: none;
}

.comparison__table tr.highlight td,
.comparison__table tr.highlight th {
  background: var(--lime);
  color: var(--ink);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.comparison__cards {
  display: none;
}

/* ===== Tech Stack ===== */
.tech-stack {
  background: var(--cream);
}

.tech-stack .section-title {
  text-transform: none;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tech-card {
  padding: 28px 24px;
  text-align: center;
  background: var(--white);
  border: none;
  border-radius: 28px;
}

.tech-card:hover {
  background: var(--cream-dark);
  transform: none;
  box-shadow: none;
}

.tech-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--blue-primary);
}

.tech-card__name {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.tech-card__desc {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.tech-skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 28px;
  border: none;
}

.tech-skill {
  position: relative;
  padding: 24px 28px;
  text-align: left;
}

.tech-skill:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.5px;
  height: 52%;
  background: rgba(0, 0, 0, 0.08);
}

.tech-skill__name {
  margin: 12px 0 8px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tech-skill__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  overflow: hidden;
  background: var(--blue-primary);
  padding: 48px 24px 40px;
  text-align: center;
}

.footer__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer__stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 36px;
}

.footer__title {
  font-size: clamp(0.9375rem, 2.2vw, 1.0625rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.3;
}

.footer__doodle--hash {
  top: -4px;
  left: -8px;
  width: clamp(28px, 5vw, 48px);
  height: auto;
  animation: float-hash 5s ease-in-out infinite;
}

.footer__doodle--arrow {
  top: 10px;
  bottom: auto;
  right: 0;
  width: clamp(32px, 5vw, 56px);
  height: auto;
  transform: rotate(195deg) scaleX(-1);
  animation: float-arrow-2 5.5s ease-in-out infinite 0.5s;
}

.footer__tagline {
  margin: 10px auto 0;
  font-size: clamp(0.6875rem, 1.5vw, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.72);
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 20, 80, 0.92);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.active {
  display: flex;
}

.lightbox__img {
  max-height: 90vh;
  max-width: 90vw;
  border-radius: 16px;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border: 2px solid var(--ink);
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

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

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.back-to-top--visible:hover {
  transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .nav__links {
    gap: 16px;
  }

  .nav__link {
    font-size: 0.75rem;
  }

  .hero__stage {
    min-height: clamp(380px, 55vh, 520px);
  }

  .hero__glass {
    min-width: 190px;
    padding: 12px 16px 12px 12px;
  }

  .hero__glass--1 {
    top: 4%;
    right: -7%;
  }

  .hero__glass--2 {
    bottom: 0;
    left: -5%;
  }

  .hero__badge {
    right: -4%;
    width: 100px;
    height: 100px;
  }

  .hero__doodle--hash {
    left: -2%;
    width: 56px;
  }

  .pain-points__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

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

  .tech-skills {
    grid-template-columns: 1fr;
  }

  .tech-skill:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 52%;
    height: 0.5px;
  }

  .architecture__figure {
    max-width: 100%;
  }

  .architecture__figure--intro {
    max-width: 100%;
  }

  .architecture__connector {
    margin: 32px auto 24px;
  }

  .case-study__carousel {
    max-width: 100%;
  }

  .case-study__stage {
    gap: 10px;
  }

  .case-study__arrow {
    width: 36px;
    height: 36px;
  }

  .case-study__figure img {
    width: 96%;
    margin-bottom: 12px;
  }

  .case-study__figure--02 img {
    width: 92%;
    margin-bottom: 20px;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 64px 0;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    padding: 7px 12px;
    font-size: 0.6875rem;
  }

  .architecture {
    padding-bottom: 96px;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 12px;
    box-shadow: var(--shadow);
  }

  .nav--open .nav__links {
    display: flex;
  }

  .nav--open .nav__link {
    color: var(--ink);
    font-size: 1rem;
    width: 100%;
    text-align: center;
    padding: 8px 0;
  }

  .nav__burger {
    display: flex;
  }

  .hero {
    padding-bottom: 64px;
  }

  .hero__title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hero__glass--1,
  .hero__glass--2 {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 320px;
    margin: 12px auto 0;
  }

  .hero__stage {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
  }

  .hero__glass--1 { order: 2; }
  .hero__title { order: 1; }
  .hero__glass--2 { order: 3; }

  .hero__badge {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    margin: 24px auto 0;
    order: 4;
  }

  .hero__badge:hover {
    transform: scale(1.06);
  }

  .footer {
    padding: 40px 20px 32px;
  }

  .footer__title {
    font-size: clamp(0.9375rem, 3.5vw, 1rem);
  }

  .footer__doodle--hash {
    width: 24px;
    left: 0;
    opacity: 0.35;
  }

  .footer__doodle--arrow {
    width: 28px;
    top: 10px;
    bottom: auto;
    right: 4px;
    opacity: 0.35;
  }

  .footer__tagline {
    margin-top: 10px;
    padding: 0 8px;
  }

  .hero__doodle--arrow-1 { right: 4%; width: 48px; }
  .hero__doodle--arrow-2 { left: 4%; width: 48px; }
  .hero__doodle--hash { width: 40px; top: 2%; }

  .hero__eyebrow {
    padding: 0 16px;
    margin-bottom: 8px;
  }

  .hero__subtitle {
    margin-top: 20px;
    padding: 0 8px;
  }

  .nav__links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero__doodle--arrow-1,
  .hero__doodle--arrow-2,
  .hero__doodle--hash {
    opacity: 0.35;
  }

  .case-study {
    margin-top: -32px;
    border-radius: 28px 28px 0 0;
  }

  .case-study__stage {
    gap: 8px;
  }

  .case-study__arrow {
    width: 32px;
    height: 32px;
  }

  .case-study__arrow svg {
    width: 16px;
    height: 16px;
  }

  .architecture__figure,
  .case-study__viewport {
    border-radius: 20px;
  }

  .case-study__figure img {
    width: 98%;
    margin-bottom: 12px;
  }

  .case-study__figure--02 img {
    width: 94%;
    margin-bottom: 20px;
  }

  .case-study__caption {
    flex-wrap: wrap;
    padding: 16px 20px 12px;
  }

  .comparison__table {
    display: none;
  }

  .comparison__cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
  }

  .comparison-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 28px;
    overflow: hidden;
    background: var(--white);
  }

  .comparison-card__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .comparison-card__cell {
    padding: 18px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ink-muted);
    background: var(--white);
  }

  .comparison-card__cell--label {
    background: var(--white);
    font-size: 0.9375rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--ink);
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .comparison-card__cell--manual {
    background: var(--white);
    color: var(--ink-muted);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
  }

  .comparison-card--total {
    background: var(--lime);
  }

  .comparison-card--total .comparison-card__cell {
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: var(--ink);
  }

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

@media (min-width: 1024px) and (max-width: 1100px) {
  .nav__links {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .nav--open .nav__links {
    display: flex;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 12px;
    box-shadow: var(--shadow);
  }

  .nav--open .nav__link {
    color: var(--ink);
  }
}
