:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --ink: #0e1424;
  --ink-soft: #4a5470;
  --muted: #8892ab;
  --line: #e6e9f2;
  --grad-1: #6f5cff;
  --grad-2: #21c4ff;
  --grad-3: #ff5cc9;
  --accent: #1a1f36;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ─── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-logo {
  width: 1.6em;
  height: 1.6em;
  display: block;
}
.nav-links {
  display: flex; gap: 28px; align-items: center;
  font-size: 14px; color: var(--ink-soft); font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(14, 20, 36, 0.18);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { padding: 12px 16px; }
  .brand { font-size: 18px; }
  .btn { padding: 9px 14px; font-size: 13px; }
}

/* ─── Hero ────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 24px 56px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% 0 auto 0;
  height: 60%;
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(111,92,255,0.18), transparent 60%),
    radial-gradient(50% 50% at 80% 10%, rgba(33,196,255,0.18), transparent 60%),
    radial-gradient(40% 40% at 50% 80%, rgba(255,92,201,0.14), transparent 60%);
  filter: blur(20px);
  z-index: -1;
}
.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 22px;
}
.hero h1 {
  margin: 0 auto;
  max-width: 900px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2) 50%, var(--grad-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rotator {
  display: inline-block;
  min-width: 5ch;
  text-align: left;
}
.hero p.sub {
  margin: 22px auto 0;
  max-width: 620px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.hero-cta {
  margin-top: 32px;
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Swiper section ──────────────────────────────── */
.showcase {
  padding: 32px 0 96px;
  position: relative;
}
.showcase-head {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.showcase-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.showcase-head p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 520px;
}
/* shell wraps the swiper and the two side arrows */
.swiper-shell {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.swiper-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  z-index: 10;
  box-shadow: 0 8px 24px -8px rgba(20, 30, 60, 0.18);
  transition: background 0.15s, transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.swiper-btn:hover {
  background: var(--bg-soft);
  border-color: #cfd5e6;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 12px 28px -8px rgba(20, 30, 60, 0.24);
}
.swiper-btn:active { transform: translateY(-50%) scale(0.96); }
.swiper-btn.swiper-button-disabled { opacity: 0.4; pointer-events: none; }
.swiper-btn svg { width: 20px; height: 20px; }
#prev { left: 8px; }
#next { right: 8px; }
@media (max-width: 720px) {
  .swiper-btn { width: 38px; height: 38px; }
  .swiper-btn svg { width: 16px; height: 16px; }
  #prev { left: 4px; }
  #next { right: 4px; }
  .swiper-shell { padding: 0 8px; }
  /* On mobile, show exactly one demo at a time — no peek of the neighbours. */
  .demo-swiper { overflow: hidden !important; }
  .demo-swiper .swiper-slide {
    opacity: 1;
    transform: none;
  }
}

.demo-swiper {
  padding: 24px 0 60px !important;
  overflow: visible !important;
}
.demo-swiper .swiper-wrapper {
  align-items: stretch;
}
.demo-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.demo-swiper .swiper-slide-prev,
.demo-swiper .swiper-slide-next {
  opacity: 0.45;
  pointer-events: auto;
}
.demo-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
  z-index: 5;
  pointer-events: auto;
}

.demo-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.demo-tag {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.demo-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}
.demo-sub {
  margin: -10px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

/* Phone frame */
.phone {
  width: 320px;
  height: 660px;
  background: #0b0d12;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 0 0 1.5px #2a2d36,
    0 30px 80px -20px rgba(20, 30, 60, 0.35),
    0 10px 30px -10px rgba(20, 30, 60, 0.18);
  position: relative;
}
.square { position: relative; }
.demo-open-overlay {
  position: absolute;
  inset: 12px;
  border-radius: 32px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
}
.square .demo-open-overlay {
  inset: 10px;
  border-radius: 14px;
}
.demo-open-overlay:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}
.phone::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 24px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}
.phone iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 32px;
  background: #000;
  display: block;
}

