:root {
  --bg: #1d150f;
  --bg-glow: #2c1f16;
  --bg-alt: #241a12;
  --bg-card: #2a1f16;
  --ink: #f0e2c8;
  --ink-dim: #b39d7d;
  --gold: #d4a942;
  --gold-bright: #f0c860;
  --gold-dark: #7a5220;
  --red: #6b1f2a;
  --red-bright: #8f2a38;
  --line: #4a3624;
  --green: #3e5c47;
  --maxw: 1180px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  line-height: 1.65;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(60,42,26,0.5) 0%, transparent 60%),
    linear-gradient(rgba(20,15,10,0.82), rgba(20,15,10,0.82)),
    url('img/hero_island.jpg');
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: cover, cover, cover;
  background-position: center, center, center 25%;
  background-attachment: scroll, scroll, fixed;
}
header.site-header {
  border-bottom: 1px solid var(--line);
  background-color: rgba(20, 15, 10, 0.9);
  background-image: linear-gradient(rgba(20,15,10,0.94), rgba(20,15,10,0.94)), url('img/bg_knit_tile.jpg');
  background-size: cover, 300px 300px;
  background-repeat: no-repeat, repeat;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; flex-wrap: wrap; gap: 12px;
}
.logo {
  text-decoration:none;
  font-size: 1.3rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fbe6a8 0%, var(--gold) 45%, var(--gold-dark) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6));
}
nav.main-nav { display: flex; gap: 24px; flex-wrap: wrap; }
nav.main-nav a {
  color: var(--ink-dim); text-decoration: none; font-size: 0.9rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid transparent; padding-bottom: 3px;
  transition: color 0.2s;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--gold-bright); border-bottom-color: var(--gold); }
.lang-switch { display:flex; gap: 6px; font-size: 0.8rem; }
.lang-switch a {
  color: var(--ink-dim); text-decoration:none; padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 3px;
}
.lang-switch a.active { color: var(--bg); background: var(--gold); border-color: var(--gold); }
main { max-width: var(--maxw); margin: 0 auto; padding: 0 28px 80px; min-height: 60vh; }

