/*
 * Design tokens are built around the new logo's navy blue (sampled from
 * assets/source-images/logo/logo_varaep.png: ~#0a0a4f) rather than the old
 * site's green/brown template CSS — the logo is the one deliberate new
 * brand decision; the green/brown was just a purchased Joomla template's
 * default palette, not an active brand choice. Warm gold is the accent,
 * a classic pairing for financial services and a clean complement to navy.
 * No external fonts/CDN — system font stack for performance and privacy.
 */

:root {
    --color-primary: #12124f;        /* logo navy — structure, headings, footer */
    --color-primary-dark: #090930;
    /* A calmer, mid-tone professional blue introduced for icons, links and
       small accents. Blue reads as trust/stability/competence — ideal for an
       accounting firm — and bridges the very dark logo navy toward something
       friendlier without adding a second unrelated hue. */
    --color-blue: #33509e;
    --color-blue-tint: #eef2fb;      /* very light blue — calm section backgrounds */
    --color-blue-tint-2: #e4eaf7;
    /* Warm gold, kept ONLY for the single most important call-to-action so the
       eye always knows where to click. Navy + gold = established/premium. */
    --color-accent: #c79a45;
    --color-accent-dark: #a67f34;
    --color-text: #201f2b;
    --color-text-muted: #63616f;
    --color-bg: #ffffff;
    --color-bg-alt: #f5f5f9;
    --color-border: #e2e2ea;

    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --content-width: 72rem;
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
    --space-5: 4rem;

    /* Rounder, softer shapes throughout — a deliberate move away from a
       stiff/boxy "corporate finance" look toward something that reads as
       approachable, matching the client's request for a warmer, more
       personal feel despite the accounting-firm subject matter. */
    --radius-sm: 0.75rem;
    --radius: 1.25rem;
    --radius-lg: 2rem;
    --radius-full: 999px;

    --shadow-soft: 0 4px 24px rgba(18, 18, 79, 0.08);
    --shadow-softer: 0 2px 12px rgba(18, 18, 79, 0.06);
}

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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
}

h1, h2, h3 {
    line-height: 1.2;
    margin: 0 0 var(--space-2);
}

h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: var(--content-width);
    margin-inline: auto;
    padding-inline: var(--space-3);
}

.section {
    padding-block: var(--space-5);
}

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

/* Header */

.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: var(--space-2);
    gap: var(--space-3);
}

.site-header__logo {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.site-header__logo img {
    max-height: 2.5rem;
    width: auto;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.25rem;
    height: 2.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle__bar {
    display: block;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

.site-nav {
    display: none;
    width: 100%;
}

.site-nav.is-open {
    display: block;
}

.site-nav__list {
    list-style: none;
    margin: var(--space-2) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.site-nav__list a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav__list a:hover {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        display: block;
        width: auto;
    }

    .site-nav__list {
        flex-direction: row;
        align-items: center;
        margin: 0;
        gap: var(--space-1);
    }
}

/* Hero */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-blue-tint), var(--color-bg) 85%);
    padding-block: var(--space-5);
    isolation: isolate;
}

/* Soft, blurred color blobs instead of a flat rectangular band — the one
   deliberately organic/decorative touch in an otherwise clean layout. */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.5;
}

.hero::before {
    top: -6rem;
    left: -4rem;
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(199, 154, 69, 0.22), transparent 70%);
}

.hero::after {
    bottom: -8rem;
    right: -5rem;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, rgba(51, 80, 158, 0.16), transparent 70%);
}

.hero__watermark {
    position: absolute;
    top: 50%;
    left: -6rem;
    transform: translateY(-50%) rotate(-8deg);
    width: 30rem;
    max-width: 60%;
    color: var(--color-primary);
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

.hero__watermark svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 720px) {
    .hero__watermark {
        left: auto;
        right: -8rem;
        top: 15%;
        width: 22rem;
        max-width: 80%;
    }
}

.hero__inner {
    position: relative;
    display: grid;
    gap: var(--space-4);
    align-items: center;
}

@media (min-width: 900px) {
    .hero__inner {
        grid-template-columns: 1.05fr 0.95fr;
        gap: var(--space-5);
    }
}

.hero__eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-blue);
    margin-bottom: var(--space-2);
}

.hero__title {
    font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
    letter-spacing: -0.01em;
    margin-bottom: var(--space-2);
}

