* { box-sizing: border-box; }

:root {
  --md-black: #000000;
  --md-black-soft: #05070d;
  --md-surface: rgba(255,255,255,0.04);
  --md-surface-strong: rgba(255,255,255,0.07);
  --md-surface-elevated: rgba(255,255,255,0.10);
  --md-border: rgba(255,255,255,0.14);
  --md-border-strong: rgba(255,255,255,0.22);
  --md-text: #ffffff;
  --md-text-soft: rgba(255,255,255,0.82);
  --md-text-muted: rgba(255,255,255,0.62);
  --md-text-faint: rgba(255,255,255,0.45);
  --md-purple: #7b24aa;
  --md-purple-soft: rgba(123,36,170,0.16);
  --md-purple-glow: rgba(123,36,170,0.55);
  --md-purple-strong: #9b4dca;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-md: 0 14px 40px rgba(0,0,0,0.48);
  --shadow-lg: 0 24px 72px rgba(0,0,0,0.60);

  --container: 1100px;
  --legal-sidebar: 250px;
  --header-height: 72px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--md-black);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(123,36,170,0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(123,36,170,0.10), transparent 22%),
    linear-gradient(180deg, #030308 0%, #000000 100%);
  font-family: 'Roboto', sans-serif;
  color: var(--md-text);
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.6;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

button,
input,
textarea,
select {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  line-height: 1.15;
  color: var(--md-text);
}

p {
  margin: 0 0 var(--space-4);
  color: var(--md-text-soft);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid rgba(155,77,202,0.85);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.page-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: transparent;
}

/* Header */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.logo-container img {
  width: 36px;
  height: 36px;
  margin-right: 0.6rem;
}

.company-name {
  font-size: 1.25rem;
  font-family: 'Orbitron', sans-serif;
  color: var(--md-text);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-link {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.84);
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.35);
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  display: inline-flex;
  align-items: center;
}

.header-link:hover {
  background: rgba(123,36,170,0.55);
  border-color: rgba(255,255,255,0.65);
  box-shadow: 0 0 14px rgba(123,36,170,0.8);
  transform: translateY(-1px);
}

.header-icon-link {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
}

.header-icon-link:hover {
  background: #0e76a8;
  box-shadow: 0 0 12px rgba(14,118,168,0.8);
  transform: translateY(-1px);
}

.header-icon-link svg,
.header-link svg {
  width: 13px;
  height: 13px;
  fill: #ffffff;
}

main {
  padding-top: 5.5rem;
  padding-bottom: 0;
  min-height: calc(100vh - 5.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Homepage */

.banner {
  text-align: center;
  padding: 2.2rem 1.25rem 0.5rem;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 1.4s ease-out 0.3s forwards;
}

.banner h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem;
  margin-bottom: 1.1rem;
}

.motto {
  max-width: 900px;
  margin: 0 auto 1.25rem;
  font-weight: 500;
  text-align: center;
}

.inquiries-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0;
}

.primary-btn {
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 0.6rem 1.8rem;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all .3s;
  position: relative;
  overflow: hidden;
  font-size: 0.8rem;
  background: transparent;
  backdrop-filter: blur(6px);
}

.primary-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(123,36,170,0.8), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease-out;
  pointer-events: none;
}

.primary-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  transition: transform 0.6s ease, left 0.6s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(123,36,170,0.8);
  border-color: rgba(255,255,255,0.8);
}

.primary-btn:hover::before {
  opacity: 0.35;
}

.primary-btn:hover::after {
  left: 130%;
}

.primary-btn--small {
  padding: 0.45rem 1.4rem;
  font-size: 0.8rem;
}

.primary-btn--ghost {
  border-style: dashed;
}

.inquiries-message {
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity 0.2s ease-out;
  font-style: italic;
  color: var(--md-text-muted);
}

.inquiries-block:hover .inquiries-message {
  opacity: 0.7;
}

.divisions-section {
  padding: 0 1rem 2.2rem;
  width: 95%;
  max-width: 1100px;
  margin: 0 auto;
}

.divisions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.division-card {
  background: rgba(0,0,0,0.6);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.8);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  animation: fadeUp 1.2s ease-out forwards;
}

.division-card:nth-child(1) { animation-delay: 0.8s; }
.division-card:nth-child(2) { animation-delay: 1.0s; }
.division-card:nth-child(3) { animation-delay: 1.2s; }
.division-card:nth-child(4) { animation-delay: 1.4s; }

.division-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 14px 40px rgba(0,0,0,1);
  border-color: var(--md-purple);
}

.division-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #aaa;
  margin-bottom: 0.35rem;
}

.division-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.division-summary {
  font-size: 0.85rem;
  color: #ddd;
  text-align: left;
  max-width: none;
  margin: 0;
}

.projects-section {
  width: 95%;
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1rem 2rem;
  text-align: center;
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 1.2s ease-out 1.6s forwards;
}

.projects-github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.projects-github-link:hover {
  background: rgba(123,36,170,0.45);
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 0 16px rgba(123,36,170,0.7);
  transform: translateY(-2px);
}

.projects-github-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.projects-github-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Shared legal pages */

.legal-page {
  width: 100%;
}

.legal-hero {
  width: min(100% - 2rem, 1100px);
  margin: 2.25rem auto 0;
  padding: 2.1rem 1.25rem 0.75rem;
  text-align: left;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s ease-out 0.15s forwards;
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--md-border);
  background: rgba(255,255,255,0.04);
  color: var(--md-text-soft);
  font-size: 0.72rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.legal-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--md-purple);
  box-shadow: 0 0 10px var(--md-purple-glow);
}

