:root {
    /* Anthropic-inspirert palett */
    --bg: #f0eee6;          /* elfenben / bone */
    --bg-alt: #faf9f5;      /* lysere kort */
    --ink: #191919;         /* nesten-svart tekst */
    --muted: #6b6a63;       /* varm grå */
    --accent: #cc785c;      /* Claude korall / book cloth */
    --accent-hover: #b5654a;
    --accent-soft: #f3e9e3;
    --slate: #141413;       /* mørke seksjoner */
    --slate-soft: #262625;
    --manilla: #ebdbbc;     /* varm sand */
    --sky: #cbcadb;         /* dus lilla-blå */
    --line: rgba(25, 25, 25, 0.12);
    --line-soft: rgba(25, 25, 25, 0.07);
    --radius: 16px;
    --radius-lg: 24px;
    --maxw: 1120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: rgba(240, 238, 230, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
    padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

/* ---------- Wordmark logo ---------- */
.logo {
    display: inline-flex;
    align-items: flex-start;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
    user-select: none;
}

.logo-star {
    display: inline-block;
    margin-left: 0.03em;
    font-size: 0.82em;
    line-height: 1;
    color: var(--accent);
    transform-origin: 50% 58%;
    animation: star-spin 1.5s cubic-bezier(0.2, 0.9, 0.2, 1.05) both;
}

.brand:hover .logo-star {
    color: var(--accent-hover);
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
    color: var(--ink);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    background: var(--ink);
    color: var(--bg);
    padding: 0.5rem 1.05rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.nav-cta:hover {
    background: #000;
    color: var(--bg);
}

/* ---------- Layout ---------- */
main {
    width: 100%;
    display: block;
}

.section {
    width: min(var(--maxw), calc(100% - 2.5rem));
    margin: 0 auto;
    padding: clamp(3.5rem, 8vw, 6.5rem) 0;
    border-bottom: 1px solid var(--line-soft);
}

/* ---------- Hero ---------- */
.hero {
    padding-top: clamp(4rem, 9vw, 8rem);
    padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
    max-width: none;
}

.kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.4rem;
}

h1,
h2,
h3 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.015em;
}

h1 {
    font-size: clamp(2.4rem, 6.4vw, 4.6rem);
    max-width: 17ch;
    margin-bottom: 1.6rem;
    color: var(--ink);
}

.lead {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.6;
    max-width: 60ch;
    color: var(--muted);
}

.hero-cta {
    margin-top: 2.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.85rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn.pulse {
    animation: pulse 0.26s ease-out;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-ghost {
    color: var(--ink);
    border-color: var(--line);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--ink);
}

.metric-strip {
    margin-top: 3rem;
    list-style: none;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    border-top: 1px solid var(--line);
    padding-top: 2.2rem;
}

.metric-strip li {
    display: grid;
    gap: 0.35rem;
}

.metric-strip span {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(2rem, 4.5vw, 3rem);
    color: var(--ink);
    line-height: 1;
}

.metric-strip small {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

/* ---------- Story ---------- */
.story {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.chapter {
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    border: 1px solid var(--line);
    background: var(--bg-alt);
}

.chapter-index {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
}

.chapter h2 {
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
    margin-bottom: 0.75rem;
}

.chapter p {
    line-height: 1.65;
    color: var(--muted);
}

/* ---------- Section headings ---------- */
.differentiator > h2,
.method > h2,
.contact > h2 {
    font-size: clamp(1.8rem, 4.4vw, 3rem);
    margin-bottom: 2.2rem;
    max-width: 20ch;
}

/* Metode-overskriften er lengre – la den flyte i full bredde og
   bryte balansert i stedet for å tvinges inn i 20ch. */
.method > h2 {
    max-width: none;
    text-wrap: balance;
}

/* ---------- Cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--bg-alt);
    padding: 1.8rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:nth-child(1) { background: #f7efe8; }
.card:nth-child(2) { background: #f4f1e8; }
.card:nth-child(3) { background: #eef0ea; }

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(25, 25, 25, 0.08);
}

.card h3 {
    margin-bottom: 0.6rem;
    font-size: 1.4rem;
}

.card p {
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- Timeline ---------- */
.timeline {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--bg-alt);
    padding: 1.8rem;
    display: grid;
    gap: 0.6rem;
}

.step span {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--accent);
    font-size: 1.6rem;
    line-height: 1;
}

.step h3 {
    font-size: 1.4rem;
}

.step p {
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- Manifesto (mørk seksjon) ---------- */
.manifesto {
    background: var(--slate);
    color: var(--bg);
    width: 100%;
    max-width: none;
    border-bottom: none;
    padding-left: clamp(1.25rem, 4vw, 3rem);
    padding-right: clamp(1.25rem, 4vw, 3rem);
}

.manifesto p {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.4rem, 3.4vw, 2.4rem);
    line-height: 1.3;
    max-width: 24ch;
    margin: 0 auto;
    width: min(var(--maxw), 100%);
    text-align: center;
    font-weight: 400;
}

/* ---------- Spotlight (lenke til ESL-siden) ---------- */
.spotlight-inner {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(135deg, #f7efe8, #f4f1e8);
    padding: clamp(1.8rem, 4vw, 3rem);
}

.spotlight-copy h2 {
    font-size: clamp(1.6rem, 3.8vw, 2.6rem);
    margin-bottom: 1rem;
    max-width: 18ch;
}

.spotlight-copy p {
    color: var(--muted);
    line-height: 1.65;
    max-width: 54ch;
    margin-bottom: 1.6rem;
}

.spotlight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.spotlight-tag {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.1rem, 2.4vw, 1.6rem);
    color: var(--accent);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.7rem 1.1rem;
    line-height: 1;
}

@media (max-width: 720px) {
    .spotlight-inner {
        grid-template-columns: 1fr;
    }

    .spotlight-tags {
        justify-content: flex-start;
    }
}

/* ---------- Contact ---------- */
.contact {
    text-align: center;
}

.contact > h2 {
    margin: 0 auto 1rem;
}

.contact p {
    margin: 0 auto 2rem;
    color: var(--muted);
    max-width: 52ch;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* ---------- Footer ---------- */
.site-footer {
    width: min(var(--maxw), calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 2.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--ink);
}

/* ---------- Reveal ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 720px) {
    nav {
        gap: 1rem;
    }

    nav a:not(.nav-cta) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.97);
    }
    100% {
        transform: scale(1);
    }
}

/* Asterisk spins several turns, then eases to rest with a subtle overshoot */
@keyframes star-spin {
    0% {
        transform: rotate(-540deg) scale(0.3);
        opacity: 0;
    }
    55% {
        opacity: 1;
    }
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

/* Replay class toggled by JS on hover / click */
.logo-star.spin {
    animation: star-replay 0.9s cubic-bezier(0.2, 0.9, 0.2, 1.05);
}

@keyframes star-replay {
    0% {
        transform: rotate(0deg) scale(1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}