/* Square / tablet frame for non-mobile demos */
.square {
  width: 460px;
  height: 460px;
  background: #0b0d12;
  border-radius: 22px;
  padding: 10px;
  box-shadow:
    0 0 0 1.5px #2a2d36,
    0 30px 80px -20px rgba(20, 30, 60, 0.35),
    0 10px 30px -10px rgba(20, 30, 60, 0.18);
}
.square iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 14px;
  background: #000;
  display: block;
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.open-link:hover {
  background: var(--bg-soft);
  border-color: #cfd5e6;
  transform: translateY(-1px);
}
.open-link svg { width: 13px; height: 13px; }

.swiper-pagination {
  bottom: 0 !important;
}
.swiper-pagination-bullet {
  background: #cfd5e6 !important;
  opacity: 1 !important;
  width: 8px !important; height: 8px !important;
  transition: width 0.3s;
}
.swiper-pagination-bullet-active {
  background: var(--ink) !important;
  width: 28px !important;
  border-radius: 999px !important;
}

@media (max-width: 640px) {
  .phone { width: 260px; height: 540px; }
  .square { width: 280px; height: 280px; margin-top: 0; }
  .hero { padding: 56px 20px 32px; }
  .showcase { padding: 16px 0 64px; }
  .showcase-head { margin-bottom: 16px; padding: 0 20px; }
  .demo-card { gap: 14px; }
  .demo-swiper { padding: 12px 0 48px !important; }
}
@media (max-width: 380px) {
  .phone { width: 240px; height: 500px; }
  .square { width: 240px; height: 240px; }
}

/* ─── About ───────────────────────────────────────── */
.about {
  padding: 32px 24px 96px;
  max-width: 1100px;
  margin: 0 auto;
}
.about-head {
  text-align: center;
  margin-bottom: 48px;
}
.about-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.about-head p {
  margin: 12px auto 0;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}
.team-photo {
  display: block;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 64px;
  border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(20, 30, 60, 0.25);
}
.founders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 72px;
}
@media (max-width: 720px) {
  .founders { grid-template-columns: 1fr; }
}
.founder {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
}
.founder img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
  box-shadow: 0 12px 30px -10px rgba(20, 30, 60, 0.22);
}
.founder h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.founder .role {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}
.founder p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.founder a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.founder a:hover { border-color: var(--ink); }
.founders-note {
  grid-column: 1 / -1;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 48px;
  margin: 0 auto;
  max-width: 90%;
  text-align: center;
  position: relative;
}
.founders-note::before {
  content: "\201C";
  position: absolute;
  top: -8px;
  left: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 96px;
  line-height: 1;
  color: var(--ink-soft);
  opacity: 0.35;
  pointer-events: none;
} 
.founders-note p {
  margin: 0;
  color: var(--ink-soft);
  /* font-family: Georgia, "Times New Roman", serif; */
  /* font-style: italic; */
  font-size: 22px;
  line-height: 1.6;
}
.founders-note strong {
  color: var(--ink);
  font-weight: 600;
  font-style: normal;
}
.founder .affiliation-logo {
  width: auto;
  max-height: 150px;
  max-width: 75%;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
  margin: 20px auto 0;
  display: block;
}

