/* w3.at — European Internet Autonomy */

:root {
  --bg: #111111;
  --bg-elevated: #1a1a1a;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --border: #2e2e2e;
  --border-strong: #c2410c;
  --text: #f0f0f0;
  --text-muted: #9a9a9a;
  --accent: #ea580c;
  --accent-hover: #f97316;
  --accent-muted: #fdba74;
  --tag-bg: #2a1a12;
  --radius: 6px;
  --radius-sm: 4px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1120px;
  --header-h: 3.5rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f5;
    --border: #e0e0e0;
    --border-strong: #c2410c;
    --text: #171717;
    --text-muted: #525252;
    --accent: #c2410c;
    --accent-hover: #ea580c;
    --accent-muted: #9a3412;
    --tag-bg: #fff7ed;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-mark {
  color: var(--accent);
}

.brand-tld {
  color: var(--text-muted);
  font-weight: 500;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--text);
}

/* Hero */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 6rem) clamp(1.25rem, 4vw, 2.5rem) 4rem;
}

.hero-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0;
  max-width: 38rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

/* Sections */

.section {
  padding: 4rem 0;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 36rem;
}

.section-why h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
}

.why-grid article {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.why-grid h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.why-grid p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.section-highlight {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

/* Cards */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.12s, background 0.12s;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.card-featured {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.card h3,
.card h4 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.card h3 a,
.card h4 a {
  color: var(--text);
  text-decoration: none;
}

.card h3 a:hover,
.card h4 a:hover {
  color: var(--accent);
}

.card p {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--tag-bg);
  border-radius: var(--radius-sm);
}

.category-block {
  margin-bottom: 2.75rem;
}

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

.category-title {
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* Directories */

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.link-list li:last-child {
  border-bottom: none;
}

.link-list a {
  font-weight: 600;
}

.note {
  margin: 2rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-meta {
  font-size: 0.8rem !important;
  opacity: 0.75;
}

/* Responsive nav */

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding-block: 1rem;
  }

  .site-nav {
    width: 100%;
  }
}
