*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #f4ede2;
  --bg-card: #ede5d8;
  --bg-invert: #1a1814;
  --ink: #1a1814;
  --ink-muted: #6b6560;
  --ink-light: #9e9590;
  --rose: #c97a8a;
  --rose-light: #e8b4bd;
  --rose-pale: #f5dce2;
  --border: rgba(26, 24, 20, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --nav-h: 64px;
  --container: 1120px;
  --container-narrow: 720px;
  --font-serif: "DM Serif Display", Georgia, serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
}

a,
button,
input,
summary,
select,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

section[id] {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  animation: pageFadeIn 0.5s ease-out;
}

/* SAKURA CANVAS */
#petals-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: pageFadeIn 0.8s ease-out;
}

/* UTILITY */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* SCROLL REVEAL */
.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
}
.revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 60px);
}
.container--narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 60px);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  min-height: 44px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #f4ede2;
  border-color: var(--ink);
}
.btn-primary:hover {
  background: #3a3530;
  border-color: #3a3530;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
.btn-large {
  padding: 15px 32px;
  font-size: 1rem;
}
.btn:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

/* NAV */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--nav-h);
  padding-inline: clamp(20px, 5vw, 60px);
  background: rgba(244, 237, 226, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  animation: pageFadeIn 0.5s ease-out;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
  flex-shrink: 0;
}
.nav-logo img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  font-weight: 600;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rose);
  border-radius: 1px;
}
.nav-links a {
  position: relative;
}
.nav-links a:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 2px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-gh-stars {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(26, 24, 20, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.18s ease;
  min-height: 40px;
}
.btn-gh-stars:hover {
  background: rgba(26, 24, 20, 0.08);
  border-color: rgba(26, 24, 20, 0.28);
  transform: translateY(-1px);
}
.btn-gh-stars:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}
.gh-icon {
  display: block;
  flex-shrink: 0;
}
.gh-count {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}
.gh-count[hidden] {
  display: none !important;
}
.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.mobile-gh-stars {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  min-height: 44px;
  background: var(--bg-card);
}
.nav-cta {
  flex-shrink: 0;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.2s ease;
  pointer-events: none;
}
.nav-hamburger:focus-visible {
  outline: 2px solid var(--rose);
  border-radius: var(--radius-sm);
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.28s ease;
  overflow-y: auto;
}
.mobile-menu[aria-hidden="false"] {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-link {
  display: block;
  padding: 14px 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-link:focus-visible {
  outline: 2px solid var(--rose);
  border-radius: 2px;
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  border-radius: var(--radius-sm);
}
.mobile-menu-close:focus-visible {
  outline: 2px solid var(--rose);
}
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(26, 24, 20, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.mobile-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroVisualIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* HERO */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(20px, 3.5vh, 44px) clamp(20px, 5vw, 60px)
    clamp(28px, 4vh, 48px);
}
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.015em;
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}
.hero-sub {
  font-size: clamp(0.98rem, 1.25vw, 1.1rem);
  color: var(--ink-muted);
  max-width: 44ch;
  line-height: 1.65;
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}
.hero-platforms-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-light);
  letter-spacing: 0.03em;
  font-weight: 500;
  flex-wrap: wrap;
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both;
}
.hero-platforms-hint a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.15s ease;
}
.hero-platforms-hint a:hover {
  color: var(--rose);
}
.hero-hint-sep {
  color: var(--border);
  font-size: 0.7em;
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: heroVisualIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* Phone frame: hardware bezel, natural shadows, fits within desktop viewport */
.phone-frame {
  position: relative;
  width: clamp(210px, 21vw, 260px);
  background: #12100d;
  border-radius: 44px;
  padding: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 0 1.5px rgba(26, 24, 20, 0.2),
    0 20px 54px rgba(26, 24, 20, 0.2),
    0 6px 20px rgba(26, 24, 20, 0.08);
  transition: transform 0.3s ease;
}
.phone-frame:hover {
  transform: translateY(-4px);
}
.phone-screen {
  width: 100%;
  display: block;
  border-radius: 36px;
  overflow: hidden;
}

/* SECTION HEADERS */
.section-header {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 12px;
}
.section-header p {
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 48ch;
  margin-inline: auto;
}

/* HOW IT WORKS */
.section-how {
  padding: clamp(80px, 10vw, 140px) 0;
}
.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 28px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.step:first-child {
  border-top: 1px solid var(--border);
}
.step-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--rose);
  font-style: italic;
  padding-top: 4px;
  flex-shrink: 0;
}
.step-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.step-body p {
  color: var(--ink-muted);
  line-height: 1.7;
}