.legal-hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.9rem;
}

.legal-hero p {
  max-width: 760px;
  font-size: 1rem;
  color: var(--md-text-soft);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--md-text-soft);
}

.hero-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--md-purple);
  box-shadow: 0 0 12px var(--md-purple-glow);
  flex-shrink: 0;
}

.legal-disclaimer {
  margin-top: 1rem;
  max-width: 820px;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(123,36,170,0.10);
  border: 1px solid rgba(123,36,170,0.24);
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
  line-height: 1.65;
}

.legal-layout {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto 3rem;
  padding: 1rem 0 2rem;
  display: grid;
  grid-template-columns: var(--legal-sidebar) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 88px;
}

.toc-card {
  background: var(--md-surface);
  border: 1px solid var(--md-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  padding: 1rem;
}

.toc-card h2 {
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-text-muted);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toc a {
  font-size: 0.9rem;
  color: var(--md-text-soft);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border-left: 2px solid transparent;
  background: transparent;
}

.toc a:hover {
  color: var(--md-text);
  background: rgba(255,255,255,0.05);
}

.toc a.active {
  color: #fff;
  border-left-color: var(--md-purple);
  background: rgba(123,36,170,0.14);
  box-shadow: inset 0 0 0 1px rgba(123,36,170,0.12);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legal-section {
  background: var(--md-surface);
  border: 1px solid var(--md-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  padding: 1.35rem 1.25rem;
  scroll-margin-top: 100px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
  font-size: 0.72rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--md-text-muted);
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--md-purple);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(123,36,170,0.45);
  flex-shrink: 0;
}

.legal-section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
  color: #fff;
}

.legal-section h3 {
  font-size: 1rem;
  margin: 1.15rem 0 0.55rem;
  color: #fff;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.45rem;
}

.legal-section li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--md-text-soft);
  line-height: 1.65;
}

.legal-section li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--md-purple-strong);
  font-weight: 700;
}

.callout {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  border: 1px solid var(--md-border);
  background: rgba(255,255,255,0.04);
}

.callout-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.callout strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 0.92rem;
}

.callout p,
.callout div {
  color: var(--md-text-soft);
  margin: 0;
}

.callout-info {
  border-left: 3px solid rgba(255,255,255,0.28);
}

.callout-legal,
.callout-warning {
  border-left: 3px solid var(--md-purple);
  background: rgba(123,36,170,0.10);
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.05rem;
  margin-top: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--md-border);
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(123,36,170,0.18);
  border: 1px solid rgba(123,36,170,0.32);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #fff;
}

.contact-card a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.35);
}

.contact-card a:hover {
  color: #fff;
  text-decoration-color: var(--md-purple-strong);
}

.company-tag {
  position: fixed;
  bottom: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  opacity: 0.5;
  color: #ffffff;
  pointer-events: none;
  z-index: 1100;
  font-family: 'Orbitron', sans-serif;
}

.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.8rem;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  z-index: 1200;
}

.copy-toast.copy-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.text-small { font-size: 0.875rem; }
.text-muted { color: var(--md-text-muted); }
.mb-0 { margin-bottom: 0; }

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(28px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1200px) {
  .banner h1 {
    font-size: 2.8rem;
  }

  .motto {
    max-width: 1100px;
  }
}

@media (min-aspect-ratio: 4/5) and (max-aspect-ratio: 5/4) {
  .divisions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
    display: none;
  }

  .legal-hero,
  .legal-layout {
    width: min(100% - 1.2rem, 1100px);
  }
}

@media (max-width: 600px) {
  header {
    flex-direction: row;
    align-items: center;
  }

  .company-name {
    font-size: 1.1rem;
  }

  .header-right {
    gap: 0.4rem;
  }

  .header-link {
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
  }

  .banner h1 {
    font-size: 2rem;
  }

  .legal-hero {
    padding-top: 1.5rem;
  }

  .legal-hero h1 {
    font-size: 1.85rem;
  }

  .hero-chip {
    width: 100%;
    justify-content: flex-start;
  }

  .legal-section {
    padding: 1.1rem 1rem;
  }
}

@media (max-aspect-ratio: 3/4) {
  .divisions-grid {
    grid-template-columns: 1fr;
  }

  body {
    font-size: 25px;
  }

  main {
    padding-top: 4.8rem;
    min-height: auto;
  }

  .division-card {
    padding: 2rem 2rem;
  }

  .division-summary {
    font-size: 2rem;
  }

  .banner h1 {
    font-size: 4rem;
  }

  .motto {
    font-size: 3rem;
  }

  .primary-btn.primary-btn--small {
    padding: 0.9rem 2.8rem;
    font-size: 1.6rem;
  }

  .company-name {
    font-size: 2.2rem;
  }

  .header-link {
    font-size: 1.4rem;
    padding: 0.6rem 1.6rem;
  }

  .legal-hero h1 {
    font-size: 3.5rem;
  }

  .legal-hero p,
  .legal-disclaimer,
  .legal-section p,
  .legal-section li,
  .toc a {
    font-size: 1.35rem;
  }

  .legal-section h2 {
    font-size: 2.1rem;
  }

  .legal-section h3 {
    font-size: 1.5rem;
  }

  .section-eyebrow,
  .legal-eyebrow,
  .toc-card h2 {
    font-size: 1rem;
  }

  .section-num {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .banner,
  .division-card,
  .projects-section,
  .legal-hero {
    opacity: 1;
    transform: none;
  }
}