:root {
  color-scheme: light;
  --background: #e9dece;
  --surface: rgba(246, 238, 227, 0.96);
  --surface-strong: #f8f1e7;
  --text: #45484d;
  --muted: #6d6863;
  --accent: #5aa6d6;
  --accent-dark: #2f6f98;
  --accent-soft: #dbeaf4;
  --taupe-soft: #e6d8c7;
  --graphite-soft: #d8d8d6;
  --border: #bda68f;
  --background-cool-glow: rgba(90, 166, 214, 0.12);
  --background-warm-glow: rgba(139, 105, 76, 0.16);
  --focus-ring: rgba(90, 166, 214, 0.14);
  --shadow: 0 18px 45px rgba(78, 63, 50, 0.18);
  --card-hover-shadow: 0 14px 30px rgba(60, 73, 82, 0.18);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #171a1f;
  --surface: rgba(30, 34, 40, 0.96);
  --surface-strong: #272c34;
  --text: #edf1f5;
  --muted: #bbc1c8;
  --accent: #69b9e8;
  --accent-dark: #a3d8f5;
  --accent-soft: #263b4a;
  --taupe-soft: #3b342e;
  --graphite-soft: #343941;
  --border: #626b76;
  --background-cool-glow: rgba(90, 166, 214, 0.18);
  --background-warm-glow: rgba(122, 93, 72, 0.16);
  --focus-ring: rgba(105, 185, 232, 0.28);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
  --card-hover-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #171a1f;
    --surface: rgba(30, 34, 40, 0.96);
    --surface-strong: #272c34;
    --text: #edf1f5;
    --muted: #bbc1c8;
    --accent: #69b9e8;
    --accent-dark: #a3d8f5;
    --accent-soft: #263b4a;
    --taupe-soft: #3b342e;
    --graphite-soft: #343941;
    --border: #626b76;
    --background-cool-glow: rgba(90, 166, 214, 0.18);
    --background-warm-glow: rgba(122, 93, 72, 0.16);
    --focus-ring: rgba(105, 185, 232, 0.28);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
    --card-hover-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--background-cool-glow), transparent 30rem),
    radial-gradient(circle at bottom right, var(--background-warm-glow), transparent 32rem),
    var(--background);
}

button,
select {
  font: inherit;
}

a {
  color: inherit;
}

.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;
}

.page-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.hero,
.content-section,
footer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  overflow: hidden;
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

.hero-copy {
  padding: clamp(1.4rem, 4vw, 2.5rem);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 0.6rem;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.hero-copy > p:not(.eyebrow),
.section-heading > p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

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

.secondary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.secondary-links a,
.theme-toggle,
.language-select {
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent-dark);
  font-weight: 750;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.secondary-links a,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.theme-toggle {
  gap: 0.5rem;
  cursor: pointer;
}

.theme-toggle-icon {
  width: 1.1rem;
  text-align: center;
}

.language-control {
  display: inline-flex;
}

.language-select {
  min-width: 190px;
  cursor: pointer;
}

.secondary-links a:hover,
.secondary-links a:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible,
.language-select:hover,
.language-select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
  outline: none;
  transform: translateY(-1px);
}

.content-section {
  margin-top: 1.5rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.6rem 0;
}

.link-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(150deg, var(--surface-strong), var(--accent-soft));
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.link-card:nth-child(2) {
  background: linear-gradient(150deg, var(--surface-strong), var(--taupe-soft));
}

.link-card:nth-child(3) {
  background: linear-gradient(150deg, var(--surface-strong), var(--graphite-soft));
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--card-hover-shadow);
  outline: none;
  transform: translateY(-3px);
}

.link-card strong {
  color: var(--text);
  font-size: 1.2rem;
}

.link-card span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.card-label {
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

footer {
  margin-top: 1.5rem;
  padding: 1.3rem 1.6rem;
  color: var(--muted);
  text-align: center;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 1rem, 1100px);
    padding-top: 0.5rem;
  }

  .hero,
  .content-section,
  footer {
    border-radius: 22px;
  }

  .hero-image {
    aspect-ratio: 16 / 8;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .theme-toggle,
  .language-control,
  .language-select {
    justify-content: center;
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    min-height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .link-card,
  .secondary-links a,
  .theme-toggle,
  .language-select {
    transition: none;
  }
}
