/* LovAPI landing page. Same family as the Lovkompas site (Inter, off-black
   on white, monochrome weight), with one restrained accent used only for
   links and code syntax. Light and dark themes are token swaps. */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-code: #f6f7f9;
    --border-subtle: #e6e8eb;
    --text-primary: #111111;
    --text-body: #333333;
    --text-secondary: #666666;
    --accent: #2447b3;
    --cta-bg: #111111;
    --cta-hover: #333333;
    --cta-text: #ffffff;

    --syntax-key: #2447b3;
    --syntax-string: #1d6b4f;
    --syntax-number: #9a4a12;
    --syntax-tag: #6b3fa0;
    --syntax-comment: #8a8f98;

    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --radius-sm: 4px;
    --radius-md: 8px;
    --max-w: 72rem;
    --max-w-narrow: 46rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #111214;
        --bg-secondary: #16181b;
        --bg-code: #1b1d21;
        --border-subtle: #2a2d32;
        --text-primary: #f2f3f5;
        --text-body: #d4d6da;
        --text-secondary: #9a9fa8;
        --accent: #8ea8ff;
        --cta-bg: #f2f3f5;
        --cta-hover: #d4d6da;
        --cta-text: #111214;

        --syntax-key: #8ea8ff;
        --syntax-string: #7fd1ae;
        --syntax-number: #f0a872;
        --syntax-tag: #c7a6f2;
        --syntax-comment: #6f7480;
    }
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

[id] {
    scroll-margin-top: 5rem;
}

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-body);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2rem, 4.2vw, 2.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 2.6vw, 1.9rem);
    font-weight: 600;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

p {
    margin: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }
}

.container-narrow {
    max-width: var(--max-w-narrow);
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 4rem;
}

.wordmark {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.wordmark:hover {
    text-decoration: none;
}

.wordmark-mark {
    color: var(--accent);
    margin-right: 0.3rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.925rem;
}

.site-nav a:not(.button) {
    color: var(--text-secondary);
}

.site-nav a:not(.button):hover {
    color: var(--text-primary);
    text-decoration: none;
}

/* On phones the header keeps only the wordmark, the language switch and
   the key button; docs, pricing and FAQ are one scroll away. */
@media (max-width: 720px) {
    .site-nav a:not(.button):not(.lang-switch) {
        display: none;
    }
}

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--cta-bg);
    background: var(--cta-bg);
    color: var(--cta-text);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: background-color 0.15s ease;
}

.button:hover {
    background: var(--cta-hover);
    border-color: var(--cta-hover);
    text-decoration: none;
}

.button-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.button-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.button-small {
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
}

/* Hero */