.hero__lead {
    max-width: 34rem;
    color: var(--color-text-muted);
    font-size: 1.15rem;
    margin-bottom: var(--space-3);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    margin-top: var(--space-3);
    font-size: 0.92rem;
    color: var(--color-text-muted);
}

.hero__trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero__trust svg {
    flex-shrink: 0;
    color: var(--color-blue);
}

/* "Floating dashboard cards" hero visual — a stylized mini report. Signals
   competence/organisation for a finance firm without needing stock photos,
   and stays fully self-contained (no external images). */
.hero__visual {
    position: relative;
    min-height: 20rem;
}

.hero-card {
    position: absolute;
    z-index: 1;
    background: var(--color-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: var(--space-3);
}

.hero-card--main {
    inset-inline: 0;
    top: 1.5rem;
    margin-inline: auto;
    max-width: 22rem;
}

.hero-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.hero-card__title {
    font-weight: 700;
    color: var(--color-primary);
}

.hero-card__tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-blue);
    background: var(--color-blue-tint);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.hero-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 6.5rem;
    margin-bottom: var(--space-2);
}

.hero-chart span {
    flex: 1;
    border-radius: 0.35rem 0.35rem 0 0;
    background: var(--color-blue-tint-2);
}

.hero-chart span:nth-child(4) { background: var(--color-blue); }
.hero-chart span:nth-child(5) { background: var(--color-primary); }

/* Checklist inside the hero card — framed as "what we keep in order for you",
   deliberately without any monetary figures so it can never be mistaken for
   the firm's own (or a client's) actual financials. */
.hero-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.hero-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
    color: var(--color-text);
}

.hero-check svg {
    flex-shrink: 0;
    color: #1f9d55;
}

.hero-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--color-bg);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-soft);
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.hero-badge svg { color: #1f9d55; }

.hero-badge--tl { top: 0; left: 0; }
.hero-badge--br { bottom: 0.5rem; right: 0; }

@media (max-width: 560px) {
    .hero-badge--tl { left: -0.5rem; }
    .hero-badge--br { right: -0.5rem; }
}

/* Buttons */

.button {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background: var(--color-accent);
    color: var(--color-primary);
}

.button--primary:hover {
    background: var(--color-accent-dark);
}

.button--outline {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.button--outline:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Teasers / cards */

.teaser-text {
    color: var(--color-text-muted);
}

.link-more {
    display: inline-block;
    margin-top: var(--space-2);
    font-weight: 600;
    text-decoration: none;
}

.message-teaser {
    background: var(--color-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: var(--space-3) var(--space-4);
    margin-top: var(--space-2);
}

.message-teaser__date {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: -0.5rem;
}

.cta {
    text-align: center;
}

/* Closing CTA as a strong navy panel — one confident, unmissable finish. */
.cta__inner {
    background: linear-gradient(135deg, var(--color-primary), #23246e);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-3);
}

.cta__inner h2 {
    color: #fff;
}

.cta__inner p {
    color: #c9cbe8;
    max-width: 34rem;
    margin-inline: auto;
    margin-bottom: var(--space-3);
}

/* Section heading block: eyebrow + title + intro, optionally centered */
.section-head {
    max-width: 42rem;
    margin-bottom: var(--space-4);
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.section-head__eyebrow {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-blue);
    margin-bottom: var(--space-1);
}

.section-head__intro {
    color: var(--color-text-muted);
    font-size: 1.08rem;
    margin: 0;
}

.section--tint {
    background: var(--color-blue-tint);
}

/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--space-3);
}

.service-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-softer);
    padding: var(--space-3);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-sm);
    background: var(--color-blue-tint);
    color: var(--color-blue);
    margin-bottom: var(--space-2);
}

.service-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.service-card p {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 0.96rem;
}

/* When a service card is a link (homepage), strip link styling and keep the
   card appearance; the whole card becomes the click target. */
a.service-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.service-card h3 {
    color: var(--color-text);
}

/* Services page: sticky jump-menu + stacked sections */
.services-layout {
    display: grid;
    gap: var(--space-4);
}

@media (min-width: 900px) {
    .services-layout {
        grid-template-columns: 15rem 1fr;
        gap: var(--space-5);
        align-items: start;
    }
}

.services-nav {
    display: none;
}

