/* ============================================================
   Callisto SLU Landing Page Styles
   Dark, elegant, minimal. System fonts only. No external deps.
   ============================================================ */

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

:root {
  --bg:           #0b0c10;
  --bg-surface:   #111318;
  --bg-card:      #161820;
  --border:       #232530;
  --text-primary: #e8eaf0;
  --text-secondary: #9aa0bb;
  --text-muted:   #7a80a0;
  --accent:       #a8b4d8;
  --accent-glow:  #6b7eb8;
  --white:        #ffffff;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif, "Apple Color Emoji";
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Fira Mono",
               Menlo, Monaco, Consolas, monospace;

  --radius-sm:  6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --max-w: 960px;
  --section-gap: 6rem;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
}

/* ── Layout helpers ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

section {
  padding-block: var(--section-gap);
}

/* ── Nav ────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.nav-brand svg {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-primary);
}

/* Language switcher (globe + dropdown) */
.nav-lang {
  display: flex;
  align-items: center;
}

.lang-switcher {
  position: relative;
  display: inline-flex;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  padding: 0.4rem 0.65rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.lang-trigger:hover,
.lang-trigger[aria-expanded="true"] {
  color: var(--text-primary);
  border-color: var(--accent-glow);
}
.lang-globe {
  flex-shrink: 0;
  color: var(--accent);
}
.lang-current {
  font-weight: 500;
}
.lang-caret {
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.2s;
}
.lang-trigger[aria-expanded="true"] .lang-caret {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 9.5rem;
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 200;
}
.lang-menu[hidden] {
  display: none;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  color: var(--text-secondary);
  padding: 0.55rem 0.7rem;
  transition: color 0.2s, background 0.2s;
}
.lang-option:hover,
.lang-option:focus-visible {
  color: var(--text-primary);
  background: rgba(107, 126, 184, 0.12);
}
.lang-option[aria-current="true"] {
  color: var(--accent);
  font-weight: 600;
}
/* Checkmark on the active language (decorative; state conveyed by aria-current) */
.lang-option[aria-current="true"]::after {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5 6.5 12 13 4.5'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5 6.5 12 13 4.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.25rem;
  line-height: 0;
  border-radius: var(--radius-sm);
}

@media (max-width: 600px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-right: -0.25rem;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem 1.5rem;
    gap: 1.25rem;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .nav-lang {
    margin-top: 0.5rem;
    width: 100%;
  }
  /* On mobile the menu sits within the dropped nav panel: open it downward,
     full-width, so it never overflows the viewport. */
  .lang-switcher {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .lang-trigger {
    width: 100%;
    justify-content: flex-start;
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
    min-height: 44px;
  }
  .lang-trigger .lang-caret {
    margin-left: auto;
  }
  .lang-menu {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
  }
  .lang-option {
    font-size: 0.95rem;
    min-height: 44px;
  }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: 7rem 6rem;
  overflow: hidden;
  text-align: center;
}

/* Subtle starfield canvas background */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* SVG wordmark + moon motif */
.hero-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.hero-wordmark svg.moon-glyph {
  opacity: 0.85;
}

.wordmark-text {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  line-height: 1;
  text-transform: uppercase;
}

.wordmark-sub {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.5;
}

.hero-tagline em {
  color: var(--accent);
  font-style: normal;
}

.cta-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  border: 1.5px solid transparent;
  letter-spacing: 0.02em;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent-glow);
  color: var(--bg);
  border-color: var(--accent-glow);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 16px rgba(107, 126, 184, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent-glow);
  background: rgba(107, 126, 184, 0.07);
}

/* Orbit divider below hero */
.orbit-rule {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  opacity: 0.35;
}

/* ── Section titles ─────────────────────────────────────────── */
.section-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-glow);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
}

/* ── Services ───────────────────────────────────────────────── */
#services {
  background: var(--bg-surface);
}

.services-header {
  margin-bottom: 3rem;
}

/* Five-card grid.
   Desktop: 6-col track, each card spans 2 cols (3 per row). The two trailing
   cards are nudged in by one column each so row 2 reads as a centered pair
   rather than two orphans pinned left. */
.cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
.cards > .card {
  grid-column: span 2;
}
.cards > .card:nth-child(4) {
  grid-column: 2 / span 2;
}
.cards > .card:nth-child(5) {
  grid-column: 4 / span 2;
}

/* Two columns on medium screens: 4 + 1, with the lone last card centered. */
@media (max-width: 880px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
  .cards > .card {
    grid-column: span 2;
  }
  .cards > .card:nth-child(4) {
    grid-column: span 2;
  }
  .cards > .card:nth-child(5) {
    grid-column: 2 / span 2;
  }
}

/* One column on narrow screens. */
@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .cards > .card,
  .cards > .card:nth-child(4),
  .cards > .card:nth-child(5) {
    grid-column: 1 / -1;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 0 24px rgba(107, 126, 184, 0.1);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background: rgba(107, 126, 184, 0.12);
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── About ──────────────────────────────────────────────────── */
#about .about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 680px) {
  #about .about-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.about-body p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.about-body p:last-child {
  margin-bottom: 0;
}

.about-body strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Moon visual */
.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Contact ────────────────────────────────────────────────── */
#contact {
  background: var(--bg-surface);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 720px) {
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.contact-aside p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Email CTA: a prominent primary button plus the address as readable text. */
.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.contact-cta .btn {
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
}

.contact-email-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  margin: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.25rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copy a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.footer-copy a:hover {
  color: var(--text-secondary);
  border-color: var(--text-muted);
}

.footer-nav {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover {
  color: var(--text-secondary);
}

/* ── Utility ────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus rings */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgba(107, 126, 184, 0.35);
  color: var(--white);
}
