:root {
  
  --bg:            #ffffff;
  --bg-secondary:  #f2f2f7;   
  --bg-tertiary:   #e5e5ea;
  --surface:       #ffffff;
  --text:          #1c1c1e;   
  --text-2:        #3a3a3c;   
  --text-3:        #8e8e93;   
  --accent:        #007aff;   
  --separator:     rgba(60,60,67,0.12);

  --radius-card:   20px;
  --radius-pill:   980px;
  --radius-sm:     12px;

  --spring:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:      cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --content:       min(1200px, calc(100vw - 48px));
  --nav-width:     min(720px, calc(100vw - 32px));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
main { position: relative; }

.section {
  position: relative;
  min-height: 100svh;
  overflow: clip;
  scroll-margin-top: 120px;
}
.section__inner {
  position: relative;
  z-index: 1;
  width: var(--content);
  margin: 0 auto;
}

.topbar {
  position: fixed;
  inset: 18px 0 auto;
  z-index: 30;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.topbar__panel {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0;
  width: var(--nav-width);
  height: 52px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 8px 32px rgba(0,0,0,0.08),
    0 1px 3px rgba(0,0,0,0.06);
  padding: 0 6px;
  overflow: hidden;
}

.topbar__link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  border-radius: calc(var(--radius-pill) - 6px);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: background 200ms ease, color 200ms ease;
  white-space: nowrap;
  padding: 0 14px;
}

.topbar__link:hover  { background: rgba(0,0,0,0.05); }
.topbar__link:active { background: rgba(0,0,0,0.09); transform: scale(0.97); }

.topbar__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(160deg, #5b9bd5 0%, #3d7ab5 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}


.topbar__emoji {
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1;
}
.topbar__divider {
  flex: 0 0 1px;
  height: 18px;
  background: var(--separator);
  margin: 0 2px;
}

.section--home {
  display: grid;
  align-items: center;
  padding-top: clamp(110px, 14vh, 160px);
  padding-bottom: clamp(60px, 10vh, 100px);
  background: var(--bg);
}

.home__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 4vh, 48px);
  text-align: center;
}

.home__eyebrow {
  font-size: clamp(13px, 1.1vw, 17px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 0.88;
  font-weight: 300;
  letter-spacing: -0.04em;
}

.brand--hero {
  font-size: clamp(52px, 7vw, 120px);
  color: var(--text);
}

.brand__word,
.brand__tail,
.footer__word,
.footer__tail {
  display: inline-block;
}

.brand__avatar,
.footer__avatar {
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 22%;
}

.brand__avatar {
  width: clamp(52px, 5.8vw, 98px);
  height: clamp(52px, 5.8vw, 98px);
  margin: 0 0.04em;
  transform: translateY(0.06em);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  animation: avatar-float 5s var(--spring) infinite alternate;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  border: 1px solid var(--separator);
  transition:
    color 200ms ease,
    border-color 200ms ease,
    transform 250ms var(--spring);
}

.hero-button:hover {
  color: var(--text);
  border-color: rgba(60,60,67,0.28);
  transform: translateY(-1px);
}
.hero-button:active {
  transform: scale(0.97);
}

.home__decor {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: clamp(200px, 22vw, 380px);
  opacity: 0.55;
  filter: blur(6px);
  transform-origin: center center;
}
.home__decor img { width: 100%; height: auto; }

.home__decor--left {
  left: -6vw;
  bottom: -14vh;
  animation: saturn-left 18s ease-in-out infinite alternate;
}
.home__decor--right {
  right: -7vw;
  bottom: -14vh;
  transform: scaleX(-1);
  animation: saturn-right 20s ease-in-out infinite alternate;
}

.section--about {
  display: grid;
  align-items: center;
  background: var(--bg-secondary);
  padding-top: clamp(100px, 13vh, 160px);
  padding-bottom: clamp(80px, 12vh, 140px);
}

.about__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3vh, 32px);
  text-align: center;
}

