/* ---- Reset og base ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-green-700: #15803d;
    --color-green-600: #16a34a;
    --color-green-50: #f0fdf4;
    --color-stone-800: #292524;
    --color-stone-600: #57534e;
    --color-stone-200: #e7e5e4;
    --color-stone-100: #f5f5f4;
    --color-white: #fff;
    --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
    --max-width: 64rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-stone-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Header / nav ---- */
.site-header {
    position: sticky;
    top: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-stone-200);
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-green-700);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--color-stone-600);
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--color-stone-800);
}

.lang-form {
    display: inline;
}

.lang-switch {
    background: none;
    border: none;
    color: var(--color-stone-600);
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
}

.lang-switch:hover {
    color: var(--color-stone-800);
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-primary {
    background: var(--color-green-600);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-green-700);
}

.btn-outline {
    border: 1px solid var(--color-stone-200);
    color: var(--color-stone-800);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-stone-100);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* ---- Hero ---- */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(to bottom, var(--color-green-50), var(--color-white));
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    max-width: 40rem;
    margin: 0 auto 1.5rem;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--color-stone-600);
    max-width: 36rem;
    margin: 0 auto 2.5rem;
}

/* ---- Features ---- */
.features {
    padding: 5rem 0;
}

.features h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--color-stone-100);
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--color-stone-600);
    font-size: 0.95rem;
}

/* ---- About ---- */
.about {
    padding: 5rem 0;
    background: var(--color-stone-100);
}

.about h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.about > .container > p {
    color: var(--color-stone-600);
    max-width: 40rem;
    margin-bottom: 2.5rem;
}

.about-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1.5rem;
}

.about-point {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.about-point strong {
    font-size: 1rem;
}

.about-point span {
    color: var(--color-stone-600);
    font-size: 0.95rem;
}

/* ---- CTA ---- */
.cta {
    padding: 5rem 0;
    text-align: center;
}

.cta h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.cta p {
    color: var(--color-stone-600);
    max-width: 32rem;
    margin: 0 auto 2rem;
}

/* ---- Footer ---- */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--color-stone-200);
    text-align: center;
    color: var(--color-stone-600);
    font-size: 0.875rem;
}

/* ---- Eigedom banner (framsida) ---- */
.eigedom-banner {
    background: var(--color-green-50);
    border-bottom: 1px solid var(--color-stone-200);
    padding: 2rem 0;
}

.eigedom-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.eigedom-banner h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.eigedom-banner p {
    color: var(--color-stone-600);
    font-size: 0.95rem;
}

/* ---- Eigedom oppsett ---- */
.eigedom-oppsett {
    max-width: 48rem;
}

.eigedom-oppsett > h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.eigedom-oppsett-sub {
    color: var(--color-stone-600);
    margin-bottom: 2rem;
}

.eigedom-oppsett-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ---- Eigedom tabell ---- */
.eigedom-table-wrap {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.eigedom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.eigedom-table th,
.eigedom-table td {
    text-align: left;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--color-stone-200);
}

.eigedom-table th {
    font-weight: 600;
    color: var(--color-stone-600);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.eigedom-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ---- Eigedom skjema ---- */
.eigedom-add-form,
.eigedom-form {
    background: var(--color-stone-100);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.eigedom-add-form h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.eigedom-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.eigedom-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.eigedom-field label {
    font-weight: 500;
    font-size: 0.9rem;
}

.eigedom-field input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-stone-200);
    border-radius: 0.375rem;
    font: inherit;
    font-size: 0.95rem;
}

.eigedom-field input:focus {
    outline: 2px solid var(--color-green-600);
    outline-offset: -1px;
    border-color: var(--color-green-600);
}

.eigedom-field-error {
    color: #dc2626;
    font-size: 0.85rem;
}

.eigedom-field-help {
    color: var(--color-stone-600);
    font-size: 0.85rem;
}

.eigedom-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.eigedom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.eigedom-header h1 {
    font-size: 1.75rem;
}

.eigedom-empty {
    background: var(--color-stone-100);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: var(--color-stone-600);
}

.eigedom-confirm {
    background: var(--color-stone-100);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* ---- Eigedom knappar ---- */
.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
}

.btn-danger {
    border-color: #dc2626;
    color: #dc2626;
}

.btn-danger:hover {
    background: #fef2f2;
}

/* ---- Kommune autocomplete ---- */
.kommune-autocomplete {
    position: relative;
}

.kommune-autocomplete-list {
    display: none;
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 14rem;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--color-white);
    border: 1px solid var(--color-stone-200);
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.kommune-autocomplete-list li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.kommune-autocomplete-list li:hover,
.kommune-autocomplete-list li.active {
    background: var(--color-green-50);
    color: var(--color-green-700);
}
