/* ============================================
   Snjallkennsluvefurinn — Nordic Moss & Light
   Scandinavian forest green · editorial warmth
   ============================================ */

/* -- Custom Properties -- */
:root {
    /* Forest palette */
    --color-forest:       #1b3a2d;
    --color-forest-deep:  #122820;
    --color-moss:         #2d5a3f;
    --color-fern:         #3d7a5a;
    --color-sage:         #5a8f72;
    --color-lichen:       #89b89e;
    --color-mint:         #c8e0d2;
    --color-mist:         #e8f0eb;

    /* Warm accents */
    --color-birch:        #f4efe6;
    --color-bark:         #8b7355;
    --color-amber:        #d4a039;
    --color-amber-light:  #fdf5e3;
    --color-white:        #fafaf8;
    --color-pure-white:   #ffffff;

    /* Neutrals */
    --color-text:         #1a2e25;
    --color-text-soft:    #4a6358;
    --color-text-muted:   #7a9188;
    --color-border:       #d1ddd6;

    /* Semantic */
    --color-primary:      var(--color-forest);
    --color-accent:       var(--color-fern);
    --color-accent-hover: var(--color-moss);
    --color-surface:      var(--color-pure-white);
    --color-bg:           var(--color-birch);
    --color-light-bg:     var(--color-mist);
    --color-gold:         var(--color-amber);
    --color-gold-light:   var(--color-amber-light);

    /* Typography */
    --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --fs-xs:  clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
    --fs-sm:  clamp(0.8125rem, 0.76rem + 0.3vw, 0.9375rem);
    --fs-base: clamp(0.9375rem, 0.88rem + 0.35vw, 1.0625rem);
    --fs-lg:  clamp(1.0625rem, 0.96rem + 0.5vw, 1.25rem);
    --fs-xl:  clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
    --fs-2xl: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
    --fs-3xl: clamp(1.875rem, 1.4rem + 2.2vw, 3rem);
    --fs-4xl: clamp(2.25rem, 1.6rem + 3vw, 4rem);
    --fs-5xl: clamp(2.75rem, 1.8rem + 4.2vw, 5rem);

    /* Spacing */
    --space-2xs: 0.25rem;
    --space-xs:  0.5rem;
    --space-sm:  0.75rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Radius */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-pill:  50px;

    /* Shadows — forest-tinted */
    --shadow-sm:   0 1px 3px rgba(27, 58, 45, 0.06);
    --shadow-md:   0 4px 12px rgba(27, 58, 45, 0.08);
    --shadow-lg:   0 8px 30px rgba(27, 58, 45, 0.1);
    --shadow-xl:   0 16px 50px rgba(27, 58, 45, 0.12);
    --shadow-glow: 0 0 40px rgba(61, 122, 90, 0.15);

    /* Layout */
    --header-height: 80px;
    --container-max: 1240px;
    --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- Base -- */
body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background: var(--color-bg);
    font-weight: 400;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    font-weight: 400;
    color: var(--color-forest);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

p + p { margin-top: var(--space-md); }

a {
    color: var(--color-accent);
    transition: color var(--transition);
}
a:hover { color: var(--color-accent-hover); }

::selection {
    background: var(--color-mint);
    color: var(--color-forest-deep);
}

/* -- Container -- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-xl);
}

/* ============================================
   HEADER — Floating glass morphism nav
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10001;
    height: var(--header-height);
    background: rgba(250, 250, 248, 0.85);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(27, 58, 45, 0.06);
    transition: all var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(27, 58, 45, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    transition: opacity var(--transition);
}
.logo-link:hover { opacity: 0.8; }

.logo-img {
    height: 48px;
    width: auto;
}

.logo-text {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    color: var(--color-forest);
    display: none;
}

/* -- Navigation -- */
.nav-toggle {
    display: none;
    padding: var(--space-xs);
    z-index: 10002;
    position: relative;
}

.nav-close {
    display: none;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 26px;
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--color-forest);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-xs) var(--space-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text-soft);
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: 0;
}