.about__tag,
.section-eyebrow {
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-title {
  margin: 0;
  font-size: clamp(42px, 6vw, 88px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.page-copy {
  margin: 0;
  max-width: 680px;
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-2);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 500;
  color: var(--accent);
  transition: gap 220ms var(--spring);
}
.cta-link:hover { gap: 10px; }
.cta-link__arrow { flex-shrink: 0; }

.section--install {
  display: grid;
  align-items: start;
  background: var(--bg);
  padding-top: clamp(100px, 13vh, 160px);
  padding-bottom: clamp(80px, 12vh, 120px);
}

.install__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}

.install__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.section-title {
  margin: 8px 0 0;
  font-size: clamp(42px, 5vw, 80px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--text);
}

.section-subtitle {
  margin: 14px 0 0;
  font-size: clamp(15px, 1.4vw, 19px);
  color: var(--text-3);
  font-weight: 400;
  line-height: 1.4;
}

.install__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: clamp(24px, 3vh, 36px);
  width: min(360px, 100%);
}

.platform-button {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  padding: 0 20px;
  border-radius: var(--radius-card);
  background: var(--bg-secondary);
  border: 1px solid var(--separator);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  transition:
    background 200ms ease,
    transform 250ms var(--spring),
    box-shadow 200ms ease;
}

.platform-button:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}
.platform-button:active { transform: scale(0.98); }

.platform-button__icon {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0,122,255,0.28);
}

.install__media {
  border-radius: 28px;
  overflow: hidden;
  background: #0a0a0a;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.12),
    0 4px 12px rgba(0,0,0,0.08);
  animation: media-breathe 5.5s ease-in-out infinite alternate;
  aspect-ratio: 9/16;
  max-height: 560px;
  justify-self: center;
  width: 100%;
}

.install__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.section--help {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: var(--bg-secondary);
  padding-top: clamp(100px, 12vh, 150px);
}

.help__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 32px;
  width: var(--content);
  margin: 0 auto;
}

.help__grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.help-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--separator);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition:
    background 160ms ease,
    transform 250ms var(--spring),
    box-shadow 200ms ease;
  cursor: pointer;
}