/* FEATURES */
.section-features {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--bg-card);
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.feature-lead h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 18px;
  line-height: 1.2;
}
.feature-lead p {
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  font-size: 1.02rem;
}

.feature-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}
.check-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--rose-pale);
  color: var(--rose);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(26, 24, 20, 0.02);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(26, 24, 20, 0.22);
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.06);
}
.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--rose-pale);
  color: var(--rose);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.feature-card h4 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0;
}

/* PLATFORMS */
.section-platforms {
  padding: clamp(80px, 10vw, 140px) 0;
}
.platforms-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 920px;
  margin-inline: auto;
}
.platform-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(26, 24, 20, 0.02);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}
.platform-item:hover {
  background: var(--bg);
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 24, 20, 0.06);
}
.platform-item img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  opacity: 0.85;
}
.platform-item:hover img {
  opacity: 1;
}

/* SCREENSHOTS */
.section-screenshots {
  padding: clamp(70px, 8vw, 120px) 0;
  background: var(--bg-card);
  overflow: hidden;
}

.focus-carousel {
  position: relative;
  max-width: 980px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: pan-y;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: clamp(380px, 50vw, 490px);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  cursor: grab;
}

.carousel-track:active {
  cursor: grabbing;
}

.carousel-track:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

.carousel-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 86%;
  max-height: 430px;
  transform-origin: center center;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
    opacity 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
    filter 0.45s ease;
  will-change: transform, opacity;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.carousel-slide img {
  height: 100%;
  width: auto;
  aspect-ratio: 1242 / 2688;
  object-fit: contain;
  border-radius: clamp(18px, 3.5vw, 26px);
  box-shadow: 0 16px 40px rgba(26, 24, 20, 0.12);
  display: block;
  border: 2px solid rgba(26, 24, 20, 0.08);
  pointer-events: none;
  transition:
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

/* Active center state */
.carousel-slide.is-active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  z-index: 10;
  cursor: default;
}
.carousel-slide.is-active img {
  border-color: rgba(26, 24, 20, 0.2);
  box-shadow: 0 24px 56px rgba(26, 24, 20, 0.22);
}

/* Left & Right immediate neighbors */
.carousel-slide.is-prev {
  transform: translate(calc(-50% - clamp(130px, 16vw, 190px)), -50%) scale(0.85);
  opacity: 0.5;
  z-index: 5;
  filter: brightness(0.96);
}
.carousel-slide.is-next {
  transform: translate(calc(-50% + clamp(130px, 16vw, 190px)), -50%) scale(0.85);
  opacity: 0.5;
  z-index: 5;
  filter: brightness(0.96);
}

.carousel-slide.is-prev:hover,
.carousel-slide.is-next:hover {
  opacity: 0.75;
}

/* Far left & right */
.carousel-slide.is-far-prev {
  transform: translate(calc(-50% - clamp(230px, 28vw, 340px)), -50%) scale(0.7);
  opacity: 0.18;
  z-index: 2;
  pointer-events: none;
}
.carousel-slide.is-far-next {
  transform: translate(calc(-50% + clamp(230px, 28vw, 340px)), -50%) scale(0.7);
  opacity: 0.18;
  z-index: 2;
  pointer-events: none;
}

/* Hidden slides */
.carousel-slide.is-hidden {
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Navigation buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(26, 24, 20, 0.08);
  cursor: pointer;
  z-index: 20;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.carousel-nav-btn--prev {
  left: 12px;
}

.carousel-nav-btn--next {
  right: 12px;
}

.carousel-nav-btn:hover {
  transform: translateY(-50%) scale(1.08);
  border-color: var(--ink);
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.12);
}

.carousel-nav-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel-nav-btn:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* Caption & Dots */
.carousel-meta {
  position: relative;
  z-index: 15;
  margin-top: clamp(24px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  width: 100%;
}

.carousel-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 84px;
}

.carousel-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose);
  background: var(--rose-pale);
  padding: 3px 10px;
  border-radius: 20px;
}

.carousel-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  transition: opacity 0.2s ease;
}

.carousel-desc {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0;
  max-width: 440px;
  line-height: 1.5;
  transition: opacity 0.2s ease;
}

/* Dots pagination */
.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(26, 24, 20, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    width 0.28s cubic-bezier(0.2, 0.9, 0.3, 1),
    background-color 0.2s ease;
  position: relative;
}

.carousel-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
}

.carousel-dot.is-active {
  width: 26px;
  background: var(--ink);
}

