:root {
  --bg: #f5f6f1;
  --surface: #fcfcf9;
  --text: #142031;
  --muted: #516177;
  --line: #d4d8cf;
  --accent: #0d7a86;
  --accent-strong: #0a626d;
  --shadow: 0 20px 45px rgba(20, 32, 49, 0.09);
  --radius: 18px;
  --astro-blue: #88ccff;
  --astro-blue-hi: #aaddff;
  --astro-violet: #cc88ff;
  --astro-violet-hi: #ddaaff;
  --astro-glow: #8866ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 5%, #ffffff 0%, var(--bg) 45%, #eef1e8 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  z-index: -1;
  filter: blur(8px);
  opacity: 0.35;
  pointer-events: none;
}

.bg-shape-1 {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -80px;
  background: linear-gradient(45deg, #c7eee6, #ecf9dd);
}

.bg-shape-2 {
  width: 300px;
  height: 300px;
  bottom: -90px;
  left: -60px;
  background: linear-gradient(45deg, #dbebf8, #f4edd0);
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(252, 252, 249, 0.78);
  border-bottom: 1px solid rgba(212, 216, 207, 0.75);
  z-index: 20;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.main-nav {
  margin-left: auto;
  display: flex;
  gap: 1.2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
}

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

.language-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
  margin-left: 0.8rem;
  background: #fff;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--text);
  color: #fff;
}

.hero {
  padding: 6.3rem 0 3.8rem;
}

.eyebrow {
  display: inline-flex;
  font-size: 0.84rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.3rem);
  max-width: 15ch;
}

.hero-text {
  margin-top: 1.35rem;
  max-width: 65ch;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.66rem 1.2rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--accent-strong);
}

.btn-primary:hover {
  background: #084f57;
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section {
  padding: 3.5rem 0;
}

.section h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.projects-section {
  border-top: 1px solid var(--line);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(140deg, #eef7f4 0%, #f8f7ef 50%, #edf5fb 100%);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.project-card h3 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  margin-bottom: 0.85rem;
}

.project-card p {
  color: var(--muted);
  max-width: 70ch;
  margin-bottom: 1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.service-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.15rem;
}

.service-card p {
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  margin-top: 0.85rem;
  color: var(--accent-strong);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.text-link:hover {
  color: var(--accent);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.step {
  background: linear-gradient(160deg, #fcfcf9 0%, #f2f4ed 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.step span {
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.step h3 {
  margin: 0.6rem 0;
  font-size: 1.05rem;
}

.step p {
  color: var(--muted);
}

.contact {
  border-top: 1px solid var(--line);
}

.contact p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.subpage-main {
  padding: 4.4rem 0 2rem;
}

.back-link {
  margin-top: 0;
  margin-bottom: 1rem;
}

.app-hero {
  padding-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}

.app-hero-top {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  align-items: stretch;
  gap: 1rem;
}

.app-hero-left {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
}

.astrofold-hero-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(20,20,48,255);
  padding: 1.2rem 1.8rem;
  border-radius: var(--radius);
  width: 100%;
}

.astrofold-hero-bar .eyebrow {
  color: #fff;
}

.astrofold-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.astrofold-subtitle {
  margin: 0.2rem 0 0;
  color: #fff;
  font-size: 1rem;
  max-width: 54ch;
}

.astrofold-icon {
  width: 70px;
  height: 70px;
  border-radius: calc(var(--radius) * 0.8);
  object-fit: contain;
  flex-shrink: 0;
}

.app-grid {
  padding-top: 1.2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.app-grid h2,
.app-store-section h2 {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  margin-bottom: 0.8rem;
}

.app-screenshot-section {
  padding-top: 0;
}

.app-screenshot-section h2 {
  text-align: center;
}

.app-screenshot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.45rem;
  row-gap: 0.75rem;
}

.app-screenshot-card {
  width: min(190px, 100%);
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #111627 0%, #20273d 100%);
  box-shadow: var(--shadow);
}

.app-screenshot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

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

.app-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.app-lightbox[hidden] {
  display: none;
}

.app-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(10px);
}

.app-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 4rem);
  border-radius: calc(var(--radius) + 10px);
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

.app-lightbox-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 4rem);
  object-fit: contain;
  background: #090d16;
}

.app-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.app-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.app-lightbox-prev {
  left: 1.25rem;
}

.app-lightbox-next {
  right: 1.25rem;
}

body.is-lightbox-open {
  overflow: hidden;
}

.feature-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.feature-list li + li {
  margin-top: 0.45rem;
}

.app-store-section {
  border-top: 1px solid var(--line);
}

.app-store-hero {
  border-top: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.app-store-hero h2 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 0.5rem;
}

.app-store-hero p {
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.app-store-section p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.store-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: auto;
}

.store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  user-select: none;
  cursor: default;
  opacity: 1;
  overflow: hidden;
  border-radius: 10px;
}

.store-badge-image-disabled {
  display: block;
  height: 52px;
  width: auto;
  filter: grayscale(1) saturate(0.25) brightness(0.52) contrast(0.92);
}

.store-badge-image {
  display: block;
  height: 52px;
  width: auto;
}

.store-badge-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 9, 15, 0.82);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.site-footer {
  padding: 2.5rem 0 2.8rem;
}

.footer-inner {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.55s ease-out forwards;
}

.hero.reveal {
  animation-delay: 0.05s;
}

.section.reveal:nth-of-type(2) {
  animation-delay: 0.12s;
}

.section.reveal:nth-of-type(3) {
  animation-delay: 0.18s;
}

.section.reveal:nth-of-type(4) {
  animation-delay: 0.24s;
}

.astrofold-title {
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  background: linear-gradient(
    90deg,
    var(--astro-blue) 0%,
    var(--astro-blue-hi) 35%,
    var(--astro-violet) 70%,
    var(--astro-violet-hi) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 14px rgba(136, 102, 255, 0.30),
    0 0 30px rgba(136, 102, 255, 0.45);
  animation: astroPulse 2s ease-in-out infinite alternate;
}

@keyframes astroPulse {
  from {
    filter: saturate(1) brightness(1);
    text-shadow:
      0 0 12px rgba(136, 102, 255, 0.25),
      0 0 24px rgba(136, 102, 255, 0.35);
  }
  to {
    filter: saturate(1.12) brightness(1.06);
    text-shadow:
      0 0 18px rgba(136, 102, 255, 0.35),
      0 0 34px rgba(136, 102, 255, 0.55);
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 880px) {
  .main-nav {
    display: none;
  }

  .services-grid,
  .steps,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4.8rem;
  }

  .store-badge-image {
    height: 52px;
  }

  .app-hero-top {
    grid-template-columns: 1fr;
  }

  .astrofold-hero-bar {
    width: fit-content;
    max-width: 100%;
  }

  .app-store-hero {
    height: auto;
  }

  .app-screenshot-card {
    width: min(170px, 100%);
  }

  .app-lightbox {
    padding: 1rem;
  }

  .app-lightbox-dialog,
  .app-lightbox-image {
    max-height: calc(100vh - 2rem);
  }

  .app-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  .app-screenshot-card {
    width: min(150px, 100%);
  }
}