/* --- knitted / embroidered rope text, used for all headings --- */
.rope-text, h1, h2, .logo {
  background: linear-gradient(180deg, #fce8ae 0%, var(--gold) 40%, var(--gold-dark) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(255,235,180,0.35))
    drop-shadow(0 2px 1px rgba(0,0,0,0.5))
    drop-shadow(0 4px 6px rgba(0,0,0,0.55));
}

/* --- theatrical curtain hero, framing the world like a stage window --- */
.hero {
  position: relative;
  text-align: center; padding: 120px 20px 90px;
  margin: 0 -28px 56px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 700px 420px at 50% 35%, rgba(240,200,96,0.14) 0%, transparent 65%),
    linear-gradient(180deg, rgba(18,12,8,0.82) 0%, rgba(18,12,8,0.78) 60%, var(--bg) 100%),
    url('img/hero_island.jpg');
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center 30%;
  background-size: cover, cover, cover;
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 {
  font-size: 3.1rem; margin: 0 0 6px;
  letter-spacing: 0.03em;
}
.ornament {
  color: var(--gold); font-size: 1.1rem; letter-spacing: 0.4em;
  margin: 14px 0 22px; opacity: 0.85;
}
.hero p {
  font-size: 1.12rem; color: var(--ink); max-width: 600px; margin: 0 auto;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
main > h1:first-child { padding-top: 54px; }
h1 { font-size: 2rem; font-weight: 700; }
h2 {
  font-size: 1.35rem; border-bottom: 1px solid var(--line); padding-bottom: 8px;
  margin-top: 48px; font-weight: 700;
}
p { color: var(--ink); }
a { color: var(--gold); }
.placeholder-note {
  background: var(--bg-card); border: 1px dashed var(--line); border-radius: 6px;
  padding: 16px 20px; font-style: italic; color: var(--ink-dim); font-size: 0.9rem;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin-top: 24px; }
/* --- character card lightbox: click a cast thumbnail to see their full card --- */
.card img.has-card { cursor: pointer; }
.card img.has-card:hover { filter: saturate(1.05) brightness(1.05); }
.card-lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(10, 7, 4, 0.92);
  align-items: center; justify-content: center; padding: 40px 20px;
}
.card-lightbox.open { display: flex; }
.card-lightbox img { max-width: min(92vw, 700px); max-height: 88vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.card-lightbox video { max-width: min(92vw, 900px); max-height: 88vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.card img.has-video, .card img.has-card { cursor: pointer; }
.card-lightbox .lightbox-close {
  position: absolute; top: 22px; right: 30px; color: var(--ink);
  font-size: 2rem; line-height: 1; cursor: pointer; background: none; border: none;
}
.card-lightbox .lightbox-close:hover { color: var(--gold-bright); }
.card {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background-color: var(--bg-card);
  background-image: linear-gradient(rgba(42,31,22,0.9), rgba(42,31,22,0.9)), url('img/bg_knit_tile.jpg');
  background-size: cover, 220px 220px;
  background-repeat: no-repeat, repeat;
  min-height: 140px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card img { width: 100%; height: 160px; object-fit: cover; display: block; filter: saturate(0.95) brightness(0.92); }
.card img.cover-top { object-position: top; }
.card img.book-cover { height: 230px; object-fit: contain; background: #16100a; }
/* blurred-backdrop cover: the image itself, blurred, fills the box behind the contained cover */
.cover-wrap { position: relative; height: 230px; overflow: hidden; background-size: cover; background-position: center; }
.cover-wrap::before { content: ""; position: absolute; inset: 0; backdrop-filter: blur(22px) saturate(1.15); -webkit-backdrop-filter: blur(22px) saturate(1.15); background: rgba(20, 13, 8, 0.35); }
.cover-wrap img, .card .cover-wrap img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: none; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 20px; }
.photo-grid img { width: 100%; height: 130px; object-fit: cover; display: block; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; filter: saturate(0.95) brightness(0.92); transition: transform 0.2s, border-color 0.2s; }
.photo-grid img:hover { transform: translateY(-2px); border-color: var(--gold); }
.card .card-body { padding: 16px 18px; }
.card h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 700; }
.card p { margin: 0; font-size: 0.88rem; color: var(--ink-dim); }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0 8px; }
.tab {
  padding: 8px 20px; border-radius: 3px; border: 1px solid var(--line);
  background: var(--bg-card); cursor: pointer; font-size: 0.88rem;
  text-decoration:none; color: var(--ink-dim); letter-spacing: 0.02em;
}
.tab.active { background: var(--green); color: var(--ink); border-color: var(--green); }
.sub-links { display:flex; gap: 16px; margin: 20px 0; }
.sub-links a {
  padding: 10px 22px; border-radius: 4px; background: var(--bg-card);
  border: 1px solid var(--line); text-decoration:none; color: var(--gold-bright);
  font-size: 0.95rem;
}
.sub-links a:hover { border-color: var(--gold); }
footer {
  border-top: 1px solid var(--line); text-align: center; padding: 34px;
  font-size: 0.82rem; color: var(--ink-dim);
  background-color: rgba(15,10,7,0.6);
  background-image: linear-gradient(rgba(15,10,7,0.88), rgba(15,10,7,0.88)), url('img/bg_knit_tile.jpg');
  background-size: cover, 300px 300px;
  background-repeat: no-repeat, repeat;
}

/* --- real generated rope-text word images, replacing CSS text approximation --- */
.logo-img { height: 34px; width: auto; display: block; }
.heading-img { max-width: 100%; height: auto; max-height: 130px; display: block; margin: 0 0 8px; }
main > .heading-img:first-child { margin-top: 54px; }
.hero .heading-img { max-height: 170px; margin: 0 auto 8px; }

.card-featured {
  grid-column: span 2;
  text-decoration: none;
  display: block;
}
.card-featured img { height: 260px; }
.card-featured h3 { font-size: 1.15rem; }
@media (max-width: 560px) {
  .card-featured { grid-column: span 1; }
}

.card-overlay {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
}
.card-overlay img { display: none; }
.card-overlay .card-overlay-body {
  padding: 20px 22px;
  position: relative; z-index: 2;
}
.card-overlay .card-overlay-body h3 {
  font-size: 1.2rem; margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.card-overlay .card-overlay-body p {
  color: var(--ink); font-size: 0.92rem; margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.song-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}
.song-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 10px 14px;
  text-align: center;
}
.song-thumb-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--line);
  padding: 0;
  cursor: pointer;
  background: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.song-thumb-btn img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.25s;
}
.song-thumb-btn:hover { transform: translateY(-2px); border-color: var(--gold); }
.song-thumb-btn:hover img { transform: scale(1.06); }
.song-thumb-btn.playing {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(227,185,79,0.35), 0 4px 18px rgba(0,0,0,0.5);
}
.song-play-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,15,10,0.28);
  opacity: 0; transition: opacity 0.2s, background 0.2s;
}
.song-thumb-btn:hover .song-play-icon { opacity: 1; }
.song-thumb-btn.playing .song-play-icon {
  opacity: 1;
  background: rgba(20,15,10,0.15);
}
.song-play-icon svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7)); }
.song-num {
  display: inline-block; color: var(--gold); font-weight: 700;
  font-size: 0.8em; margin-top: 10px;
}
.song-title { display: block; margin-top: 2px; font-size: 0.92em; line-height: 1.25; }
.song-card audio { display: none; }


.btn-gold {
  display: inline-block; margin-top: 18px; padding: 12px 26px;
  background: var(--gold); color: #1d150f; font-weight: 700;
  border-radius: 6px; text-decoration: none; letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}
