@property --theme-reveal-radius {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f5e0dc;
  --surface: #1e1e2e;
  --surface-variant: #2a2a42;
  --surface-elevated: rgba(248, 250, 252, 0.06);
  --primary: rgba(78, 79, 116, 1);
  --primary-container: rgba(78, 79, 116, 0.9);
  --on-primary: #ffffff;
  --secondary: #dfdfdf;
  --secondary-container: #55436f;
  --on-surface: #f5e0dc;
  --on-surface-variant: #d7bfbf;
  --outline: #9c92c7;
  --page-bg-start: #0f0d16;
  --page-bg-middle: #17141f;
  --page-bg-end: #211d2a;
  --text-primary: #f5e0dc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --heading-color: #ffffff;
  --card-border: rgba(146, 130, 157, 0.18);
  --input-bg: rgba(2, 6, 23, 0.55);
  --input-border: rgba(148, 163, 184, 0.24);
  --chip-bg: rgba(78, 79, 116, 0.12);
  --shadow-color: rgba(12, 10, 20, 0.24);
}

:root[data-theme="light"] {
  color-scheme: light;
  --surface: #ffffff;
  --surface-variant: #f5f1ff;
  --surface-elevated: rgba(255, 255, 255, 0.78);
  --primary: #5f5c91;
  --primary-container: #6f6ba8;
  --on-primary: #ffffff;
  --secondary: #4a4458;
  --secondary-container: #e8e0f5;
  --on-surface: #241b33;
  --on-surface-variant: #4e475b;
  --outline: #9a8fc2;
  --page-bg-start: #f7f4ff;
  --page-bg-middle: #efe7ff;
  --page-bg-end: #e1d9f6;
  --text-primary: #241b33;
  --text-secondary: #514b61;
  --text-muted: #676174;
  --heading-color: #1f1638;
  --card-border: rgba(120, 107, 154, 0.2);
  --input-bg: #ffffff;
  --input-border: rgba(117, 104, 154, 0.24);
  --chip-bg: rgba(95, 92, 145, 0.12);
  --shadow-color: rgba(53, 38, 88, 0.14);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--page-bg-start) 0%, var(--page-bg-middle) 45%, var(--page-bg-end) 100%);
  color: var(--on-surface);
  line-height: 1.6;
  transition: color 0.35s ease;
}

.theme-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  --theme-reveal-x: 50%;
  --theme-reveal-y: 0px;
  --theme-reveal-radius: 0px;
  -webkit-mask-image: radial-gradient(
    circle var(--theme-reveal-radius) at var(--theme-reveal-x) var(--theme-reveal-y),
    transparent var(--theme-reveal-radius),
    #000 var(--theme-reveal-radius)
  );
  mask-image: radial-gradient(
    circle var(--theme-reveal-radius) at var(--theme-reveal-x) var(--theme-reveal-y),
    transparent var(--theme-reveal-radius),
    #000 var(--theme-reveal-radius)
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background: linear-gradient(
    135deg,
    var(--overlay-bg-start) 0%,
    var(--overlay-bg-middle) 45%,
    var(--overlay-bg-end) 100%
  );
}

.theme-overlay[data-theme="dark"] {
  --overlay-bg-start: #0f0d16;
  --overlay-bg-middle: #17141f;
  --overlay-bg-end: #211d2a;
}

.theme-overlay[data-theme="light"] {
  --overlay-bg-start: #f7f4ff;
  --overlay-bg-middle: #efe7ff;
  --overlay-bg-end: #e1d9f6;
}

.theme-overlay.is-revealing {
  opacity: 1;
  visibility: visible;
}

html.theme-transitioning .theme-toggle {
  pointer-events: none;
  opacity: 0.72;
}

html.theme-transitioning,
html.theme-transitioning * {
  transition: none !important;
}

.scroll-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3.1rem;
  height: 3.1rem;
  border: 0;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  font-size: 1.45rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  z-index: 50;
}

.scroll-top::before {
  content: "↑";
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-1px);
}

.scroll-top:hover {
  transform: translateY(0) scale(1.04);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}


img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 2.2rem 0 3.5rem;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--surface-elevated);
  box-shadow: 0 8px 20px var(--shadow-color);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.badge::before {
  content: "●";
  color: var(--primary);
  font-size: 0.8rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.text-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
}