.nav-link:hover {
    color: var(--color-forest);
    background: var(--color-mist);
}

.nav-item.active > .nav-link {
    color: var(--color-forest);
    background: var(--color-mint);
    font-weight: 600;
}

.dropdown-arrow {
    transition: transform var(--transition);
    flex-shrink: 0;
    opacity: 0.5;
}

/* -- Dropdown -- */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 240px;
    background: var(--color-pure-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    padding: var(--space-xs);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.has-dropdown.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.has-dropdown.open > .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-link {
    display: block;
    padding: var(--space-xs) var(--space-md);
    font-size: var(--fs-sm);
    color: var(--color-text-soft);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.dropdown-link:hover,
.dropdown-link.active {
    background: var(--color-mist);
    color: var(--color-forest);
}

.dropdown-link.active {
    font-weight: 600;
}

/* ============================================
   HERO — Dramatic forest gradient with organic shapes
   ============================================ */
.hero {
    position: relative;
    padding: var(--space-3xl) 0 var(--space-2xl);
    background: linear-gradient(160deg, var(--color-forest-deep) 0%, var(--color-forest) 30%, var(--color-moss) 60%, var(--color-fern) 100%);
    color: var(--color-white);
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Organic blob shapes */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(ellipse, rgba(137, 184, 158, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroFloat 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(200, 224, 210, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroFloat 25s ease-in-out infinite reverse;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(2%, -3%) scale(1.02); }
    66% { transform: translate(-1%, 2%) scale(0.98); }
}

/* Subtle noise texture */
.hero-texture {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3xl);
}

.hero-content {
    max-width: 640px;
    flex: 1;
}

.hero-logo {
    flex-shrink: 0;
    animation: heroSlideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-logo img {
    width: 340px;
    height: auto;
    filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.2));
}

.hero h1 {
    color: var(--color-pure-white);
    margin-bottom: var(--space-lg);
    font-weight: 400;
    font-size: var(--fs-4xl);
    line-height: 1.1;
}

.hero p {
    font-size: var(--fs-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-xl);
    line-height: 1.75;
    max-width: 580px;
    font-weight: 300;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(212, 160, 57, 0.12);
    border: 1px solid rgba(212, 160, 57, 0.25);
    color: var(--color-amber);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 500;
    margin-bottom: var(--space-2xl);
    backdrop-filter: blur(10px);
    animation: badgeFadeIn 1s ease 0.5s both;
}

@keyframes badgeFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-badge svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Decorative bottom wave */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 3;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Staggered entrance */
.hero-content > * {
    animation: heroSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-content > *:nth-child(1) { animation-delay: 0.15s; }
.hero-content > *:nth-child(2) { animation-delay: 0.3s; }
.hero-content > *:nth-child(3) { animation-delay: 0.45s; }

@keyframes heroSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   PAGE HEADER — Elegant interior pages
   ============================================ */
.page-header {
    position: relative;
    background: linear-gradient(160deg, var(--color-forest-deep), var(--color-forest) 50%, var(--color-moss));
    color: var(--color-white);
    padding: var(--space-4xl) 0 var(--space-3xl);
    text-align: center;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(137, 184, 158, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: var(--color-pure-white);
    margin-bottom: var(--space-sm);
    animation: heroSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-lg);
    max-width: 640px;
    margin-inline: auto;
    font-weight: 300;
    animation: heroSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.page-header-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 2;
    line-height: 0;
}

.page-header-wave svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--space-4xl) 0;
}

.section--light {
    background: var(--color-mist);
}

.section--dark {
    background: var(--color-forest);
    color: var(--color-mint);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-pure-white);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title h2 {
    margin-bottom: var(--space-sm);
    position: relative;
    display: inline-block;
}

/* Decorative underline on section titles */
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--color-fern);
    border-radius: 2px;
}

.section-title p {
    color: var(--color-text-muted);
    font-size: var(--fs-lg);
    max-width: 520px;
    margin-inline: auto;
    margin-top: var(--space-lg);
    font-weight: 300;
}