.btn-gold:hover { background: var(--gold-bright); transform: translateY(-1px); }
.read-cta {
  background-color: var(--bg-card);
  background-image: linear-gradient(rgba(42,31,22,0.88), rgba(42,31,22,0.88)), url('img/bg_knit_tile.jpg');
  background-size: cover, 220px 220px;
  background-repeat: no-repeat, repeat;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 28px 30px; margin-top: 24px;
}
.read-cta h3 { margin: 0 0 8px; font-size: 1.15rem; }
.read-cta p { margin: 0; color: var(--ink-dim); font-size: 0.94rem; }

footer p { margin: 4px 0; }
footer a { color: var(--gold-bright); }

.usage-note {
  background: rgba(198,151,64,0.1); border: 1px dashed rgba(198,151,64,0.5); border-radius: 6px;
  padding: 12px 18px; color: var(--ink-dim); font-size: 0.9rem; margin: 10px 0 18px;
}

.btn-outline {
  display: inline-block; margin-top: 18px; margin-left: 14px; padding: 11px 26px;
  background: transparent; color: var(--gold-bright); font-weight: 700;
  border: 1px solid var(--gold); border-radius: 6px; text-decoration: none;
  letter-spacing: 0.02em; transition: background 0.2s, transform 0.15s;
}
.btn-outline:hover { background: rgba(212,169,66,0.12); transform: translateY(-1px); }
.shop-actions { margin-top: 8px; }

.story-btn-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px; margin-top: 24px;
}
.story-btn {
  display: block; padding: 16px 16px; text-align: center;
  border: 1px solid var(--line); border-radius: 8px;
  background-color: var(--bg-card);
  background-image: linear-gradient(rgba(42,31,22,0.9), rgba(42,31,22,0.9)), url('img/bg_knit_tile.jpg');
  background-size: cover, 200px 200px; background-repeat: no-repeat, repeat;
  text-decoration: none; font-size: 0.95rem; line-height: 1.3;
  transition: border-color 0.2s, transform 0.15s;
}
.story-btn:hover { border-color: var(--gold); transform: translateY(-2px); }
.story-btn .rope-text { font-weight: 700; }

/* --- episode video embeds (Watch page) --- */
.pilot-badge {
  display: inline-block; background: var(--red); color: var(--ink);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 4px; margin-bottom: 10px;
}
.video-wrap {
  position: relative; width: 100%; padding-bottom: 56.25%; height: 0;
  overflow: hidden; border-radius: 10px; border: 1px solid var(--line);
  margin-top: 20px; background: #000;
}
.video-wrap iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* --- Gufubær Music Festival: Spotify album embed (Listen page) --- */
.spotify-album {
  display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap;
  margin-top: 24px;
}
.spotify-album-cover {
  width: 260px; max-width: 100%; border-radius: 10px; border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: block;
}
.spotify-embed { flex: 1 1 320px; min-width: 280px; }
.spotify-embed iframe {
  width: 100%; height: 352px; border: 0; border-radius: 12px;
}

/* =========================================================================
   Added 2026-08-06: standalone story-text reading pages (read-text/*.html)
   and the merged Read page (two-box story cards: Illustrated + Read).
   ========================================================================= */

/* --- story-text reading pages: readable prose column --- */
.story-text {
  max-width: 720px;
  margin: 28px auto 0;
  font-size: 1.05rem;
}
.story-text p { margin: 0 0 1.1em; }
main .btn-outline { display: inline-block; }

/* --- merged Read page: one card per story, two action buttons beneath the cover --- */
.story-card {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background-color: var(--bg-card);
  background-image: linear-gradient(rgba(42,31,22,0.9), rgba(42,31,22,0.9)), url('img/bg_knit_tile.jpg');
  background-size: cover, 220px 220px; background-repeat: no-repeat, repeat;
  display: flex; flex-direction: column;
}
.story-card img.cover-top {
  width: 100%; height: 160px; object-fit: cover; object-position: top; display: block;
  filter: saturate(0.95) brightness(0.92);
}
.story-card .card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.story-card h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--ink); }
.story-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.story-action-btn {
  display: block; text-align: center; padding: 8px 10px; border-radius: 6px;
  font-size: 0.85rem; text-decoration: none; border: 1px solid var(--line);
  background: rgba(212,169,66,0.08); color: var(--gold-bright);
  transition: border-color 0.2s, background 0.2s;
}
.story-action-btn:hover { border-color: var(--gold); background: rgba(212,169,66,0.16); }
.story-action-btn.disabled {
  color: var(--ink-dim); cursor: default; opacity: 0.55;
  border-style: dashed; background: none;
}
.story-action-caption {
  display: block; font-size: 0.72rem; color: var(--ink-dim);
  text-align: center; margin-top: -4px; font-style: italic;
}
