/* Dust to Cosmos teaser site
   Static, framework-free, Vercel-friendly.
*/

:root {
  --bg: #02040a;
  --bg-soft: rgba(13, 17, 28, 0.68);
  --panel: rgba(8, 11, 18, 0.62);
  --panel-strong: rgba(8, 11, 18, 0.88);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: rgba(245, 247, 252, 0.97);
  --muted: rgba(196, 201, 214, 0.74);
  --accent: #7ea5ff;
  --accent-soft: rgba(126, 165, 255, 0.16);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --max: 1160px;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --font-kr: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --space-1: 10px;
  --space-2: 14px;
  --space-3: 18px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 72px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-stack: var(--font-sans);
  --vh: 1vh;
}

:lang(ko) {
  --font-stack: var(--font-sans), var(--font-kr);
}

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

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  background-color: #02040a;
  background:
    radial-gradient(circle at 15% 10%, rgba(80, 108, 255, 0.18), transparent 28%),
    radial-gradient(circle at 78% 25%, rgba(87, 149, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #04060e 0%, #02040a 65%, #010208 100%);
}

body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  margin: 0;
  background-color: #02040a;
  color: var(--text);
  font-family: var(--font-stack);
  background:
    radial-gradient(circle at 15% 10%, rgba(80, 108, 255, 0.18), transparent 28%),
    radial-gradient(circle at 78% 25%, rgba(87, 149, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #04060e 0%, #02040a 65%, #010208 100%);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

body.page-home,
body.page-sub {
  --chrome-top-gap: 32px;
  --chrome-bottom-gap: 32px;
  padding: calc(var(--chrome-top-gap) + env(safe-area-inset-top)) 0
    calc(var(--chrome-bottom-gap) + env(safe-area-inset-bottom));
}

canvas#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  opacity: 0.95;
  pointer-events: none;
}

a {
  color: inherit;
}

.aurora,
.orbital {
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  filter: blur(16px);
}

.aurora {
  width: min(48vw, 540px);
  height: min(48vw, 540px);
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: screen;
}

.aurora-a {
  top: -10vh;
  right: -12vw;
  background: radial-gradient(circle, rgba(124, 152, 255, 0.34), rgba(124, 152, 255, 0.10) 34%, transparent 68%);
  animation: driftA 14s ease-in-out infinite alternate;
}

.aurora-b {
  bottom: -16vh;
  left: -12vw;
  background: radial-gradient(circle, rgba(98, 118, 255, 0.24), rgba(98, 118, 255, 0.08) 32%, transparent 70%);
  animation: driftB 18s ease-in-out infinite alternate;
}

.orbital {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.orbital-a {
  width: min(62vw, 900px);
  height: min(62vw, 900px);
  top: -18vw;
  right: -12vw;
  transform: rotate(-11deg);
}

.orbital-b {
  width: min(36vw, 420px);
  height: min(36vw, 420px);
  bottom: -8vw;
  left: -10vw;
  transform: rotate(8deg);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  min-height: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0;
}

.topbar,
.sub-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.topbar {
  padding-top: 8px;
}

.sub-shell {
  width: min(calc(100% - 32px), 900px);
}

.hero-panel {
  align-self: center;
  width: min(100%, 760px);
  padding: clamp(28px, 4vw, 46px);
  margin: clamp(26px, 6vh, 72px) 0;
  background:
    linear-gradient(180deg, rgba(15, 19, 30, 0.68) 0%, rgba(7, 10, 17, 0.74) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.eyebrow,
.doc-label {
  margin: 0 0 16px;
  font-size: 0.86rem;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(199, 207, 226, 0.82);
}
/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lang-btn.active {
  background: #fff !important;
  border-color: #fff !important;
  color: #000 !important;
  opacity: 1 !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* App Store Section */
.app-store-section {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.app-store-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.store-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
}

.app-store-badge {
  width: min(140px, 40vw);
  max-width: 140px;
  display: inline-block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
  cursor: default;
}

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

.app-store-badge:hover {
  transform: translateY(-2px);
}

.testflight-link {
  width: min(140px, 40vw);
  max-width: 140px;
  min-height: 47px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-decoration: none;
  color: rgba(242, 245, 255, 0.9);
  font-size: 0.93rem;
  line-height: 1;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  font-weight: 500;
}

.testflight-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
}

.testflight-copy {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.testflight-link:hover,
.testflight-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.app-store-text {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.store-item-text {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Footer Additions */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.domain-info {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-weight: 720;
}

.lead {
  margin: 22px 0 0;
  max-width: 22ch;
  font-size: clamp(1.2rem, 2.3vw, 1.65rem);
  line-height: 1.32;
  color: rgba(246, 248, 255, 0.95);
}

.copy {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: 1.03rem;
  line-height: 1.82;
  color: var(--muted);
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.04);
  color: rgba(242, 245, 255, 0.90);
  font-size: 0.93rem;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.chip-link {
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.chip-link:hover,
.chip-link:focus-visible {
  border-color: rgba(126,165,255,0.42);
  background: rgba(126,165,255,0.10);
  transform: translateY(-1px);
  outline: none;
}

.top-brand-link {
  gap: 0.62rem;
}

.top-brand-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.contact-card,
.info-block {
  margin-top: 34px;
  width: fit-content;
  max-width: 100%;
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.contact-label,
.info-label {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(196, 204, 225, 0.72);
  margin-bottom: 10px;
}

.contact-link {
  display: inline-block;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(245, 247, 255, 0.96);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.contact-link:hover,
.contact-link:focus-visible,
.footer-nav a:hover,
.footer-nav a:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible {
  color: #ffffff;
  border-color: rgba(255,255,255,0.46);
  outline: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 4px calc(34px + env(safe-area-inset-bottom));
  color: rgba(181, 189, 209, 0.70);
  font-size: 0.92rem;
}

.footer-nav {
  display: flex;
  gap: 18px;
}

.footer-nav a,
.ghost-link {
  color: rgba(222, 228, 241, 0.80);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.content-card {
  align-self: center;
  margin: 42px 0;
  padding: clamp(26px, 4vw, 40px);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.content-card h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  margin-bottom: 18px;
}

.content-card p {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.78;
  color: var(--muted);
  max-width: 64ch;
}

.muted {
  color: rgba(196, 201, 214, 0.62);
}

@keyframes driftA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2vw, 1.5vh, 0) scale(1.08); }
}

@keyframes driftB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2.4vw, -1.2vh, 0) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-a,
  .aurora-b {
    animation: none;
  }
}

@media (max-width: 820px) {
  body.page-home,
  body.page-sub {
    --chrome-top-gap: 25px;
    --chrome-bottom-gap: 15px;
    padding: calc(var(--chrome-top-gap) + env(safe-area-inset-top)) 0
      calc(var(--chrome-bottom-gap) + env(safe-area-inset-bottom));
  }

  .site-shell {
    min-height: auto;
    padding-bottom: 0;
  }

  .site-footer {
    padding: 8px 4px calc(15px + env(safe-area-inset-bottom));
  }

  .hero-panel {
    margin: 32px 0 34px;
  }

  .site-footer,
  .sub-topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 0.5rem 0.75rem;
    row-gap: 0.45rem;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.55rem;
    flex-wrap: nowrap;
    padding-top: 0;
  }

  .topbar .lang-switcher {
    margin-left: 0;
    flex: 0 0 auto;
    align-self: center;
  }

  .topbar > .top-brand-link {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 110px);
    justify-self: start;
  }

  .topbar .chip-link {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .site-shell,
  .sub-shell {
    width: min(calc(100% - 20px), var(--max));
  }

  .hero-panel,
  .content-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .lead {
    max-width: 100%;
  }

  .copy {
    font-size: 0.98rem;
  }

  .testflight-link {
    width: min(140px, 40vw);
    max-width: 140px;
  }

  .contact-card,
  .info-block {
    width: 100%;
  }
}