.help-card:hover {
  background: #f9f9fb;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.help-card:active { transform: scale(0.98); background: #efefef; }

.help-card__icon {
  font-size: 28px;
  line-height: 1;
  flex: 0 0 auto;
}

.help-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.help-card__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.help-card__sub {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: -0.005em;
}

.help-card__arrow {
  flex: 0 0 auto;
  color: var(--text-3);
  opacity: 0.6;
}

.footer {
  margin-top: auto;
  border-top: 1px solid var(--separator);
  background: rgba(242,242,247,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer__inner {
  width: var(--content);
  min-height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: clamp(28px, 3.2vw, 54px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--text);
}

.footer__avatar {
  width: clamp(36px, 3.4vw, 58px);
  height: clamp(36px, 3.4vw, 58px);
  margin: 0 0.04em;
  transform: translateY(0.05em);
  border-radius: 22%;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  animation: avatar-float 5s var(--spring) infinite alternate;
}

.github-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    transform 260ms var(--spring),
    background 180ms ease,
    box-shadow 180ms ease;
}

.github-button:hover {
  transform: translateY(-2px);
  background: #2c2c2e;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.github-button:active { transform: scale(0.97); }

.github-button__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.9;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition:
    opacity 680ms ease,
    transform 720ms var(--spring),
    filter 640ms ease;
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

@keyframes avatar-float {
  from { transform: translateY(0.06em) scale(1); }
  to   { transform: translateY(calc(0.06em - 7px)) scale(1.015); }
}

@keyframes media-breathe {
  from { transform: translateY(0) scale(1);   box-shadow: 0 24px 64px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08); }
  to   { transform: translateY(-8px) scale(1.008); box-shadow: 0 34px 80px rgba(0,0,0,0.16), 0 6px 18px rgba(0,0,0,0.10); }
}

@keyframes saturn-left {
  from { transform: translate3d(0,0,0) rotate(-8deg); }
  to   { transform: translate3d(18px,-12px,0) rotate(-4deg); }
}

@keyframes saturn-right {
  from { transform: scaleX(-1) translate3d(0,0,0) rotate(8deg); }
  to   { transform: scaleX(-1) translate3d(-16px,-10px,0) rotate(4deg); }
}

@media (max-width: 1024px) {
  .install__inner {
    grid-template-columns: 1fr;
    gap: clamp(36px, 5vw, 56px);
  }

  .install__media {
    max-height: 460px;
    width: min(320px, 100%);
  }

  .install__copy { align-items: center; text-align: center; }
  .install__actions { align-self: center; }
  .section-title { margin-top: 8px; }
}

@media (max-width: 680px) {
  :root {
    --content: calc(100vw - 28px);
    --nav-width: calc(100vw - 28px);
  }

  html {
    scroll-padding-top: 80px;
    font-size: 15px;
  }

  .section { scroll-margin-top: 80px; }

  .topbar {
    inset: auto 0 0;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .topbar__panel {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 64px;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(60,60,67,0.10);
    background: rgba(249,249,249,0.94);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    box-shadow: 0 -1px 0 rgba(255,255,255,0.8) inset;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 0;
    overflow: visible;
    justify-content: space-around;
  }

  .topbar__divider { display: none; }

  .topbar__link {
    flex: 1;
    flex-direction: column;
    height: auto;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0;
    justify-content: center;
    align-items: center;
  }

  .topbar__link:hover { background: transparent; color: var(--accent); }
  .topbar__link:active { background: transparent; transform: scale(0.92); color: var(--accent); }

  .topbar__link--brand .topbar__icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 1px;
  }

  .topbar__emoji {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 1px;
  }

  .topbar__text {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1;
    color: inherit;
  }

  .section--home {
    padding-top: clamp(64px, 14vw, 88px);
    padding-bottom: 100px;
    min-height: 100svh;
  }

  .home__inner { gap: 22px; }

  .brand--hero {
    font-size: clamp(40px, 12vw, 58px);
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 0;
    justify-content: center;
  }

  .brand__avatar {
    width: clamp(44px, 11vw, 56px);
    height: clamp(44px, 11vw, 56px);
  }

  .hero-button {
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
  }

  .home__decor { width: 140px; opacity: 0.35; filter: blur(5px); }
  .home__decor--left  { left: -70px; bottom: -60px; }
  .home__decor--right { right: -70px; bottom: -60px; }

  .section--about {
    padding-top: clamp(52px, 10vw, 72px);
    padding-bottom: clamp(52px, 10vw, 80px);
    min-height: unset;
  }

  .about__inner { gap: 16px; }
  .page-title { font-size: clamp(32px, 9vw, 48px); }
  .page-copy { font-size: 15px; line-height: 1.5; }
  .cta-link { font-size: 14px; }

  .section--install {
    padding-top: clamp(52px, 10vw, 72px);
    padding-bottom: clamp(52px, 10vw, 80px);
    min-height: unset;
  }

  .section-title { font-size: clamp(32px, 9vw, 48px); }
  .section-subtitle { font-size: 14px; }
  .install__copy { align-items: flex-start; text-align: left; }

  .install__actions {
    width: 100%;
    margin-top: 18px;
    gap: 8px;
  }

  .platform-button {
    height: 52px;
    font-size: 15px;
    border-radius: 14px;
    padding: 0 16px;
  }

  .platform-button__icon {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 8px;
  }

  .install__media {
    max-height: 340px;
    width: min(200px, 70vw);
    border-radius: 20px;
  }

  .section--help {
    padding-top: clamp(52px, 10vw, 72px);
    padding-bottom: 100px;
    min-height: unset;
  }

  .help__inner { gap: 14px; }

  .help__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .help-card {
    padding: 14px 16px;
    border-radius: 16px;
    gap: 12px;
  }

  .help-card__icon { font-size: 24px; }
  .help-card__title { font-size: 15px; }
  .help-card__sub { font-size: 12px; }

  .footer {
    margin-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .footer__inner {
    min-height: 0;
    padding: 20px 0 22px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .footer__brand { justify-content: center; font-size: clamp(24px, 7.5vw, 36px); }
  .footer__avatar { width: clamp(30px, 7.5vw, 42px); height: clamp(30px, 7.5vw, 42px); }

  .github-button {
    width: 100%;
    height: 46px;
    border-radius: 14px;
  }
}

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

  .home__decor,
  .brand__avatar,
  .footer__avatar,
  .install__media,
  [data-reveal],
  .hero-button,
  .platform-button,
  .help-card,
  .github-button,
  .cta-link {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] { opacity: 1; transform: none; filter: none; }
}
