:root {
  --color-bg-base: #030712;
  --color-surface-panel: #0B1528;
  --color-surface-panel-hover: #111C44;
  --color-text-primary: #F3F4F6;
  --color-text-secondary: #A0AEC0;
  --color-accent: #818CF8;
  --color-accent-hover: #A5B4FC;
  --color-border-subtle: #2D3748;
  --color-overlay: #030712;

  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;

  --text-display-size: clamp(3rem, 6vw, 4.5rem);
  --text-h1-size: clamp(2.25rem, 4.5vw, 3.5rem);
  --text-h2-size: clamp(1.75rem, 3.5vw, 2.5rem);
  --text-h3-size: clamp(1.5rem, 2.5vw, 2rem);
  --text-h4-size: clamp(1.25rem, 2vw, 1.5rem);
  --text-body-size: 1.125rem;
  --text-small-size: 0.875rem;
  --text-caption-size: 0.75rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 6rem;
  --space-9: 8rem;

  --container-max: 75rem;
  --container-padding: clamp(1.5rem, 4vw, 3rem);

  --radius-small: 0.25rem;
  --radius-medium: 0.75rem;
  --radius-large: 1.5rem;
  --radius-full: 999px;

  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-accent: 0 0 8px rgba(129, 140, 248, 0.5);

  --panel-gradient: linear-gradient(135deg, #0B1528 0%, #111C44 100%);
}

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

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

body {
  min-height: 100vh;
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 0.2em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  line-height: 1.2;
  font-weight: 700;
  margin-block-end: var(--space-4);
}

h1 {
  font-size: var(--text-h1-size);
  line-height: 1.15;
  font-weight: 700;
}

h2 {
  font-size: var(--text-h2-size);
  line-height: 1.2;
  font-weight: 600;
}

h3 {
  font-size: var(--text-h3-size);
  line-height: 1.25;
  font-weight: 600;
}

h4 {
  font-size: var(--text-h4-size);
  line-height: 1.3;
  font-weight: 600;
}

h5 {
  font-size: var(--text-body-size);
  line-height: 1.4;
  font-weight: 600;
}

h6 {
  font-size: var(--text-small-size);
  line-height: 1.4;
  font-weight: 600;
}

p {
  font-size: var(--text-body-size);
  line-height: 1.6;
  margin-block-end: var(--space-4);
}

ul,
ol {
  margin-block-end: var(--space-4);
  padding-inline-start: var(--space-4);
}

blockquote {
  margin-block-end: var(--space-4);
  padding-inline-start: var(--space-4);
  border-inline-start: 3px solid var(--color-accent);
  color: var(--color-text-secondary);
  font-style: italic;
}

figure {
  margin-block-end: var(--space-4);
}

figcaption {
  font-size: var(--text-caption-size);
  color: var(--color-text-secondary);
  margin-block-start: var(--space-2);
}

dl,
dd {
  margin-block-end: var(--space-4);
}

dt {
  font-weight: 600;
}

address {
  font-style: normal;
}

hr {
  border: none;
  border-block-start: 1px solid var(--color-border-subtle);
  margin-block: var(--space-6);
}

small {
  font-size: var(--text-small-size);
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-block-end: var(--space-4);
}

th,
td {
  padding: var(--space-2) var(--space-3);
  text-align: start;
  border-block-end: 1px solid var(--color-border-subtle);
}

th {
  font-weight: 600;
  color: var(--color-text-primary);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-bg-base);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.surface-panel {
  background: var(--panel-gradient);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.surface-panel > :last-child {
  margin-block-end: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-small);
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg-base);
  border: 1px solid var(--color-accent);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-bg-base);
}

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

.btn-outline:hover {
  background-color: rgba(129, 140, 248, 0.1);
  border-color: var(--color-accent-hover);
  color: var(--color-accent-hover);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-subtle);
}

.btn-ghost:hover {
  background-color: var(--color-surface-panel-hover);
  border-color: var(--color-text-secondary);
  color: var(--color-text-primary);
}

.card {
  background: var(--panel-gradient);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft), 0 0 16px rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.4);
}

.card-body {
  padding: var(--space-5);
}

.card-body > :last-child {
  margin-block-end: 0;
}

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-medium);
  border: 1px solid var(--color-border-subtle);
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ratio-16x9 {
  aspect-ratio: 16 / 9;
}

.ratio-4x3 {
  aspect-ratio: 4 / 3;
}

.ratio-1x1 {
  aspect-ratio: 1 / 1;
}

.overlay-gradient {
  position: relative;
}

.overlay-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 7, 18, 0.8) 0%, rgba(3, 7, 18, 0.3) 50%, rgba(3, 7, 18, 0.1) 100%);
  pointer-events: none;
  border-radius: inherit;
}

.flex {
  display: flex;
}

.flex-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.flex-row > * {
  min-width: 0;
  flex-shrink: 1;
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.flex-col > * {
  min-width: 0;
  flex-shrink: 1;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.flex-between > * {
  min-width: 0;
  flex-shrink: 1;
}

.flex-start {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.flex-start > * {
  min-width: 0;
  flex-shrink: 1;
}

.flex-end {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.flex-end > * {
  min-width: 0;
  flex-shrink: 1;
}

.flex-1 {
  flex: 1 1 0%;
  min-width: 0;
}

.flex-auto {
  flex: 0 1 auto;
  min-width: 0;
}

.flex-none {
  flex: 0 0 auto;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-accent { color: var(--color-accent); }

.text-display {
  font-family: var(--font-heading);
  font-size: var(--text-display-size);
  line-height: 1.1;
  font-weight: 700;
  margin-block-end: var(--space-4);
}

.text-small {
  font-size: var(--text-small-size);
  line-height: 1.5;
}

.text-caption {
  font-size: var(--text-caption-size);
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  background-color: var(--color-accent);
  color: var(--color-bg-base);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-small);
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--color-bg-base);
  text-decoration: none;
}