/* === Font === */
@font-face {
  font-family: "PF Baseline Pro";
  src: url("fonts/PFBaselinePro-Light.woff2") format("woff2"),
       url("fonts/PFBaselinePro-Light.woff") format("woff"),
       url("fonts/PFBaselinePro-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: block;
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root,
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-card: #1a1a1a;
  --border: #222;
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;
  --accent: #2997ff;
  --accent-hover: #0077ed;
  --radius: 16px;
  --radius-sm: 10px;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #d2d2d7;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --accent: #0071e3;
  --accent-hover: #0051a3;
  --radius: 16px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 17px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Theme Toggle === */
.theme-toggle {
  display: flex;
  align-items: center;
  width: 56px;
  height: 28px;
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  flex-shrink: 0;
  overflow: hidden;
}

[data-theme="dark"] .theme-toggle {
  background: #09090b;
  border: 1px solid #27272a;
}

[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border: 1px solid #e4e4e7;
}

.toggle-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}

.toggle-thumb,
.toggle-secondary {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background 0.3s;
  flex-shrink: 0;
}

/* Dark: thumb on left, secondary on right — no transform */
[data-theme="dark"] .toggle-thumb {
  background: #3f3f46;
  transform: translateX(0);
}
[data-theme="dark"] .toggle-secondary {
  background: transparent;
  transform: translateX(0);
}

/* Light: both swap — thumb jumps right, secondary jumps left */
[data-theme="light"] .toggle-thumb {
  background: #e4e4e7;
  transform: translateX(28px);
}
[data-theme="light"] .toggle-secondary {
  transform: translateX(-28px);
}

.toggle-icon { display: none; }

/* dark: moon on thumb (left), sun on secondary (right) */
[data-theme="dark"] .icon-moon-thumb      { display: block; color: #ffffff; }
[data-theme="dark"] .icon-sun-secondary   { display: block; color: #71717a; }

/* light: sun on thumb (now right), moon on secondary (now left) */
[data-theme="light"] .icon-sun-thumb       { display: block; color: #3f3f46; }
[data-theme="light"] .icon-moon-secondary  { display: block; color: #000000; }

/* === Nav === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "PF Baseline Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav-logo span {
  position: relative;
  top: 2px;
}

.nav-logo:hover {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* === Hamburger === */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 28px;
  height: 28px;
}

.nav-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.25s;
}

.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* === Hero === */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding-top: 52px;
  position: relative;
  overflow: hidden;
}

#hero-shader {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  pointer-events: none;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: clamp(72px, 14vw, 120px);
  height: clamp(72px, 14vw, 120px);
  object-fit: contain;
  margin-bottom: 32px;
}

.hero-title {
  font-family: "PF Baseline Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(28px, 7vw, 72px);
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #fff 0%, #999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* === Light mode overrides === */
[data-theme="light"] .hero {
  background: #f5f5f7;
}


[data-theme="light"] .hero-title {
  background: linear-gradient(180deg, #1d1d1f 0%, #6e6e73 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="light"] .nav {
  background: rgba(245, 245, 247, 0.85);
}

/* === App Showcase === */
.app-showcase {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
}

.app-panel {
  display: none;
}

.app-panel.is-active {
  display: block;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.app-header .app-icon {
  flex-shrink: 0;
  margin-bottom: 0;
}

.app-header-text {
  flex: 1;
  min-width: 0;
}

.app-header-text .app-name {
  font-size: 17px;
  margin-bottom: 2px;
}

.app-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.app-header-btn {
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.app-header-btn:hover {
  color: #fff;
  opacity: 0.82;
}

.app-screenshots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.app-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

.app-carousel-panel {
  display: none;
}

.app-carousel-panel.is-active {
  display: block;
}

.app-selector {
  display: flex;
  border-top: 1px solid var(--border);
}

.app-selector-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: color 0.2s, background 0.2s;
}

.app-selector-btn + .app-selector-btn {
  border-left: 1px solid var(--border);
}

.app-selector-btn.is-active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.app-selector-btn:hover:not(.is-active) {
  color: var(--text-primary);
}

.app-selector-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: contain;
}

/* === App Featured === */
.app-featured {
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.app-featured-info {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.app-featured-info .app-icon {
  flex-shrink: 0;
}

/* === Carousel === */
.carousel {
  position: relative;
  padding: 32px 0 48px;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-track {
  display: flex;
  gap: 20px;
  will-change: transform;
  transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel.is-dragging .carousel-track {
  transition: none;
}

.carousel-slide {
  flex-shrink: 0;
  width: 220px;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  display: block;
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 0.45;
}

.carousel-slide.is-active img {
  opacity: 1;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  transition: width 0.25s ease, background 0.25s ease;
}

.carousel-dot.active {
  width: 20px;
  border-radius: 3px;
  background: var(--text-primary);
}

.apps-grid--single {
  grid-template-columns: minmax(0, 480px);
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

/* === Section === */
.section-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === Apps === */
.apps {
  padding: 120px 0;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: border-color 0.3s, transform 0.3s;
}

.app-card:hover {
  border-color: #333;
  transform: translateY(-2px);
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
}

.app-icon-healthoria {
  background: none;
  overflow: hidden;
}

.app-icon-orbitgoals {
  background: none;
  overflow: hidden;
}

.app-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.app-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.app-links {
  display: flex;
  gap: 20px;
}

.app-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.link {
  font-size: 15px;
  font-weight: 500;
}

/* === About === */
.about {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.about-card {
  max-width: 600px;
  margin: 0 auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-card);
}

.about-card-banner {
  height: 140px;
  background-color: #0a0a0a;
  background-image: radial-gradient(circle, #333 1px, transparent 1px);
  background-size: 24px 24px;
}

[data-theme="light"] .about-card-banner {
  background-color: #111;
}

.about-card-body {
  padding: 0 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: -44px;
  border: 3px solid var(--bg-card);
  display: block;
  margin-bottom: 16px;
}

.about-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.about-role {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.about-bio {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.about-bio:last-of-type {
  margin-bottom: 0;
}

.about-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.about-tool {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  letter-spacing: 0.01em;
}

.about-education {
  width: 100%;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-edu-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-edu-school {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.about-edu-detail {
  font-size: 12px;
  color: var(--text-secondary);
}

.about-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.about-social {
  display: flex;
  gap: 8px;
}

.about-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s;
}

.about-social-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.about-cta {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.about-cta:hover {
  opacity: 0.8;
}

/* === Contact === */
.contact {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-text {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.contact-email {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.contact-soon {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* === Footer === */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  width: 28px;
  height: 28px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.footer-logo:hover {
  opacity: 0.9;
}

.footer p {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* === Support Page === */
.support-page {
  padding-top: 100px;
  padding-bottom: 80px;
  min-height: 100vh;
}

.support-page .back-link {
  display: inline-block;
  font-size: 15px;
  margin-bottom: 48px;
  color: var(--accent);
}

.support-page h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.support-page .support-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 56px;
}

.support-section {
  margin-bottom: 48px;
}

.support-section h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.support-section p,
.support-section li {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.support-section ul {
  list-style: none;
  padding: 0;
}

.support-section li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
}

.support-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.support-contact {
  margin-top: 64px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.support-contact p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* === Responsive === */
@media (max-width: 600px) {
  /* Mobile nav: hide links, show hamburger */
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 15px;
    padding: 12px 24px;
    color: var(--text-secondary);
  }

  .nav-burger {
    display: flex;
  }

  .nav-logo {
    font-size: 13px;
    gap: 6px;
  }

  .nav-logo-img {
    width: 22px;
    height: 22px;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 32px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    padding: 28px 24px;
  }

  .about,
  .apps,
  .contact {
    padding: 80px 0;
  }

  .carousel-slide {
    width: 160px;
  }

  .app-featured-info {
    gap: 14px;
  }

  .apps-grid--single {
    margin-top: 32px;
    padding-top: 32px;
  }

  .contact-email {
    font-size: 18px;
  }

  .support-page h1 {
    font-size: 28px;
  }
}