.carousel-dot:hover:not(.is-active) {
  background: rgba(26, 24, 20, 0.4);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .carousel-track {
    height: clamp(350px, 55vh, 410px);
  }
  .carousel-slide {
    height: 85%;
  }
  .carousel-slide.is-prev {
    transform: translate(calc(-50% - clamp(90px, 26vw, 130px)), -50%)
      scale(0.84);
    opacity: 0.35;
  }
  .carousel-slide.is-next {
    transform: translate(calc(-50% + clamp(90px, 26vw, 130px)), -50%)
      scale(0.84);
    opacity: 0.35;
  }
  .carousel-slide.is-far-prev,
  .carousel-slide.is-far-next {
    display: none;
  }
  .carousel-nav-btn {
    width: 38px;
    height: 38px;
  }
  .carousel-nav-btn--prev {
    left: 4px;
  }
  .carousel-nav-btn--next {
    right: 4px;
  }
  .carousel-meta {
    margin-top: 18px;
  }
  .carousel-caption {
    min-height: 76px;
  }
  .carousel-title {
    font-size: 1.12rem;
  }
  .carousel-desc {
    font-size: 0.88rem;
    padding: 0 16px;
  }
}

/* DOWNLOAD */
.section-download {
  padding: clamp(80px, 10vw, 140px) 0;
  text-align: center;
}
.section-download h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 12px;
}
.download-sub {
  color: var(--ink-muted);
  margin-bottom: 48px;
  font-size: 1.05rem;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 860px;
  margin-inline: auto;
  gap: 18px;
  text-align: left;
}
.download-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(26, 24, 20, 0.03);
  transition: all 0.18s ease;
}
.download-card:hover {
  border-color: var(--ink);
  background: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.08);
}
.download-card:hover .dl-arrow {
  transform: translateX(4px);
  color: var(--ink);
}
.download-card:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
}

.dl-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink);
}
.dl-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.dl-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
}
.dl-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dl-platform {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
}
.dl-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--rose-pale);
  color: var(--rose);
}
.dl-file {
  font-size: 0.8rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-arrow {
  color: var(--ink-light);
  flex-shrink: 0;
  transition:
    transform 0.18s ease,
    color 0.18s ease;
}
.download-note {
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.download-note a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* CHANGELOG */
.section-changelog {
  padding: clamp(70px, 9vw, 120px) 0;
  background: var(--bg);
}
.changelog-timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
}
.changelog-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 44px 20px;
  color: var(--ink-muted);
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.changelog-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: changelog-spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes changelog-spin {
  to {
    transform: rotate(360deg);
  }
}
.changelog-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(22px, 2.5vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.changelog-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.06);
}
.changelog-entry--prev {
  order: 1;
}
.changelog-entry--latest {
  order: 2;
  border-color: rgba(26, 24, 20, 0.25);
  box-shadow: 0 6px 20px rgba(26, 24, 20, 0.05);
}
.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.changelog-tag-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.changelog-version {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--ink);
  font-weight: 400;
}
.changelog-badge-latest {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--ink);
  color: #f4ede2;
}
.changelog-date {
  font-size: 0.85rem;
  color: var(--ink-light);
  font-weight: 500;
}
.changelog-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.changelog-highlights li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.6;
}
.changelog-highlights li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--rose);
  font-weight: bold;
  font-size: 1.1rem;
  line-height: 1.4;
}
.changelog-highlights strong {
  color: var(--ink);
  font-weight: 600;
}
.changelog-footer {
  margin-top: 32px;
  text-align: center;
}
.changelog-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.changelog-link:hover {
  color: var(--rose);
  border-color: var(--rose);
}
.changelog-link:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 2px;
}

/* FAQ */
.section-faq {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--bg-card);
}
.section-faq h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 40px;
}
.faq-list {
  display: flex;
  flex-direction: column;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
  border-top: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.faq-question:focus-visible {
  outline: 2px solid var(--rose);
  border-radius: 2px;
}
.faq-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition:
    grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    padding-bottom 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  padding-bottom: 0;
}
.faq-answer-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-answer.is-open {
  grid-template-rows: 1fr;
  padding-bottom: 22px;
}
.faq-answer.is-open .faq-answer-inner {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.3s ease 0.05s,
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) 0.03s;
}
.faq-answer p {
  color: var(--ink-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}
.faq-answer a {
  color: var(--ink);
  font-weight: 600;
}

/* SUPPORT / DONATE */
.section-support {
  padding: clamp(80px, 10vw, 140px) 0;
  text-align: center;
}
.section-support h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 16px;
}
.section-support p {
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: 36px;
  line-height: 1.7;
}
/* WHY MORI (COMPARISON) */
.section-compare {
  padding: clamp(70px, 9vw, 120px) 0;
  background: var(--bg);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.compare-card {
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.compare-card--bad {
  background: var(--bg-card);
  border-color: rgba(180, 70, 70, 0.2);
}
.compare-card--good {
  background: var(--bg-card);
  border: 2px solid var(--ink);
  box-shadow: 0 8px 30px rgba(26, 24, 20, 0.06);
}
.compare-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.compare-badge--bad {
  background: rgba(180, 70, 70, 0.12);
  color: #8f2b2b;
}
.compare-badge--good {
  background: var(--ink);
  color: #f4ede2;
}
.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.compare-card--bad .compare-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  color: var(--ink-muted);
}
.compare-card--bad .compare-list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: #8f2b2b;
  font-weight: bold;
}
.compare-card--good .compare-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
}
.compare-card--good .compare-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--rose);
  font-weight: bold;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(36px, 5vh, 48px) 0;
  background: var(--bg);
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}
.footer-logo img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.footer-tagline {
  font-size: 0.8rem;
  color: var(--ink-light);
  letter-spacing: 0.02em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-left: auto;
}
.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--ink);
}
.footer-links a:focus-visible {
  outline: 2px solid var(--rose);
  border-radius: 2px;
}