@media (min-width: 900px) {
    .services-nav {
        display: block;
        position: sticky;
        top: 5.5rem;
    }
}

.services-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.15rem;
}

.services-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.96rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.services-nav a:hover,
.services-nav a.is-active {
    background: var(--color-blue-tint);
    color: var(--color-primary);
}

.services-nav__icon {
    display: inline-flex;
    color: var(--color-blue);
}

.services-nav__icon svg {
    width: 18px;
    height: 18px;
}

.services-sections {
    display: grid;
    gap: var(--space-4);
}

.service-section {
    /* Offset anchor jumps so the sticky header doesn't cover the heading. */
    scroll-margin-top: 6rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-softer);
    padding: var(--space-4);
}

.service-section__head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.service-section__head h2 {
    margin: 0;
    font-size: 1.4rem;
}

.service-section__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-sm);
    background: var(--color-blue-tint);
    color: var(--color-blue);
}

.service-section__body {
    color: var(--color-text-muted);
}

.service-section__body :first-child { margin-top: 0; }
.service-section__body :last-child { margin-bottom: 0; }

.service-section__cta {
    margin-top: var(--space-2);
}

/* Process / "Så arbetar vi" steps */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--space-3);
    counter-reset: step;
}

.process-step {
    position: relative;
    padding-top: var(--space-3);
}

.process-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.process-step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.process-step p {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 0.96rem;
}

/* Testimonial */
.testimonial {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.testimonial__quote {
    font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
    line-height: 1.45;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--space-3);
}

.testimonial__quote::before {
    content: "\201D";
    display: block;
    font-size: 4rem;
    line-height: 0.6;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.testimonial__author {
    font-weight: 600;
}

.testimonial__role {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Two-column intro (e.g. Om oss teaser with a soft image panel) */
.split {
    display: grid;
    gap: var(--space-4);
    align-items: center;
}

@media (min-width: 820px) {
    .split {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-5);
    }
    .split--reverse .split__media {
        order: -1;
    }
}

.split__media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 4 / 3;
    background:
        radial-gradient(circle at 30% 30%, var(--color-blue-tint-2), transparent 60%),
        linear-gradient(135deg, var(--color-blue-tint), #fff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.split__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.split__media svg {
    width: 40%;
    height: auto;
    color: var(--color-blue);
    opacity: 0.85;
}

/* Team teaser row */
.team-teaser {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.team-avatars {
    display: flex;
}

.team-avatars img,
.team-avatars span {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-bg);
    margin-left: -0.75rem;
    background: var(--color-blue-tint-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-blue);
}

.team-avatars :first-child {
    margin-left: 0;
}

/* Staff / kontakt */

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: var(--space-3);
    margin-block: var(--space-3);
}

.staff-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-softer);
    padding: var(--space-4) var(--space-3);
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.staff-card:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.staff-card__photo {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    object-fit: cover;
    margin-inline: auto var(--space-2);
    margin-block-end: var(--space-2);
    background: var(--color-bg-alt);
    border: 3px solid var(--color-bg-alt);
}

.staff-card__role {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Forms */

.form-field {
    margin-bottom: var(--space-2);
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--color-bg-alt);
    color: var(--color-text);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-bg);
    box-shadow: 0 0 0 3px rgba(18, 18, 79, 0.1);
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-notice {
    padding: var(--space-2);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
}

.form-notice--success {
    background: #e6f4ea;
    color: var(--color-primary-dark);
}

.form-notice--error {
    background: #fbeaea;
    color: #8a2c1f;
}

/* Footer */

.site-footer {
    background: var(--color-primary);
    color: #ecebf5;
    margin-top: var(--space-5);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--space-3);
    padding-block: var(--space-4);
}

.site-footer a {
    color: #ecebf5;
}

.site-footer .button--outline {
    border-color: #ecebf5;
    color: #ecebf5;
}

.site-footer .button--outline:hover {
    background: #ecebf5;
    color: var(--color-primary);
}

.site-footer__title {
    font-weight: 700;
    font-size: 1.1rem;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-block: var(--space-2);
    font-size: 0.85rem;
    color: #b7b6cf;
}

@media (prefers-color-scheme: dark) {
    /* Intentionally not enabling a full dark theme yet — an accounting
       firm site favors a consistent, predictable light appearance.
       Revisit if requested. */
}
