/* =========================================================
   ispania.es — delt stilark
   Mediterran, varm, moderne design.
   ========================================================= */

:root {
  /* Merkevarefarger (fra logoen) */
  --color-terracotta: #E4703A;
  --color-terracotta-dark: #C1592A;
  --color-terracotta-light: #F0894F;
  --color-blue: #0E6480;
  --color-blue-light: #3FA9C9;
  --color-blue-dark: #0A4C61;
  --color-dark: #1C2B33;
  --color-cream: #F5F1EA;
  --color-cream-dark: #EAE2D3;
  --color-white: #FFFFFF;
  --color-text: #2A2622;
  --color-text-muted: #635C53;
  --color-border: #E3DACB;

  /* Typografi */
  --font-heading: 'Poppins', 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(28, 43, 51, 0.08);
  --shadow-md: 0 8px 28px rgba(28, 43, 51, 0.12);
  --transition: 180ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }

a {
  color: var(--color-blue);
  text-decoration: underline;
  text-decoration-color: rgba(14, 100, 128, 0.35);
  text-underline-offset: 3px;
  transition: color var(--transition);
}
a:hover, a:focus-visible { color: var(--color-terracotta); }

ul, ol { padding-left: 1.3em; }

.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;
  left: 0; top: -60px;
  background: var(--color-dark);
  color: #fff;
  padding: 0.7em 1.2em;
  z-index: 200;
  border-radius: 0 0 8px 0;
  transition: top var(--transition);
}
.skip-link:focus { top: 0; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 3.2rem 0; }
section.tight { padding: 1.8rem 0; }

.section-intro { max-width: 720px; margin-bottom: 2rem; }
.section-intro p { color: var(--color-text-muted); font-size: 1.1rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: 0.6em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 234, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.logo-link { display: inline-flex; }
.logo { height: 40px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-dark);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 40px;
  position: relative;
  cursor: pointer;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  content: "";
  display: block;
  position: absolute;
  left: 9px; right: 9px;
  height: 2px;
  background: var(--color-dark);
  transition: transform var(--transition);
}
.hamburger { top: 50%; transform: translateY(-50%); }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.3rem;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.primary-nav a {
  display: inline-block;
  padding: 0.45em 0.7em;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-dark);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a[aria-current="page"] {
  background: var(--color-terracotta);
  color: #fff;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 80vh;
    overflow-y: auto;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    padding: 0.8rem 1.2rem 1.4rem;
  }
  .primary-nav a { display: block; padding: 0.7em 0.5em; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(228, 112, 58, 0.18), transparent 45%),
    linear-gradient(160deg, var(--color-blue-dark) 0%, var(--color-blue) 55%, var(--color-blue-light) 130%);
  color: #fff;
  padding: 4.5rem 0 4rem;
}
.hero .container { display: grid; gap: 2rem; align-items: center; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,0.92); max-width: 620px; }
.hero .eyebrow { color: var(--color-terracotta-light); }

.page-hero {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-blue-dark) 100%);
  color: #fff;
  padding: 3rem 0 2.6rem;
}
.page-hero h1 { color: #fff; margin-bottom: 0.4em; }
.page-hero p { color: rgba(255,255,255,0.88); font-size: 1.1rem; max-width: 680px; margin: 0; }
.page-hero .eyebrow { color: var(--color-terracotta-light); }

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75em 1.4em;
  border-radius: 999px;
  text-decoration: none;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.btn-primary {
  background: var(--color-terracotta);
  color: #fff;
}
.btn-primary:hover { background: var(--color-terracotta-dark); color: #fff; transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.btn-outline:hover { background: #fff; color: var(--color-blue); transform: translateY(-2px); }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: 0.4em; font-size: 1.15rem; }
.card p { color: var(--color-text-muted); margin-bottom: 0.9em; font-size: 0.98rem; }
.card .card-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}
.card .card-link::after { content: "→"; transition: transform var(--transition); }
.card .card-link:hover::after { transform: translateX(3px); }

.card-terracotta { border-top: 4px solid var(--color-terracotta); }
.card-blue { border-top: 4px solid var(--color-blue); }

/* Fact / curiosity cards on homepage */
.facts-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.fact-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  border-left: 5px solid var(--color-blue-light);
}
.fact-card:nth-child(3n+2) { border-left-color: var(--color-terracotta); }
.fact-card:nth-child(3n) { border-left-color: var(--color-blue-dark); }
.fact-card p { margin: 0; color: var(--color-text); }
.fact-card .fact-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-terracotta);
  margin-bottom: 0.15em;
}

/* ---------- Section categories nav (index) ---------- */
.category-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.category-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.6rem;
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-terracotta);
}
.category-card .cat-icon { font-size: 1.8rem; margin-bottom: 0.5rem; display: block; }
.category-card h3 { color: var(--color-dark); margin-bottom: 0.3em; }
.category-card p { color: var(--color-text-muted); font-size: 0.95rem; margin: 0; }
.category-card.is-new { position: relative; }
.category-card.is-new::after {
  content: "Ny";
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--color-terracotta);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* ---------- Tables (used for link lists) ---------- */
.link-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.link-table th, .link-table td {
  text-align: left;
  padding: 0.9em 1.1em;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.96rem;
}
.link-table th {
  font-family: var(--font-heading);
  background: var(--color-blue);
  color: #fff;
}
.link-table tr:last-child td { border-bottom: none; }
.link-table tr:hover td { background: var(--color-cream); }

/* ---------- Alt bands ---------- */
.band { background: #fff; }
.band-alt { background: var(--color-cream-dark); }
.band-dark {
  background: var(--color-dark);
  color: rgba(255,255,255,0.9);
}
.band-dark h2 { color: #fff; }
.band-dark a { color: var(--color-blue-light); }

.callout {
  background: linear-gradient(135deg, var(--color-terracotta) 0%, var(--color-terracotta-light) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
}
.callout h2, .callout p { color: #fff; margin: 0; }
.callout .btn-outline { border-color: #fff; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--color-text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: 1.3fr 2fr;
}
.footer-brand .logo { height: 34px; margin-bottom: 0.8rem; }
.footer-brand p { color: rgba(255,255,255,0.6); max-width: 320px; font-size: 0.95rem; }

.footer-nav { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.footer-nav h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.7em; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 0.5em; }
.footer-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.92rem;
}
.footer-nav a:hover { color: var(--color-terracotta-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--color-blue-light); }

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Misc ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.tag-list li {
  background: var(--color-cream-dark);
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35em 0.9em;
  border-radius: 999px;
}

.note-box {
  background: #fff;
  border: 1px dashed var(--color-blue);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.stub-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--color-cream);
}
.stub-page .stub-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  max-width: 480px;
}
.stub-page img { margin: 0 auto 1.2rem; height: 44px; }

form.contact-form { display: grid; gap: 1rem; max-width: 560px; }
form.contact-form label { font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 0.3em; }
form.contact-form input, form.contact-form textarea {
  width: 100%;
  padding: 0.7em 0.9em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
}
form.contact-form textarea { min-height: 130px; resize: vertical; }