/* ============================================
   TEXT BLOCK
   ============================================ */
.text-block {
    max-width: 760px;
    margin-inline: auto;
    line-height: 1.85;
    font-size: var(--fs-base);
    color: var(--color-text-soft);
}

.text-block p {
    margin-bottom: var(--space-lg);
}

.text-block a {
    color: var(--color-fern);
    text-decoration: underline;
    text-decoration-color: var(--color-mint);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    transition: text-decoration-color var(--transition);
}

.text-block a:hover {
    text-decoration-color: var(--color-fern);
}

/* ============================================
   VIDEO GRID — Premium card treatment
   ============================================ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: var(--space-xl);
}

.video-item {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition-slow);
    border: 1px solid rgba(27, 58, 45, 0.04);
}

.video-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.video-item lite-youtube {
    aspect-ratio: 16/9;
    border-radius: 0;
}

.video-item-info {
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
}

.video-item-title {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-weight: 400;
    color: var(--color-forest);
    line-height: 1.3;
}

.video-item-desc {
    margin-top: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: 1.65;
}

.video-item-desc p + p {
    margin-top: var(--space-xs);
}

/* ============================================
   IMAGE CARD GRID — Elegant tool cards
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: var(--space-xl);
}

.image-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid rgba(27, 58, 45, 0.04);
    position: relative;
}

.image-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    opacity: 0;
    transition: opacity var(--transition);
    box-shadow: var(--shadow-glow);
    pointer-events: none;
}

.image-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-xl);
    color: var(--color-text);
}

.image-card:hover::before {
    opacity: 1;
}

.image-card-img {
    aspect-ratio: 16/10;
    object-fit: contain;
    width: 100%;
    padding: var(--space-xl);
    background: var(--color-light-bg);
    transition: transform var(--transition-slow);
}

.image-card:hover .image-card-img {
    transform: scale(1.03);
}

.image-card-img-wrap {
    overflow: hidden;
}

.image-card-body {
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.image-card-title {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    color: var(--color-forest);
    margin-bottom: var(--space-xs);
}

.image-card-desc {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    flex: 1;
    line-height: 1.65;
}

.image-card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-fern);
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-top: var(--space-lg);
    transition: gap var(--transition);
    letter-spacing: 0.02em;
}

.image-card:hover .image-card-arrow {
    gap: 12px;
}

/* ============================================
   FEATURED CARD — Prominent link card
   ============================================ */
.featured-card {
    display: block;
    max-width: 680px;
    margin-inline: auto;
    background: linear-gradient(160deg, var(--color-forest-deep) 0%, var(--color-forest) 40%, var(--color-moss) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    text-decoration: none;
    color: var(--color-pure-white);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition), box-shadow var(--transition-slow);
}

.featured-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 55%;
    height: 160%;
    background: radial-gradient(ellipse, rgba(137, 184, 158, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.featured-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(61, 122, 90, 0.2);
    color: var(--color-pure-white);
}

.featured-card-icons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.featured-card-body {
    position: relative;
    z-index: 1;
}

.featured-card h2 {
    font-family: var(--font-display);
    font-size: var(--fs-3xl);
    color: var(--color-pure-white);
    margin-bottom: var(--space-md);
}

.featured-card p {
    font-size: var(--fs-lg);
    color: rgba(255, 255, 255, 0.8);
    max-width: 480px;
    margin-inline: auto;
    line-height: 1.7;
    font-weight: 300;
}

.featured-card-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-xl);
    padding: var(--space-sm) var(--space-xl);
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-pure-white);
    letter-spacing: 0.02em;
    transition: all var(--transition);
}

.featured-card:hover .featured-card-cta {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 480px) {
    .featured-card {
        padding: var(--space-2xl) var(--space-lg);
    }

    .featured-card-icons {
        gap: var(--space-sm);
    }
}

