:root {
  --red: #ea4335;
  --red-deep: #c5221f;
  --blue: #4285f4;
  --green: #34a853;
  --yellow: #fbbc04;
  --ink: #1a1c1e;
  --ink-soft: #3c4043;
  --mist: #f8f9fa;
  --paper: #ffffff;
  --line: rgba(26, 28, 30, 0.08);
  --shadow: 0 24px 60px rgba(26, 28, 30, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 4.25rem;
  --page-pad: clamp(1.25rem, 4vw, 3rem);
  --content: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background: var(--mist);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

/* —— Nav —— */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 var(--page-pad);
  background: rgba(248, 249, 250, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(248, 249, 250, 0.94);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  z-index: 2;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links a {
  position: relative;
  padding: 0.35rem 0.15rem;
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}

.nav-links a:not(.nav-cta):hover,
.nav-links a:not(.nav-cta).active {
  color: var(--ink);
}

.nav-links a:not(.nav-cta).active::after {
  content: "";
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  bottom: -2px;
  height: 2px;
  background: var(--red);
  border-radius: 1px;
}

.nav-links a.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  padding: 0.65rem 1.35rem;
  min-height: 2.5rem;
  background: var(--red);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(234, 67, 53, 0.28);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.nav-links a.nav-cta:hover {
  background: var(--red-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(234, 67, 53, 0.35);
}

.nav-links a.nav-cta::after {
  display: none;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* —— Shared layout —— */
.section {
  width: min(var(--content), 100%);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--page-pad);
}

.page-hero {
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 7vh, 4.5rem));
  padding-bottom: clamp(2rem, 5vh, 3rem);
  background:
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(234, 67, 53, 0.14), transparent 55%),
    radial-gradient(ellipse 45% 40% at 10% 90%, rgba(66, 133, 244, 0.1), transparent 50%),
    var(--mist);
}

.page-hero .section {
  padding-top: 0;
  padding-bottom: 0;
}

.page-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.page-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  max-width: 18ch;
}

.page-lead {
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  color: var(--ink-soft);
  max-width: 36rem;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.7rem, 3.8vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* —— Buttons —— */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 28px rgba(234, 67, 53, 0.35);
}

