/* ─── Inner pages (docs, about, download, 404) ─── */

.page-main {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 5px + 48px) clamp(20px, 5vw, 48px) 80px;
  min-height: calc(100vh - var(--nav-height));
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.page-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
}

.page-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(25, 207, 252, 0.3) 0%, transparent 70%);
  top: -10%;
  right: -5%;
}

.page-orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 159, 161, 0.28) 0%, rgba(238, 148, 246, 0.18) 45%, transparent 70%);
  top: -8%;
  left: -6%;
}

.page-orb-3 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 183, 120, 0.22) 0%, rgba(255, 159, 130, 0.12) 50%, transparent 70%);
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.45;
}

.page-orb-4 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(25, 207, 252, 0.22) 0%, transparent 70%);
  bottom: -12%;
  right: -8%;
  opacity: 0.4;
}

.page-orb-5 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 159, 161, 0.24) 0%, rgba(238, 148, 246, 0.14) 45%, transparent 70%);
  bottom: -10%;
  left: -6%;
  opacity: 0.4;
}

.page-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(25, 207, 252, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 207, 252, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.page-header,
.page-content,
.error-page {
  position: relative;
  z-index: 1;
}

.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.page-header .section-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.about-header {
  margin-bottom: 28px;
}

.about-header .section-tag {
  margin-bottom: 10px;
}

.about-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  font-family: "Comfortaa", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #22242d;
  letter-spacing: -0.02em;
  user-select: none;
  -webkit-user-select: none;
}

.about-product-badge img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.page-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Documentation */
.docs-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.docs-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.3s, transform 0.3s;
}

.docs-step:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.docs-step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(25, 207, 252, 0.12);
  color: var(--cyan-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-step-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.docs-step-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.docs-step-body p:last-child {
  margin-bottom: 0;
}

.docs-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
}

.docs-link:hover {
  color: var(--cyan-dark);
}

.docs-types {
  margin-top: 48px;
  text-align: center;
}

.docs-types h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.docs-type-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  user-select: none;
  -webkit-user-select: none;
}

.docs-type-chip {
  padding: 12px 16px;
  min-width: 140px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, background 0.3s;
}

.docs-type-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(25, 207, 252, 0.35);
  background: var(--bg-card);
}

.docs-enjoy {
  margin-top: 32px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-block;
  background-image: linear-gradient(135deg, #19cffc 0%, #4ab8f7 50%, #8ab4f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* About */
.about-grid {
  display: flex;
  justify-content: center;
}

.about-card {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px 40px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.about-card-bar {
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 7px;
  border-radius: 0 0 5px 5px;
  background: var(--gradient);
}

.about-note-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: inline-block;
  background-image: linear-gradient(135deg, #19cffc 0%, #4ab8f7 50%, #8ab4f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.about-profile {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.about-profile-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.about-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  opacity: 0.85;
}

.about-bio-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-avatar-link {
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  line-height: 0;
  cursor: pointer;
}

.about-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
  border: 2px solid #ffffff;
  outline: 4px solid #667eea;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.2s ease;
}

.about-avatar-link:active .about-avatar {
  transform: scale(0.96);
}

.about-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.3;
}

.about-role {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 4px 11px;
  margin-bottom: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 50px;
}

.about-bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: justify;
}

.about-bio + .about-bio {
  margin-top: 0;
}

.about-bio a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.about-bio a:hover {
  text-decoration: underline;
}

/* Legal (privacy, terms) */
.page-content.legal-content {
  max-width: min(92vw, 900px);
}

@media (min-width: 1024px) {
  .page-content.legal-content {
    max-width: 960px;
  }
}

@media (min-width: 1280px) {
  .page-content.legal-content {
    max-width: 1080px;
  }

  .legal-card {
    padding: 40px 48px 44px;
  }
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 36px 40px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.legal-card-bar {
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 7px;
  border-radius: 0 0 5px 5px;
  background: var(--gradient);
}

.legal-section {
  padding-top: 28px;
}

.legal-section:first-child {
  padding-top: 4px;
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.35;
}

.legal-section h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  margin: 20px 0 10px;
  color: var(--text);
}

.legal-section p,
.legal-section li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.legal-section p + p {
  margin-top: 12px;
}

.legal-section a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.legal-section a:hover {
  color: var(--cyan-dark);
  text-decoration: underline;
}

.legal-list {
  margin: 12px 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.legal-list li + li {
  margin-top: 6px;
}

.legal-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0 0;
  opacity: 0.85;
}

.legal-effective {
  margin-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-card .legal-effective {
  margin: 4px 0 24px;
  text-align: center;
}

.legal-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.legal-contact:hover {
  border-color: rgba(25, 207, 252, 0.35);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--cyan-dark);
}

/* Download */
.download-main {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nav-height));
}

.download-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.download-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  font-family: "Comfortaa", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #22242d;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  user-select: none;
  -webkit-user-select: none;
}

.download-product-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  user-select: none;
  -webkit-user-select: none;
}

.download-product-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 8px;
  border: none;
  border-radius: 50px;
  background: transparent;
  font-family: "Comfortaa", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.download-product-tab:hover {
  color: #22242d;
}

.download-product-tab.is-active {
  background: #f0f1f3;
  color: #22242d;
  box-shadow: none;
}