.nav-links .text-link:focus-visible {
  outline: 2px solid rgba(78, 79, 116, 0.45);
  outline-offset: 3px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  background: var(--surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle:disabled {
  cursor: wait;
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

html.theme-transitioning .theme-toggle__icon {
  transform: rotate(18deg) scale(1.08);
}

.theme-toggle[aria-pressed="true"] .theme-toggle__icon {
  transform: rotate(20deg) scale(1.06);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-grid > div {
  max-width: 740px;
}

.site-header h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  color: var(--heading-color);
}

.site-header p {
  max-width: 760px;
  margin: 0 0 1.8rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
}

.primary-btn {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 14px 32px rgba(78, 79, 116, 0.32);
}

.secondary-btn {
  background: rgba(78, 79, 116, 0.16);
  color: var(--secondary);
  border: 1px solid rgba(78, 79, 116, 0.28);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
}

.hero-card,
.section-card,
.cta-panel {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: 0 24px 70px var(--shadow-color);
}

.hero-card {
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.countdown-box {
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.82rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.countdown-box h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto 1rem;
}

.time-block {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(78, 79, 116, 0.12);
}

.time-block span {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.time-block small {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.release-note {
  margin: 0;
  color: var(--text-secondary);
}

.section-card {
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}

.download-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem 0 0;
}

.download-panel p {
  margin: 0;
  color: var(--text-secondary);
}

.section-header {
  margin-bottom: 1.2rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.about-grid article,
.faq-list details {
  padding: 1rem;
  border-radius: 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--card-border);
}

.about-grid h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.about-grid ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-secondary);
}

.about-grid p,
.faq-list p,
.cta-panel p {
  margin: 0;
  line-height: 1.75;
  color: var(--text-secondary);
}

.disclaimer p {
  margin: 0;
  line-height: 1.75;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  padding: 0.2rem 0;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(78, 79, 116, 0.22);
  border-radius: 16px;
  background: var(--chip-bg);
  color: var(--text-primary);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: rgba(78, 79, 116, 1);
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.35s ease, opacity 0.25s ease;
}

.faq-answer > p {
  overflow: hidden;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-answer p {
  margin: 0;
  padding: 0 1.1rem 1rem;
}

.faq-item.is-open .faq-answer p {
  padding-top: 0.7rem;
}

.cta-panel {
  text-align: center;
  padding: 1.8rem;
  margin-bottom: 2rem;
}

.cta-panel h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.cta-panel .primary-btn {
  margin-top: 1rem;
}

.site-footer {
  padding: 0 0 2rem;
  color: var(--text-muted);
}

.disclaimer {
  padding: 1.4rem;
  border-radius: 20px;
  margin-bottom: 1.4rem;
  text-align: left;
  background: linear-gradient(135deg, rgba(92, 62, 0, 0.52), rgba(68, 45, 0, 0.44));
  border: 1px solid rgba(255, 196, 84, 0.34);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.disclaimer h3 {
  margin-top: 0;
  color: #ffd978;
  font-weight: 800;
}

.disclaimer p {
  color: #fff0c7;
  font-weight: 500;
}

:root[data-theme="light"] .disclaimer {
  background: linear-gradient(135deg, rgba(255, 222, 116, 0.3), rgba(255, 194, 61, 0.22));
  border: 1px solid rgba(183, 126, 0, 0.35);
  box-shadow: 0 10px 28px rgba(168, 112, 0, 0.16);
}

:root[data-theme="light"] .disclaimer h3 {
  color: #8a4b00;
}

:root[data-theme="light"] .disclaimer p {
  color: #5f4a1f;
  font-weight: 600;
}

:root[data-theme="light"] .disclaimer p strong {
  color: #6b3f00;
}

.application-form {
  display: grid;
  gap: 1rem;
}

.application-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text-primary);
}

.application-form input,
.application-form textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: var(--input-bg);
  color: var(--text-primary);
  font: inherit;
}

.application-form textarea {
  resize: none;
}

.application-form input:focus,
.application-form textarea:focus {
  outline: 2px solid rgba(78, 79, 116, 0.35);
  border-color: rgba(78, 79, 116, 1);
}

.form-message {
  margin-top: 1rem;
  min-height: 1.5rem;
  color: var(--text-secondary);
}

.form-message.success {
  color: #86efac;
}

.form-message.error {
  color: #fda4af;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 1.25rem, 1120px);
  }

  .brand-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .nav-links:has(.text-link:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links .text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.55rem 0.4rem;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-size: 0.78rem;
    text-align: center;
    line-height: 1.25;
    box-shadow: 0 4px 14px var(--shadow-color);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .nav-links .text-link:active {
    transform: scale(0.98);
  }

  .theme-toggle {
    width: 100%;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card,
  .section-card,
  .cta-panel {
    padding: 1.25rem;
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

  .countdown {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .time-block {
    padding: 0.85rem;
  }

  .time-block span {
    font-size: 1.5rem;
  }
}
