/* MAT Planner — aligned with desktop app: deep navy base, electric cyan accents, white type. */

:root {
  --bg: #0b1321;
  --bg-elevated: #101820;
  --bg-soft: #151f2e;
  --bg-softer: #1a2638;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.88);
  --muted: rgba(255, 255, 255, 0.62);
  --accent: #4dccff;
  --accent-bright: #00d2ff;
  --accent-glow: rgba(77, 204, 255, 0.45);
  --accent-muted: rgba(77, 204, 255, 0.14);
  --link: #4dccff;
  --link-hover: #7fe4ff;
  --border: rgba(77, 204, 255, 0.22);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius: 2px;
  --font-sans: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Montserrat", var(--font-sans);
  --max: 960px;
  --header-h: 72px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-soft);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(77, 204, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(0, 210, 255, 0.04), transparent);
  min-height: 100vh;
}

a {
  color: var(--link);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #0b1321;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 33, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 0 rgba(77, 204, 255, 0.06);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}

.brand:hover .brand-logo {
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

/* Intrinsic file size is 1024×1024; attributes preserve aspect ratio; display size is small in header. */
.brand-logo {
  display: block;
  width: 48px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-toggle-bar {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  justify-content: flex-end;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.nav-link:hover {
  color: var(--accent);
  background: transparent;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-summary {
  list-style: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.nav-dropdown-summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-summary::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.65;
}

.nav-dropdown[open] .nav-dropdown-summary {
  color: var(--accent);
}

.nav-dropdown-summary:hover {
  color: var(--accent);
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 8px 0;
  margin-top: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(77, 204, 255, 0.08);
  z-index: 120;
}

.nav-dropdown-panel a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-soft);
  text-decoration: none;
}

.nav-dropdown-panel a:hover {
  color: var(--accent);
  background: var(--accent-muted);
}

.nav-cta {
  margin-left: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright) 0%, #3ab8e0 100%);
  color: #0b1321;
  border-color: rgba(77, 204, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #7fe4ff 0%, var(--accent) 100%);
  color: #0b1321;
  box-shadow: 0 0 28px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-muted);
  color: var(--accent-bright);
  border-color: var(--accent-bright);
}

.btn-inline {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.content-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 56px;
}

.hero {
  text-align: center;
  padding: 8px 0 8px;
  max-width: 640px;
  margin: 0 auto;
}

#hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.section-rule {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 40px 0;
  box-shadow: 0 1px 0 rgba(77, 204, 255, 0.06);
}

.section {
  margin-top: 0;
}

.section-head {
  margin-bottom: 22px;
  text-align: left;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.section-head p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.download-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.download-card:hover {
  border-color: rgba(77, 204, 255, 0.45);
  box-shadow: 0 0 24px rgba(0, 210, 255, 0.08);
}

.download-card.featured {
  border-color: rgba(77, 204, 255, 0.5);
  background: linear-gradient(165deg, var(--bg-softer) 0%, var(--bg-elevated) 100%);
  box-shadow: 0 0 32px rgba(77, 204, 255, 0.1);
}

.download-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.download-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

.badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 5px 10px;
  border-radius: var(--radius);
  background: var(--accent-muted);
  color: var(--accent-bright);
  border: 1px solid var(--border);
  width: fit-content;
}

.launch-block {
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
}

.launch-block h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.code-block {
  position: relative;
  margin: 0 0 20px;
}

.code-block:last-child {
  margin-bottom: 0;
}

.code-block label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  background: #070b12;
  color: #e8f4ff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 72px 14px 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(77, 204, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--accent-bright);
  background: rgba(77, 204, 255, 0.15);
}

.copy-btn:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.copy-btn.copied {
  color: var(--accent-bright);
  border-color: rgba(77, 204, 255, 0.55);
}

.notice {
  margin-top: 40px;
  padding: 18px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-soft);
  box-shadow: 0 0 20px rgba(77, 204, 255, 0.06);
}

.notice strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 6px;
}

.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: 28px 24px 36px;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 600;
  color: var(--accent);
}

.site-footer a:hover {
  color: var(--accent-bright);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-actions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }

  .site-header.is-open .nav-actions {
    display: flex;
  }

  .nav-link {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-dropdown {
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-dropdown-summary {
    padding: 12px 0;
    width: 100%;
  }

  .nav-dropdown-panel {
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 8px 12px;
    margin-top: 0;
    background: transparent;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
    justify-content: center;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .site-header.is-open .header-inner {
    border-bottom: none;
  }
}