.download-product-tab:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.download-product-tab img,
.download-product-badge img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  filter: brightness(0);
}

.download-product-tab.is-active img {
  filter: brightness(0);
}

.download-product-tab svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.download-platform-panel {
  animation: download-panel-in 0.28s ease;
}

.download-platform-panel[hidden] {
  display: none;
}

.download-preview-panel {
  animation: download-panel-in 0.28s ease;
}

.download-preview-panel[hidden] {
  display: none;
}

@keyframes download-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.download-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.download-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.download-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.download-meta svg {
  flex-shrink: 0;
  color: var(--cyan-dark);
}

.download-preview-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.download-preview-bar {
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 7px;
  border-radius: 0 0 5px 5px;
  background: var(--gradient);
}

.download-preview-label {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-align: center;
  background-image: linear-gradient(135deg, #19cffc 0%, #4ab8f7 50%, #8ab4f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.download-preview-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  user-select: none;
  -webkit-user-drag: none;
}

.download-preview-card-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-phone-mockup {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 8px 0 4px;
}

.download-phone-frame {
  width: 200px;
  background: #1a1a2e;
  border-radius: 28px;
  padding: 12px;
  box-shadow: 0 12px 40px rgba(26, 26, 46, 0.25);
}

.download-phone-notch {
  width: 72px;
  height: 6px;
  background: #2d2d44;
  border-radius: 3px;
  margin: 0 auto 10px;
}

.download-phone-screen {
  background: linear-gradient(180deg, #f0f4ff 0%, #e8eeff 100%);
  border-radius: 18px;
  padding: 18px 16px 24px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-phone-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 36px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: #22242d;
}

.download-phone-header img {
  border-radius: 6px;
}

.download-phone-mic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(25, 207, 252, 0.35);
}

.download-phone-command {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

/* 404 */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--nav-height) - 200px);
  padding: 40px 20px;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.error-page p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 768px) {
  .page-main {
    padding: calc(var(--nav-height) + 5px + 28px) 18px 56px;
  }

  .page-header {
    margin-bottom: 36px;
  }

  .page-header h1 {
    font-size: clamp(1.55rem, 5vw, 1.9rem);
  }

  .page-header p {
    font-size: 0.92rem;
  }

  .page-header .section-tag {
    font-size: 0.75rem;
  }

  .about-header {
    margin-bottom: 22px;
  }

  .about-product-badge {
    font-size: 0.72rem;
    padding: 4px 10px 4px 7px;
  }

  .about-product-badge img {
    width: 16px;
    height: 16px;
  }

  .about-card {
    padding: 28px 20px 32px;
  }

  .about-avatar {
    width: 96px;
    height: 96px;
  }

  .about-name {
    font-size: 1.05rem;
  }

  .about-bio {
    font-size: 0.88rem;
  }

  .legal-card {
    padding: 28px 20px 32px;
  }

  .legal-section h2 {
    font-size: 1.05rem;
  }

  .legal-section p,
  .legal-section li {
    font-size: 0.88rem;
  }

  .docs-step {
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px;
  }

  .docs-step-body h3 {
    font-size: 0.98rem;
  }

  .docs-type-chip {
    min-width: 118px;
    font-size: 0.82rem;
    padding: 10px 14px;
  }

  .docs-enjoy {
    font-size: clamp(1.2rem, 4vw, 1.45rem);
  }

  .error-page {
    min-height: calc(100vh - var(--nav-height) - 160px);
    padding: 32px 18px;
  }

  .error-code {
    font-size: clamp(3.2rem, 14vw, 5rem);
  }

  .about-profile {
    flex-direction: column;
    text-align: center;
  }

  .about-profile-info {
    align-items: center;
  }

  .about-profile-main {
    align-items: center;
    width: 100%;
  }

  .about-bio-section {
    width: 100%;
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .download-panel-info {
    text-align: center;
  }

  .download-product-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .download-product-tabs {
    margin-left: auto;
    margin-right: auto;
  }

  .download-actions {
    justify-content: center;
  }

  .download-meta {
    align-items: center;
  }

  .download-title {
    font-size: clamp(1.65rem, 5vw, 2rem);
  }

  .download-subtitle {
    font-size: 0.92rem;
  }
}

/* ─── Scroll reveal (inner pages) ─── */
.docs-step[data-scroll-reveal],
.about-card[data-scroll-reveal],
.legal-card[data-scroll-reveal],
.download-panel[data-scroll-reveal],
.download-preview-card[data-scroll-reveal],
.docs-types[data-scroll-reveal] {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.docs-step[data-scroll-reveal].revealed:hover,
.about-card[data-scroll-reveal].revealed:hover,
.legal-card[data-scroll-reveal].revealed:hover,
.download-preview-card[data-scroll-reveal].revealed:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.docs-type-chip[data-scroll-reveal] {
  display: inline-block;
}

.page-grid[data-parallax] {
  will-change: transform;
}

@media (max-width: 480px) {
  .page-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .about-card {
    padding: 24px 16px 28px;
  }

  .legal-card {
    padding: 24px 16px 28px;
  }

  .about-avatar-link {
    align-self: center;
  }

  .download-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .download-actions .download-wrap {
    width: 100%;
  }

  .download-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .download-preview-card {
    padding: 22px 16px 16px;
  }
}
