/* Sente website — scroll-snap pages + Apple-style reveal */

:root {
  --bg: #ffffff;
  --bg-muted: #f5f5f7;
  --bg-card: #f3f3f5;
  --text: #111111;
  --text-muted: #6b6b6f;
  --border: #e8e8ec;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --header-h: 64px;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.snap-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.cases-section,
.snap-section--footer {
  scroll-snap-stop: normal;
  min-height: auto;
}

.snap-section--footer {
  scroll-snap-align: end;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(255, 255, 255, 0.92);
}

.brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  gap: 28px;
}

.header-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: transform 0.25s var(--reveal-ease), box-shadow 0.25s ease, opacity 0.2s;
}

.btn-primary {
  background: #111;
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 0.9375rem;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

/* ── Scroll progress dots ── */
.scroll-progress {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scroll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d1d6;
  transition: background 0.3s ease, transform 0.3s var(--reveal-ease);
}

.scroll-dot:hover {
  background: #86868b;
  transform: scale(1.2);
}

.scroll-dot.is-active {
  background: #111;
  transform: scale(1.25);
}

/* ── Reveal animations ── */
.reveal-group {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s var(--reveal-ease),
    transform 0.9s var(--reveal-ease);
}

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

.reveal-delay {
  transition-delay: 0.15s;
}

.reveal-delay-2 {
  transition-delay: 0.3s;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: calc(var(--header-h) + 32px) 24px 48px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #f5f5f7 0%, transparent 70%);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
}

.section-inner--wide {
  max-width: 1200px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 16px 0 36px;
  font-size: clamp(1.0625rem, 2.5vw, 1.375rem);
  color: var(--text-muted);
  font-weight: 400;
}

.platform-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-platform {
  background: #111;
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-size: 0.9375rem;
  min-width: 132px;
}

.btn-platform svg {
  width: 18px;
  height: 18px;
}

.btn-platform:hover:not(.btn-disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.btn-disabled {
  background: #e5e5ea;
  color: #999;
  cursor: not-allowed;
  opacity: 0.7;
}

.version-line {
  margin: 8px 0 48px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.scroll-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #aaa;
  animation: hintBounce 2.4s ease-in-out infinite;
}

@keyframes hintBounce {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}

/* ── Showcase sections ── */
.showcase-section {
  padding: calc(var(--header-h) + 24px) 0 48px;
  background: var(--bg);
}

.showcase-section:nth-child(even) {
  background: var(--bg-muted);
}

.showcase-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
}

.showcase-section--reverse .showcase-layout {
  direction: rtl;
}

.showcase-section--reverse .showcase-copy,
.showcase-section--reverse .showcase-visual {
  direction: ltr;
}

.showcase-title {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.showcase-desc {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 420px;
}

/* ── App window frame ── */
.app-window {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.8s var(--reveal-ease);
}

.reveal-group.is-visible .app-window {
  transform: perspective(1200px) rotateY(0) rotateX(0);
}

.app-window img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.app-window--feature {
  transform: none;
}

/* ── Feature section ── */
.feature-section {
  padding: calc(var(--header-h) + 32px) 0 48px;
  background: var(--bg-muted);
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
}

.feature-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 440px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.feature-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-tab {
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.25s ease;
}

.feature-tab:hover {
  background: var(--bg-muted);
}

.feature-tab.active {
  background: var(--bg-muted);
  box-shadow: inset 0 0 0 1px var(--border);
}

.tab-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.tab-desc {
  display: block;
  margin-top: 8px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.feature-tab:not(.active) .tab-desc {
  display: none;
}

.feature-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

#feature-shot {
  transition: opacity 0.45s var(--reveal-ease), transform 0.45s var(--reveal-ease);
}

#feature-shot.is-swapping {
  opacity: 0;
  transform: scale(0.97);
}

.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--reveal-ease), transform 0.6s var(--reveal-ease);
}

.reveal-group.is-visible ~ .float-badge,
.feature-preview .float-badge.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.badge-local {
  top: 8%;
  right: 4%;
  transition-delay: 0.3s;
}

.badge-efficiency {
  bottom: 10%;
  left: 2%;
  transition-delay: 0.45s;
}

.badge-icon {
  font-size: 1.125rem;
}

/* Badge float (CSS loop) */
.feature-section .float-badge.is-visible {
  animation: badgeFloat 3.2s ease-in-out infinite;
}

.badge-efficiency.is-visible {
  animation-delay: 0.8s;
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── Cases ── */
.cases-section {
  padding: calc(var(--header-h) + 32px) 0 64px;
  background: var(--bg);
  justify-content: flex-start;
}

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

.case-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px 16px 20px;
  transition: transform 0.35s var(--reveal-ease), box-shadow 0.35s ease;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.case-visual {
  height: 100px;
  border-radius: 12px;
  background: linear-gradient(145deg, #eaeaee, #f8f8fa);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.case-visual::after {
  content: "";
  position: absolute;
  inset: 20%;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
}

.case-visual.v1::before { content: "PDF"; position: absolute; top: 30%; left: 20%; font-size: 0.7rem; color: #999; }
.case-visual.v2::before { content: "{ }"; position: absolute; top: 35%; left: 25%; font-size: 1rem; color: #999; }
.case-visual.v3::before { content: "RSS"; position: absolute; top: 32%; left: 22%; font-size: 0.75rem; color: #999; }
.case-visual.v4::before { content: "KB"; position: absolute; top: 32%; left: 28%; font-size: 0.75rem; color: #999; }
.case-visual.v5::before { content: "XLS"; position: absolute; top: 32%; left: 22%; font-size: 0.75rem; color: #999; }
.case-visual.v6::before { content: "⚙"; position: absolute; top: 30%; left: 30%; font-size: 1.1rem; color: #999; }
.case-visual.v7::before { content: "📚"; position: absolute; top: 32%; left: 28%; font-size: 1rem; }
.case-visual.v8::before { content: "@"; position: absolute; top: 32%; left: 30%; font-size: 1rem; color: #999; }

.case-card h3 {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.case-card p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 40px 24px 56px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  margin: 0;
  font-size: 0.75rem;
  color: #aaa;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-group {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-hint { animation: none; }
  .app-window { transform: none; }
  .float-badge { animation: none; }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .header-nav { display: none; }

  .showcase-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 24px;
  }

  .showcase-section--reverse .showcase-layout {
    direction: ltr;
  }

  .showcase-desc { max-width: none; }

  .app-window {
    transform: none;
  }

  .feature-shell {
    grid-template-columns: 1fr;
  }

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

  .scroll-progress {
    right: 10px;
    gap: 8px;
  }

  .scroll-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 560px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }

  .platform-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-platform {
    width: 100%;
  }

  .float-badge {
    display: none;
  }

  .scroll-progress {
    display: none;
  }
}