.projects h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
}
.projects > p.lead {
  text-align: center;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 720px) {
  .project-list { grid-template-columns: 1fr; }
}
.project {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}
.project .tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.project h4 {
  margin: 6px 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.project p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ─── Careers ─────────────────────────────────────── */
.careers {
  padding: 32px 24px 96px;
  max-width: 1100px;
  margin: 0 auto;
}
.careers-head {
  text-align: center;
  margin-bottom: 40px;
}
.careers-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.careers-head p {
  margin: 12px auto 0;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}
.job-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  max-width: 820px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .job-card { padding: 24px; }
  .about, .careers { padding: 24px 20px 64px; }
  .team-photo { margin-bottom: 40px; }
  .founders { gap: 20px; margin-bottom: 48px; }
  .founder { padding: 22px; }
  .founder img { width: 110px; height: 110px; }
  .job-card h3 { font-size: 22px; }
}
.job-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.job-chip {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}
.job-card h3 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.job-card > p.job-lead {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}
.job-section-title {
  margin: 24px 0 10px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.job-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.job-card ul li { margin-bottom: 6px; }
.job-cta {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.job-cta .note {
  font-size: 13px;
  color: var(--muted);
}

/* ─── Blog ────────────────────────────────────────── */
.post {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 24px 80px;
}
.post-section {
  margin-bottom: 56px;
}
.post-section h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.post-section p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}
.post-section strong {
  color: var(--ink);
  font-weight: 600;
}
.post-section ol {
  margin: 0;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}
.post-section ol li {
  margin-bottom: 12px;
}
.genre-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
@media (max-width: 900px) {
  .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .genre-grid { grid-template-columns: 1fr; }
}
.genre-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.genre-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(20, 30, 60, 0.18);
  border-color: #cfd5e6;
}
.genre-emoji {
  display: inline-block;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 10px;
}
.genre-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.genre-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.cta-section {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  text-align: center;
}
.cta-section h2 {
  margin: 0 0 10px;
}
.cta-section p {
  max-width: 480px;
  margin: 0 auto 22px;
}
@media (max-width: 560px) {
  .post { padding: 8px 20px 56px; }
  .post-section { margin-bottom: 40px; }
  .cta-section { padding: 24px; }
}

/* ─── Demo modal ──────────────────────────────────── */
.demo-modal[hidden] { display: none; }
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.demo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 22, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.demo-modal-content {
  position: relative;
  z-index: 1;
  background: #0b0d12;
  border-radius: 24px;
  padding: 12px;
  box-shadow:
    0 0 0 1.5px #2a2d36,
    0 50px 100px -20px rgba(0, 0, 0, 0.55);
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 64px);
}
.demo-modal-content--phone {
  height: min(860px, calc(100vh - 64px));
  aspect-ratio: 320 / 660;
}
.demo-modal-content--square {
  height: min(640px, calc(100vh - 64px));
  width: min(640px, calc(100vw - 64px));
  aspect-ratio: 1 / 1;
}
.demo-modal-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: #000;
  display: block;
}
.demo-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.5);
  z-index: 2;
  transition: transform 0.15s ease, background 0.15s ease;
}
.demo-modal-close:hover { background: var(--bg-soft); transform: scale(1.06); }
.demo-modal-close:active { transform: scale(0.96); }
.demo-modal-close svg { width: 20px; height: 20px; }


/* ─── Footer ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ─── Floating background shapes ──────────────────── */
/* Shapes live in the gutters outside the 1400px content column so they
   never overlap with content. Hidden on narrower viewports. */
.twiddle-bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -999;
  overflow: hidden;
  pointer-events: none;
  --content-half: 700px;
  --gutter-pad: 16px;
}

.twiddle-shape {
  position: absolute;
  opacity: 0.08;
  animation: twiddle-float 18s infinite ease-in-out;
}

.twiddle-shape:nth-child(1) { top: 15%; right: calc(50% + var(--content-half) + var(--gutter-pad)); animation-duration: 22s; animation-delay: 0s; }
.twiddle-shape:nth-child(2) { top: 65%; left:  calc(50% + var(--content-half) + var(--gutter-pad)); animation-duration: 19s; animation-delay: -5s; }
.twiddle-shape:nth-child(3) { top: 80%; right: calc(50% + var(--content-half) + var(--gutter-pad)); animation-duration: 24s; animation-delay: -12s; }
.twiddle-shape:nth-child(4) { top: 20%; left:  calc(50% + var(--content-half) + var(--gutter-pad)); animation-duration: 28s; animation-delay: -7s; }

/* Need room for: content (1400px) + 2× (shape width ~120px + animation drift ~20px + pad 16px) */
@media (max-width: 1720px) {
  .twiddle-bg-shapes { display: none; }
}

@keyframes twiddle-float {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-70px) rotate(180deg); }
  100% { transform: translateY(0) rotate(360deg); }
}
