/*
Theme Name: Graulund Portal
Theme URI: https://www.graulund.dk/
Author: OpenAI Codex
Author URI: https://www.graulund.dk/
Description: TV2-inspired portal theme for Graulund.dk with direct access to core subsites.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: graulund-portal
*/

:root {
  --gp-bg: #eef2f7;
  --gp-surface: #ffffff;
  --gp-surface-alt: #0d1f3a;
  --gp-surface-alt-2: #11284a;
  --gp-ink: #0c1627;
  --gp-muted: #52627c;
  --gp-border: rgba(12, 22, 39, 0.09);
  --gp-accent: #c40022;
  --gp-accent-alt: #ffcc00;
  --gp-shadow: 0 24px 60px rgba(10, 20, 35, 0.12);
  --gp-radius-xl: 28px;
  --gp-radius-lg: 20px;
  --gp-radius-md: 14px;
  --gp-radius-sm: 999px;
  --gp-max: 1240px;
  --gp-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(196, 0, 34, 0.08), transparent 22%),
    linear-gradient(180deg, #e7edf5 0%, #f3f5f9 240px, #eef2f7 100%);
  color: var(--gp-ink);
  font-family: var(--gp-font);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.gp-site {
  min-height: 100vh;
}

.gp-shell {
  width: min(calc(100% - 32px), var(--gp-max));
  margin: 0 auto;
}

.gp-topbar {
  background: linear-gradient(135deg, #09182f, #12335f 72%);
  color: #f7f9fc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.gp-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.gp-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
}

.gp-brand__mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(140deg, var(--gp-accent), #ff4c6d);
  box-shadow: 0 14px 32px rgba(196, 0, 34, 0.35);
  position: relative;
  overflow: hidden;
}

.gp-brand__mark::before,
.gp-brand__mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.gp-brand__mark::before {
  inset: 10px 8px auto 22px;
  height: 9px;
  transform: rotate(-30deg);
}

.gp-brand__mark::after {
  inset: auto 10px 10px 12px;
  height: 8px;
  transform: rotate(-22deg);
}

.gp-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gp-nav a {
  color: rgba(247, 249, 252, 0.88);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--gp-radius-sm);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.gp-nav a:hover,
.gp-nav a:focus-visible,
.gp-nav a.is-current {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.gp-main {
  padding: 28px 0 64px;
}

.gp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: stretch;
}

.gp-card {
  background: var(--gp-surface);
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-radius-xl);
  box-shadow: var(--gp-shadow);
  overflow: hidden;
}

.gp-card--lead {
  min-height: 420px;
  background:
    linear-gradient(140deg, rgba(4, 17, 38, 0.88), rgba(10, 34, 67, 0.75)),
    radial-gradient(circle at top right, rgba(255, 204, 0, 0.18), transparent 26%),
    linear-gradient(135deg, #0a1830, #14355e);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

.gp-card--lead::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 18px);
  pointer-events: none;
}

.gp-card__inner {
  position: relative;
  padding: clamp(28px, 4vw, 44px);
}

.gp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: var(--gp-radius-sm);
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gp-card--lead h1,
.gp-page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.gp-card--lead p,
.gp-page-hero p {
  margin: 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.gp-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: var(--gp-radius-sm);
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.gp-button:hover,
.gp-button:focus-visible {
  transform: translateY(-2px);
}

.gp-button--primary {
  background: var(--gp-accent);
  color: #fff;
  box-shadow: 0 18px 32px rgba(196, 0, 34, 0.24);
}

.gp-button--secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.gp-sidebar {
  display: grid;
  gap: 18px;
}

.gp-card--sidebar {
  background: linear-gradient(180deg, #0f2444, #10213c);
  color: #fff;
}

.gp-card--sidebar .gp-card__inner {
  padding: 26px;
}

.gp-card--sidebar h2 {
  margin: 14px 0 10px;
  font-size: 1.45rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.gp-card--sidebar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.gp-meta {
  font-size: 0.92rem;
  color: var(--gp-muted);
}

.gp-section {
  margin-top: 26px;
}

.gp-section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.gp-section__header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.gp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gp-tease {
  position: relative;
  min-height: 240px;
  background: linear-gradient(150deg, #132947, #1b4e86);
  color: #fff;
}

.gp-tease--accent {
  background: linear-gradient(135deg, #8d0018, #d50028 70%);
}

.gp-tease--light {
  background: linear-gradient(180deg, #fff, #f6f8fb);
  color: var(--gp-ink);
}

.gp-tease__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.gp-tease h3 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.gp-tease p {
  margin: 0;
  color: inherit;
  opacity: 0.88;
}

.gp-linklist {
  display: grid;
  gap: 12px;
}

.gp-linkrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(13, 31, 58, 0.08);
  border-radius: var(--gp-radius-md);
}

.gp-linkrow strong {
  font-size: 1.05rem;
}

.gp-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gp-highlight {
  padding: 24px;
  background: var(--gp-surface);
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-radius-lg);
  box-shadow: 0 16px 36px rgba(10, 20, 35, 0.08);
}

.gp-highlight h3 {
  margin: 10px 0;
  font-size: 1.4rem;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.gp-highlight p {
  margin: 0 0 18px;
  color: var(--gp-muted);
}

.gp-page-hero {
  background: linear-gradient(140deg, #0a1830, #163860 72%);
  color: #fff;
  border-radius: var(--gp-radius-xl);
  padding: clamp(28px, 4vw, 42px);
  box-shadow: var(--gp-shadow);
}

.gp-page-wrap {
  margin-top: 24px;
  padding: clamp(24px, 4vw, 34px);
  background: var(--gp-surface);
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-radius-xl);
  box-shadow: var(--gp-shadow);
}

.gp-page-wrap h2,
.gp-page-wrap h3,
.gp-page-wrap h4 {
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.gp-page-wrap .entry-content > *:first-child {
  margin-top: 0;
}

.gp-page-wrap .entry-content > *:last-child {
  margin-bottom: 0;
}

.gp-footer {
  background: #09182f;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 42px;
}

.gp-footer__inner {
  padding: 28px 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

.gp-footer__links a {
  padding: 10px 14px;
  border-radius: var(--gp-radius-sm);
  background: rgba(255, 255, 255, 0.08);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1024px) {
  .gp-hero,
  .gp-grid,
  .gp-highlights {
    grid-template-columns: 1fr;
  }

  .gp-card--lead {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .gp-shell {
    width: min(calc(100% - 20px), var(--gp-max));
  }

  .gp-topbar__inner,
  .gp-footer__inner,
  .gp-section__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .gp-nav {
    width: 100%;
  }

  .gp-nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .gp-linkrow {
    align-items: flex-start;
    flex-direction: column;
  }

  .gp-card--lead h1,
  .gp-page-hero h1 {
    font-size: clamp(2rem, 12vw, 3.4rem);
  }
}
