:root {
  color-scheme: dark;

  --bg-0: #0b0c10;
  --bg-1: #101218;
  --text: #eef0f2;
  --muted: rgba(238, 240, 242, 0.72);

  --accent: #9aa3ad;
  --accent-strong: #c6ced6;

  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.20);

  --radius: 14px;
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.55);

  --icon-size: 32px;

  --bg-image: url("../images/background.jpeg");
  --bg-image-set: image-set(
    url("../images/bg/background-720.jpeg") 1x,
    url("../images/bg/background-1024.jpeg") 2x
  );

  --card-bg: rgba(10, 11, 14, 0.68);
  --card-bg-top: rgba(255, 255, 255, 0.05);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

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

html,
body {
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Albert Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;

  background-color: var(--bg-0);
  background:
    /* soft overall dark overlay */
    linear-gradient(180deg, rgba(6, 7, 9, 0.78), rgba(6, 7, 9, 0.88)),

    /* fade the image into the base background near the bottom */
    linear-gradient(180deg, rgba(11, 12, 16, 0.00) 0%, rgba(11, 12, 16, 0.00) 60%, rgba(11, 12, 16, 1.00) 100%),

    var(--bg-image) center / cover no-repeat,
    radial-gradient(1200px 800px at 20% 15%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(900px 600px at 70% 85%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg-0), #07080b 55%, var(--bg-0));

  /* Nice on desktop, but buggy / janky on mobile Safari */
  background-attachment: fixed;
}

@media (max-width: 820px), (pointer: coarse) {
  body {
    background-attachment: scroll;

    /* Fewer background layers = less work while scrolling */
    background:
      linear-gradient(180deg, rgba(6, 7, 9, 0.78), rgba(6, 7, 9, 0.88)),
      linear-gradient(180deg, rgba(11, 12, 16, 0.00) 0%, rgba(11, 12, 16, 0.00) 55%, rgba(11, 12, 16, 1.00) 100%),
      var(--bg-image) center / cover no-repeat;
  }

  @supports (background-image: image-set("" 1x)) {
    body {
      background:
        linear-gradient(180deg, rgba(6, 7, 9, 0.78), rgba(6, 7, 9, 0.88)),
        linear-gradient(180deg, rgba(11, 12, 16, 0.00) 0%, rgba(11, 12, 16, 0.00) 55%, rgba(11, 12, 16, 1.00) 100%),
        var(--bg-image-set) center / cover no-repeat;
    }
  }

  /* Background 'fixed' is already disabled above; also reduce expensive overlays */
  body::before,
  body::after {
    opacity: 0;
  }

  /* Backdrop blur is costly on many mobile GPUs */
  .card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.14;
  mix-blend-mode: overlay;

  /* layered repeating gradients approximate noise */
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 2px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06) 1px, transparent 1px, transparent 3px),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.06), transparent 48%),
    radial-gradient(circle at 75% 78%, rgba(0, 0, 0, 0.12), transparent 52%);
  filter: contrast(120%) saturate(80%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  opacity: 0.10;

  background-image:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.04) 1px,
      rgba(0, 0, 0, 0.00) 3px,
      rgba(0, 0, 0, 0.00) 5px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.06),
      rgba(0, 0, 0, 0.06) 1px,
      transparent 1px,
      transparent 14px
    );

  mix-blend-mode: overlay;
}

/* Firefox tends to struggle more with fixed overlay layers + blend modes/filters.
   This opt-out keeps the design but improves scroll performance. */
@-moz-document url-prefix() {
  body::before,
  body::after {
    mix-blend-mode: normal;
    filter: none;
    opacity: 0;
  }

  .card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

main {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 28px 18px 40px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.language-toggle {
  display: inline-flex;
  gap: 10px;
}

h1 {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.02;

  letter-spacing: 0.03em;
  text-transform: uppercase;

  font-stretch: condensed;
  font-weight: 800;

  color: var(--accent-strong);
}

h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 800;
  color: color-mix(in srgb, var(--accent) 92%, var(--text));
}

p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.02rem;
}

ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

li {
  margin: 6px 0;
}

.card {
  margin: 16px 0;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);

  background:
    linear-gradient(180deg, var(--card-bg-top), rgba(255, 255, 255, 0.02)),
    var(--card-bg);

  /* Slightly stronger blur helps separate text from photo */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;

  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);

  font: inherit;
  cursor: pointer;
  user-select: none;

  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.button .label {
  display: inline-block;
  line-height: 1;
}

.button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent-strong) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  border-color: color-mix(in srgb, var(--accent-strong) 48%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-weight: 700;
}

.button .icon {
  display: block;
  flex: 0 0 auto;
  width: var(--icon-size);
  height: var(--icon-size);
}

footer {
  margin-top: 22px;
  opacity: 0.6;
}

.band {
  margin: 6px 0 6px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent-strong) 72%, var(--text));
  opacity: 0.92;
}

.cta {
  margin: 10px 0 10px;
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 92%, var(--accent));
}

.cta-links {
  margin: 0 0 18px;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