/* FLOATING MOBILE QUICK-DOWNLOAD BUTTON */
.floating-dl {
  position: fixed;
  bottom: max(20px, calc(env(safe-area-inset-bottom, 16px) + 14px));
  right: 20px;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition:
    opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.floating-dl.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.btn-floating-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--ink);
  color: #f4ede2;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow:
    0 8px 24px rgba(26, 24, 20, 0.24),
    0 2px 6px rgba(26, 24, 20, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-floating-dl:hover {
  background: #2b2824;
}
.btn-floating-dl:active {
  transform: scale(0.96);
}
.floating-dl-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
@media (min-width: 901px) {
  .floating-dl {
    display: none !important;
  }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
    min-height: calc(85svh - var(--nav-h));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: clamp(32px, 8vh, 64px);
    padding-bottom: clamp(40px, 8vh, 64px);
  }
  .hero-content {
    align-items: center;
    max-width: 520px;
    margin-inline: auto;
    gap: 20px;
  }
  .hero-content h1 {
    font-size: clamp(2.2rem, 8.5vw, 3.2rem);
    line-height: 1.12;
    text-wrap: balance;
  }
  .hero-sub {
    max-width: 38ch;
    margin-inline: auto;
    font-size: clamp(0.95rem, 3.8vw, 1.05rem);
    line-height: 1.6;
    text-wrap: pretty;
  }
  .hero-actions {
    justify-content: center;
    gap: 12px;
  }
  .hero-platforms-hint {
    justify-content: center;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--ink-light);
  }
  /* Hide hero phone frame on mobile: carousel showcase below already provides full app preview */
  .hero-visual {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: left;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .download-grid {
    max-width: 100%;
  }
  .nav-links {
    display: none;
  }
  .nav-actions {
    display: none;
  }
  .nav-cta {
    display: none;
  }
  .nav-hamburger {
    display: flex;
    margin-left: auto;
  }
  .changelog-timeline {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .changelog-entry--latest {
    order: 1;
  }
  .changelog-entry--prev {
    order: 2;
  }
}

@media (max-width: 640px) {
  .feature-cards {
    grid-template-columns: 1fr;
  }
  .platforms-grid {
    gap: 8px;
  }
  .platform-item {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  .site-footer {
    padding-top: 36px;
    padding-bottom: max(44px, calc(env(safe-area-inset-bottom, 20px) + 28px));
  }
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .footer-brand {
    align-items: center;
    gap: 6px;
  }
  .footer-tagline {
    font-size: 0.82rem;
    color: var(--ink-muted);
    max-width: 32ch;
  }
  .footer-links {
    margin-left: 0;
    justify-content: center;
    gap: 8px 10px;
    max-width: 340px;
  }
  .footer-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--ink);
    background: rgba(26, 24, 20, 0.04);
    border: 1px solid rgba(26, 24, 20, 0.08);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
  }
  .footer-links a:hover,
  .footer-links a:active {
    background: rgba(26, 24, 20, 0.08);
    border-color: rgba(26, 24, 20, 0.18);
  }
  .download-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .steps {
    gap: 0;
  }
  .step {
    grid-template-columns: 44px 1fr;
    gap: 20px;
    padding: 24px 0;
  }
  /* Changelog header: stack version and date on small screens */
  .changelog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  /* Section headers tighter */
  .section-header {
    margin-bottom: clamp(24px, 5vw, 40px);
  }
  /* Compare cards smaller gap */
  .compare-grid {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 290px;
    margin-inline: auto;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 0.95rem;
    min-height: 48px;
    box-sizing: border-box;
  }
}

@media (max-width: 400px) {
  .changelog-version {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #petals-canvas {
    display: none;
  }
  .reveal-pending,
  .revealed {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