/* ============================================
   TEAM GRID — Refined author profiles
   ============================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: var(--space-2xl);
    max-width: 900px;
    margin-inline: auto;
}

.team-member {
    text-align: center;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(27, 58, 45, 0.04);
    position: relative;
    overflow: hidden;
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-fern), var(--color-sage), var(--color-lichen));
}

.team-member-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--space-xl);
    border: 4px solid var(--color-mist);
    box-shadow: 0 8px 24px rgba(27, 58, 45, 0.12);
    transition: transform var(--transition);
}

.team-member:hover .team-member-img {
    transform: scale(1.05);
}

.team-member-name {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    color: var(--color-forest);
    margin-bottom: var(--space-xs);
}

.team-member-role {
    font-size: var(--fs-sm);
    color: var(--color-fern);
    font-weight: 600;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.02em;
}

.team-member-bio {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: 1.75;
    margin-bottom: var(--space-lg);
}

.team-member-email {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-fern);
    font-size: var(--fs-sm);
    font-weight: 500;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.team-member-email:hover {
    background: var(--color-mist);
    color: var(--color-forest);
    border-color: var(--color-lichen);
}

/* ============================================
   AWARD LINE — Elegant gold ribbon
   ============================================ */
.award-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(200, 224, 210, 0.15);
    font-size: var(--fs-sm);
    color: var(--color-lichen);
}

.award-line svg {
    width: 20px;
    height: 20px;
    color: var(--color-amber);
    flex-shrink: 0;
}

.award-line strong {
    color: var(--color-amber);
    font-weight: 600;
}

/* ============================================
   FOOTER — Deep forest
   ============================================ */
.site-footer {
    background: var(--color-forest-deep);
    color: var(--color-lichen);
    padding: var(--space-3xl) 0 var(--space-2xl);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-sage), transparent);
}

.footer-bottom {
    text-align: center;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    color: var(--color-mint);
    margin-bottom: var(--space-sm);
}

.footer-copy {
    font-size: var(--fs-sm);
    margin-bottom: var(--space-sm);
    color: var(--color-text-muted);
}

.footer-authors a {
    color: var(--color-sage);
    font-size: var(--fs-xs);
    transition: color var(--transition);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
}

.footer-authors a:hover {
    color: var(--color-mint);
    text-decoration-color: var(--color-sage);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--fs-sm);
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
}

.btn-accent {
    background: var(--color-fern);
    color: var(--color-pure-white);
    box-shadow: 0 4px 14px rgba(61, 122, 90, 0.25);
}