.btn-primary:hover {
  background: var(--red-deep);
  box-shadow: 0 14px 36px rgba(234, 67, 53, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: #fff;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* —— Home hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 70% 20%, rgba(234, 67, 53, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(66, 133, 244, 0.14), transparent 50%),
    linear-gradient(165deg, #f1f3f4 0%, #e8eaed 45%, #f8f9fa 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg svg {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--content), 100%);
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(2.5rem, 6vh, 4rem)) var(--page-pad) clamp(3rem, 7vh, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 320px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy {
  text-align: left;
  max-width: 34rem;
  justify-self: start;
  animation: rise 0.9s var(--ease) both;
}

.hero-brand {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(3.2rem, 8vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.1rem;
  background: linear-gradient(120deg, var(--red) 0%, #d93025 40%, var(--ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.85rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 30rem;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.hero-visual {
  position: relative;
  justify-self: end;
  width: min(100%, 320px);
  animation: rise 1s var(--ease) 0.15s both;
}

.hero-phone {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 28px 48px rgba(26, 28, 30, 0.18));
  transition: transform 0.6s var(--ease);
}

.hero:hover .hero-phone {
  transform: translateY(-8px);
}

/* —— Features page —— */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}

.feature {
  padding: 1.75rem 0 0.5rem;
  border-top: 2px solid var(--ink);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.feature.visible {
  opacity: 1;
  transform: none;
}

.feature:nth-child(1) { border-color: var(--red); transition-delay: 0.05s; }
.feature:nth-child(2) { border-color: var(--blue); transition-delay: 0.12s; }
.feature:nth-child(3) { border-color: var(--green); transition-delay: 0.19s; }
.feature:nth-child(4) { border-color: var(--yellow); transition-delay: 0.26s; }
.feature:nth-child(5) { border-color: var(--red); transition-delay: 0.33s; }
.feature:nth-child(6) { border-color: var(--blue); transition-delay: 0.4s; }

.feature h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 1rem 0 0.5rem;
}

.feature p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2.5rem, 6vh, 4rem) 0;
  border-top: 1px solid var(--line);
}

.feature-detail:first-of-type {
  border-top: none;
  padding-top: 0;
}

.feature-detail.reverse {
  direction: rtl;
}

.feature-detail.reverse > * {
  direction: ltr;
}

.feature-detail-copy h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.feature-detail-copy p {
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.feature-panel {
  min-height: 220px;
  border-radius: 20px;
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(26, 28, 30, 0.06);
}

.feature-panel.red {
  background: linear-gradient(145deg, #fff 40%, rgba(234, 67, 53, 0.08));
}

.feature-panel.blue {
  background: linear-gradient(145deg, #fff 40%, rgba(66, 133, 244, 0.1));
}

.feature-panel.green {
  background: linear-gradient(145deg, #fff 40%, rgba(52, 168, 83, 0.1));
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: #f1f3f4;
  color: var(--ink-soft);
}

.chip.on {
  background: rgba(234, 67, 53, 0.12);
  color: var(--red-deep);
}

/* —— Download page —— */
.platform-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.platform {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.35rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
  opacity: 0;
  transform: translateY(16px);
}

.platform.visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease),
    border-color 0.25s,
    box-shadow 0.25s;
}

.platform:hover {
  border-color: rgba(234, 67, 53, 0.35);
  box-shadow: 0 12px 32px rgba(26, 28, 30, 0.08);
  transform: translateY(-3px);
}

.platform-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #f1f3f4;
}

.platform-icon svg {
  width: 26px;
  height: 26px;
}

.platform-text {
  min-width: 0;
  flex: 1;
}

.platform strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.platform span {
  font-size: 0.85rem;
  color: #5f6368;
}

.platform .dl {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
  flex-shrink: 0;
}

.download-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.step {
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
}

.step-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.step p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* —— About page —— */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat {
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stat strong {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.stat span {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.about-list {
  list-style: none;
  margin-top: 1.5rem;
}

.about-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* —— CTA band —— */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1c1e 0%, #2d3136 55%, #3c2a2a 100%);
  color: #fff;
}

.cta-band::before {
  content: "";
  position: absolute;
  width: min(420px, 80vw);
  height: min(420px, 80vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 67, 53, 0.45), transparent 70%);
  top: -120px;
  right: -80px;
  animation: drift 10s ease-in-out infinite alternate;
}

.cta-band .section {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-band h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.cta-band .cta-row {
  justify-content: center;
}

.cta-band .btn-primary {
  box-shadow: 0 12px 36px rgba(234, 67, 53, 0.5);
}

.cta-band .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* —— Home preview strips —— */
.preview-strip {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.preview-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.preview-link {
  padding: 1.75rem 1.25rem;
  border-right: 1px solid var(--line);
  transition: background 0.25s var(--ease);
}

.preview-link:last-child {
  border-right: none;
}

.preview-link:hover {
  background: rgba(234, 67, 53, 0.04);
}

.preview-link strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.preview-link span {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.preview-link .arrow {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
}

/* —— Footer —— */
footer {
  padding: 1.75rem var(--page-pad);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: #5f6368;
  background: var(--paper);
}

footer .brand {
  font-size: 1rem;
  color: var(--ink);
}

footer .brand .brand-mark {
  width: 28px;
  height: 28px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

footer a:hover {
  color: var(--ink);
}

/* —— Motion —— */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-40px, 30px); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* —— Tablet —— */
@media (max-width: 960px) {
  .hero {
    min-height: auto;
    align-items: start;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 2.25rem;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-visual {
    justify-self: start;
    width: min(100%, 280px);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-detail,
  .feature-detail.reverse,
  .about-grid {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .download-steps {
    grid-template-columns: 1fr;
  }

  .preview-links {
    grid-template-columns: 1fr;
  }

  .preview-link {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .preview-link:last-child {
    border-bottom: none;
  }
}

/* —— Mid screens: keep nav CTA breathing room —— */
@media (max-width: 880px) and (min-width: 721px) {
  .nav-links {
    gap: 1rem;
  }

  .nav-links a.nav-cta {
    margin-left: 0.25rem;
    padding: 0.6rem 1.15rem;
  }
}

/* —— Mobile —— */
@media (max-width: 720px) {
  :root {
    --nav-h: 3.75rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--page-pad) 1.15rem;
    background: rgba(248, 249, 250, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(26, 28, 30, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.9rem 0.15rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:not(.nav-cta).active::after {
    display: none;
  }

  .nav-links a:not(.nav-cta).active {
    color: var(--red);
  }

  .nav-links a.nav-cta {
    margin-top: 0.85rem;
    margin-left: 0;
    width: 100%;
    min-height: 3rem;
    padding: 0.9rem 1.5rem;
    border: none;
    border-bottom: none;
  }

  .menu-btn {
    display: flex;
  }

  .hero {
    align-items: start;
    min-height: auto;
  }

  .hero-inner {
    padding-top: calc(var(--nav-h) + 1.5rem);
    padding-bottom: 2.5rem;
  }

  .hero-copy,
  .hero-title,
  .hero-lead {
    text-align: left;
  }

  .hero-visual {
    justify-self: start;
    width: min(72vw, 240px);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .cta-row {
    width: 100%;
    justify-content: flex-start;
  }

  .cta-row .btn {
    flex: 1 1 auto;
    min-width: min(100%, 10rem);
  }

  .feature-grid,
  .platform-list,
  .about-stats {
    grid-template-columns: 1fr;
  }

  .platform {
    padding: 1.15rem 1.1rem;
    gap: 0.9rem;
  }

  .platform .dl {
    display: none;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .hero-brand {
    font-size: 2.75rem;
  }

  .btn {
    width: 100%;
  }

  .cta-row .btn {
    min-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .feature,
  .platform,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