.hero {
    padding: 4rem 0 5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

@media (min-width: 960px) {
    .hero {
        padding: 6rem 0;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        gap: 4rem;
    }

    .hero-copy {
        padding-top: 1.5rem;
    }
}

.lead {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    color: var(--text-body);
    max-width: 34rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.fineprint {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Code panels */

.code-panel {
    margin: 0;
    min-width: 0;
    background: var(--bg-code);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-panel pre {
    margin: 0;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--text-primary);
    tab-size: 4;
}

.code-panel pre code {
    font-size: inherit;
}

.code-tabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.code-tabs [role="tab"] {
    appearance: none;
    border: 0;
    background: none;
    padding: 0.5rem 0.75rem;
    font: 500 0.825rem var(--font-body);
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
}

.code-tabs [role="tab"][aria-selected="true"] {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.copy-button {
    appearance: none;
    margin-left: auto;
    margin-bottom: 0.35rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    font: 500 0.75rem var(--font-body);
    cursor: pointer;
}

.copy-button:hover {
    color: var(--text-primary);
}

/* Without the script there is nothing to copy with, so the button stays
   hidden until script_*.js marks the page. */
html:not(.js) .copy-button {
    display: none;
}

.code-divider,
.code-label {
    padding: 0.55rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.code-divider {
    border-top: 1px solid var(--border-subtle);
}

.code-label-inline {
    padding: 0.5rem 0.75rem;
    border-bottom: 0;
}

.code-response {
    max-height: 22rem;
}

/* JSON responses carry long text strings; wrap them so the passage reads
   without sideways scrolling. Requests and XML keep their line shape. */
.code-response,
.compare .code-panel:last-child pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.code-panel figcaption {
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-subtle);
}

.tk { color: var(--syntax-key); }
.ts { color: var(--syntax-string); }
.tn { color: var(--syntax-number); }
.tx { color: var(--syntax-tag); }
.tc { color: var(--syntax-comment); }

/* Sections */

.section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-subtle);
}

.section-alt {
    background: var(--bg-secondary);
}

.section-intro {
    max-width: var(--max-w-narrow);
    margin-bottom: 2.5rem;
}

.section-intro p {
    margin-top: 0.75rem;
    font-size: 1.05rem;
}

.note {
    margin-top: 2rem;
    font-size: 0.925rem;
    color: var(--text-secondary);
    max-width: var(--max-w-narrow);
}

/* From publication to data */

.compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 960px) {
    .compare {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* No max-height here: the annotation at the bottom of the hit is the
   point of the comparison and must never scroll out of view. */
.compare .code-panel {
    display: flex;
    flex-direction: column;
}

.compare pre {
    flex-grow: 1;
}

.feature-grid,
.api-grid,
.pricing-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}

.feature-grid {
    margin-top: 3.5rem;
}

@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem 2rem;
    }
}

@media (min-width: 1100px) {
    .feature-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.feature-grid p,
.api-grid p,
.lane p {
    margin-top: 0.5rem;
    color: var(--text-body);
}

/* Build with LovAPI */

.lanes {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
}

@media (min-width: 960px) {
    .lanes {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        gap: 4rem;
    }
}

.lane .code-panel {
    margin-top: 1.5rem;
}

.steps {
    list-style: none;
    counter-reset: step;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    column-gap: 0.75rem;
}

.steps li::before {
    content: counter(step);
    grid-row: span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-primary);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.steps code {
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.steps span {
    font-size: 0.925rem;
    color: var(--text-secondary);
}

/* Proof band: Lovkompas, built on the same API */

.proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    margin-top: 3.5rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--text-primary);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}

.proof > div {
    flex: 1 1 28rem;
    min-width: 0;
}

.proof p {
    margin-top: 0.4rem;
    max-width: 44rem;
}

/* The API */

@media (min-width: 800px) {
    .api-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.api-grid li {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.5rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}

.api-grid p {
    margin-bottom: 0.75rem;
}

.api-grid code {
    color: var(--text-primary);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.endpoint-use {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    margin-top: 2rem;
    font-weight: 500;
}

/* Corpus */

.class-list {
    margin: 0;
    display: grid;
    gap: 0.75rem 2rem;
}

@media (min-width: 640px) {
    .class-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .class-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.class-list div {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.class-list dt {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent);
    min-width: 1rem;
}

.class-list dd {
    margin: 0;
    color: var(--text-primary);
}

/* Pricing */

@media (min-width: 640px) {
    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.plan {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}

.plan-featured {
    border-color: var(--text-primary);
}

.price {
    margin-top: 0.75rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.limits {
    list-style: none;
    margin: 1rem 0 1.75rem;
    padding: 0;
    display: grid;
    gap: 0.35rem;
    font-size: 0.925rem;
    flex-grow: 1;
}

/* Draft placeholders: visible on purpose until the real values exist. */
.todo {
    color: var(--text-secondary);
    border-bottom: 1px dashed var(--text-secondary);
}

/* FAQ */

#spoergsmaal h2 {
    margin-bottom: 1.5rem;
}

details {
    border-bottom: 1px solid var(--border-subtle);
}

summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 0;
    font-weight: 600;
    color: var(--text-primary);
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    font-weight: 400;
    color: var(--text-secondary);
}

details[open] summary::after {
    content: "\2212";
}

details p {
    padding-bottom: 1.25rem;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.site-footer nav a {
    color: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