.btn-accent:hover {
    background: var(--color-moss);
    color: var(--color-pure-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 122, 90, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--color-pure-white);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
    border-color: var(--color-pure-white);
    color: var(--color-pure-white);
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   404
   ============================================ */
.page-404 {
    text-align: center;
    padding: var(--space-5xl) 0;
}

/* ============================================
   SCROLL REVEAL — Only activate when JS adds .js-ready to html
   ============================================ */
.js-ready .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-ready .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.js-ready .reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-ready .reveal-stagger.visible > *:nth-child(1)  { transition-delay: 0.05s; }
.js-ready .reveal-stagger.visible > *:nth-child(2)  { transition-delay: 0.1s; }
.js-ready .reveal-stagger.visible > *:nth-child(3)  { transition-delay: 0.15s; }
.js-ready .reveal-stagger.visible > *:nth-child(4)  { transition-delay: 0.2s; }
.js-ready .reveal-stagger.visible > *:nth-child(5)  { transition-delay: 0.25s; }
.js-ready .reveal-stagger.visible > *:nth-child(6)  { transition-delay: 0.3s; }
.js-ready .reveal-stagger.visible > *:nth-child(7)  { transition-delay: 0.35s; }
.js-ready .reveal-stagger.visible > *:nth-child(8)  { transition-delay: 0.4s; }
.js-ready .reveal-stagger.visible > *:nth-child(9)  { transition-delay: 0.45s; }
.js-ready .reveal-stagger.visible > *:nth-child(10) { transition-delay: 0.5s; }

.js-ready .reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    :root {
        --header-height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-close {
        display: block;
        position: absolute;
        top: var(--space-lg);
        right: var(--space-xl);
        padding: var(--space-xs);
        color: var(--color-forest);
    }

    /* On mobile, JS moves .main-nav to <body> so it escapes
       the header's stacking context (sticky + backdrop-filter) */
    .main-nav {
        position: fixed;
        inset: 0;
        background: var(--color-birch);
        padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99999;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-link {
        padding: var(--space-md) var(--space-sm);
        font-size: var(--fs-base);
        border-bottom: 1px solid var(--color-border);
        border-radius: 0;
        justify-content: space-between;
    }

    .dropdown-menu,
    .has-dropdown.open > .dropdown-menu {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        min-width: 0 !important;
        width: 100% !important;
        display: none;
        background: var(--color-mist);
    }

    .has-dropdown.open > .dropdown-menu {
        display: block;
    }

    .dropdown-link {
        padding: var(--space-sm) var(--space-xl);
        border-bottom: 1px solid var(--color-border);
        border-radius: 0;
        color: var(--color-text) !important;
        font-size: var(--fs-base);
    }

    .logo-img {
        height: 38px;
    }

    .hero-inner {
        flex-direction: column;
    }

    .hero-logo {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: var(--space-3xl) 0 var(--space-2xl);
    }

    .hero h1 {
        font-size: var(--fs-3xl);
    }

    .page-header {
        padding: var(--space-3xl) 0 var(--space-2xl);
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    .section-title {
        margin-bottom: var(--space-2xl);
    }
}

/* -- Search Toggle (header) -- */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: color var(--transition), background var(--transition);
    cursor: pointer;
}

.search-toggle:hover {
    color: var(--color-accent);
    background: var(--color-light-bg);
}

/* -- Search Overlay -- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(18, 40, 32, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: min(20vh, 160px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-container {
    width: 100%;
    max-width: 640px;
    margin-inline: var(--space-lg);
    background: var(--color-pure-white);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: transform 0.2s ease;
}

.search-overlay.is-open .search-container {
    transform: translateY(0) scale(1);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.search-input-wrapper .search-icon {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: var(--fs-lg);
    font-family: var(--font-body);
    color: var(--color-text);
    background: transparent;
}

#search-input::placeholder {
    color: var(--color-text-muted);
}

.search-kbd {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: var(--fs-xs);
    font-family: var(--font-body);
    color: var(--color-text-muted);
    background: var(--color-light-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: background var(--transition);
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--color-light-bg);
}

.search-result-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--color-text-muted);
}

.search-result-item.active .search-result-icon {
    color: var(--color-accent);
}

.search-result-body {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-title mark {
    background: var(--color-gold-light);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.search-result-desc {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
    margin-top: 2px;
}

.search-result-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    background: var(--color-light-bg);
    color: var(--color-text-muted);
}

.search-result-tag[data-type="video"] {
    background: var(--color-amber-light);
    color: #92400e;
}

.search-result-tag[data-type="page"] {
    background: #dbeafe;
    color: #1e40af;
}

.search-result-tag[data-type="tool"] {
    background: var(--color-mist);
    color: var(--color-forest);
}

.search-result-tag[data-type="verkefni"] {
    background: #ede9fe;
    color: #5b21b6;
}

.search-empty {
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
}

.search-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    border-top: 1px solid var(--color-border);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.search-hint kbd {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    font-size: 0.7rem;
    font-family: var(--font-body);
    background: var(--color-light-bg);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    margin: 0 2px;
}

@media (max-width: 480px) {
    .container {
        padding-inline: var(--space-md);
    }

    .team-member {
        padding: var(--space-xl) var(--space-lg);
    }

    .team-member-img {
        width: 120px;
        height: 120px;
    }

    .hero {
        padding: var(--space-2xl) 0 var(--space-xl);
    }

    .video-item-info {
        padding: var(--space-md) var(--space-lg) var(--space-lg);
    }

    .search-overlay {
        padding-top: 0;
    }

    .search-container {
        margin: 0;
        border-radius: 0;
        min-height: 100dvh;
    }

    .search-results {
        max-height: calc(100dvh - 140px);
    }

    .search-hint {
        display: none;
    }
}
