:root {
    --bg-color: #F9F7F2;
    --text-color: #000000;
    --muted-color: #888888;
    --font-serif: "Playfair Display", serif;
    --font-sans: "Inter", sans-serif;
    --ease: cubic-bezier(0.2, 1, 0.3, 1);
    --transition: all 0.6s var(--ease);
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #F9F7F2;
    --muted-color: #AAAAAA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    transition: background-color 0.6s ease, color 0.6s ease;
    overflow-x: hidden;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(245, 242, 235, 0.8);
    /* Light beige with glass effect */
    backdrop-filter: blur(10px);
    /* Frosted glass effect */
    -webkit-backdrop-filter: blur(10px);
    /* Safari support */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border for definition */
    transition: var(--transition);
}

body.dark-mode header {
    background-color: rgba(26, 26, 26, 0.7);
    /* Semi-transparent dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-left {
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    width: fit-content;
}

.logo img {
    height: 40px;
    /* Adjust size as needed */
    width: auto;
    display: block;
    transition: var(--transition);
}

.dark-mode .logo img {
    filter: invert(1);
    /* Invert if the logo is black and needs to be white in dark mode */
}

.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 1rem;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .social-icons {
    border-right-color: rgba(255, 255, 255, 0.1);
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-link img {
    height: 26px;
    width: auto;
    display: block;
}

.icon-link:hover {
    opacity: 0.6;
    transform: translateY(-2px);
}

.dark-mode .icon-link img,
.dark-mode #lang-toggle img {
    filter: invert(1);
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-button:hover {
    opacity: 0.7;
}

.icon-button img {
    height: 28px;
    width: auto;
    display: block;
}

.icon-button svg {
    width: 24px;
    height: 24px;
}

.dark-mode #lang-toggle img {
    filter: invert(1);
}

nav {
    display: flex;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.8rem;
    font-family: var(--font-sans);
    letter-spacing: 0.2em;
    font-weight: 500;
    opacity: 0.8;
    transition: var(--transition);
    position: relative;
    /* Base for underline */
    padding-bottom: 4px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #A69685;
    /* Dov beige her */
    transition: width 0.4s var(--ease);
}

nav a:hover {
    opacity: 1;
    color: #A69685;
    /* Dov beige her */
}

nav a:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}


#theme-toggle {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

body.dark-mode #theme-toggle {
    border-color: rgba(255, 255, 255, 0.2);
}

#theme-toggle:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

#theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 8rem;
    /* Adjusted for perfect balance below menu */
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-name {
    text-align: center;
    margin-top: 0;
    /* Let hero padding handle the top spacing */
    margin-bottom: 10px;
    /* 10px spacing between name and cards */
    position: relative;
    z-index: 1;
}

.hero-name h1 {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 9vw, 6rem);
    /* Reduced base size to allow first-name to stand out */
    line-height: 0.85;
    letter-spacing: -0.04em;
    font-weight: 400;
}

.first-name {
    font-size: clamp(4rem, 12vw, 9rem) !important;
    /* Larger size */
    letter-spacing: 0.05em !important;
    /* Added spacing */
    margin-bottom: 0.5rem;
    color: #A69685;
    /* Dov beige */
}

.last-name {
    margin-top: -0.5rem;
    letter-spacing: 0.02em !important;
    color: #7A7570;
    /* Warm gray to match the beige */
    /* Small amount of spacing */
}

.arches-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    padding: 0 4rem;
    width: 100%;
    position: relative;
    z-index: 2;
    /* Arches sit in front of the name */
}

.arch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: margin-top 1s var(--ease), opacity 1s var(--ease), transform 1s var(--ease);
}

.arch-item:nth-child(2) {
    margin-top: 4rem;
    /* Halved to reduce gap to name */
}

.arch-item:nth-child(3) {
    margin-top: calc(2rem + 30px);
}

.arch-image {
    position: relative;
    border-radius: 999px;
    overflow: visible;
    aspect-ratio: 1 / 1.4;
    width: 100%;
    max-width: 320px;
    margin-bottom: 3rem;
    transition: var(--transition);
}

.arch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 160px 160px 0 0;
    filter: grayscale(100%);
    transition: transform 1.2s var(--ease), filter 1s var(--ease);
}

.arch-item:hover .arch-image img {
    transform: scale(1.08);
    filter: grayscale(0%);
}

.arch-number {
    position: absolute;
    bottom: -1.5rem;
    /* Move slightly outside the image */
    right: -1rem;
    font-family: var(--font-serif);
    font-size: 5rem;
    /* Increased from 3rem */
    font-style: italic;
    color: #7A7570;
    /* Matching 'SANNER' color */
    z-index: 10;
    text-shadow: 0 0 15px var(--bg-color);
    /* Glow effect to separate from photo */
    pointer-events: none;
}

.divider {
    width: 1px;
    height: 40px;
    background-color: var(--muted-color);
    margin: 0 auto 1.5rem;
    opacity: 0.3;
}

.category {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--muted-color);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    font-weight: 400;
    color: #7A7570;
    /* Matching 'SANNER' color */
}

.discover-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    transition: var(--transition);
}

.discover-link:hover {
    opacity: 0.6;
}

/* Central Badge */
.central-badge {
    margin-bottom: 60px;
    /* Pushed up another 10px from card 02 */
    display: flex;
    justify-content: center;
    z-index: 15;
    pointer-events: none;
}

.circular-badge {
    width: 120px;
    height: 120px;
    position: relative;
    animation: rotate 25s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.circular-badge text {
    fill: var(--muted-color);
    font-size: 7px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.badge-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    background-color: var(--muted-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Footer */
footer {
    padding: 2rem 4rem 4rem;
    /* Reduced top padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.footer-text {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--muted-color);
    text-align: center;
}

.cta-button {
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.2rem 3rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
    transition: var(--transition);
}

body.dark-mode .cta-button {
    border-color: rgba(255, 255, 255, 0.2);
}

.cta-button:hover {
    background-color: #A69685;
    /* Samma beige som länkarna */
    border-color: #A69685;
    color: var(--bg-color);
}

.cta-button svg {
    width: 18px;
    height: 18px;
}

/* About Section */
.about-section {
    padding: 10rem 4rem 4rem;
    /* Reduced bottom padding */
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
}

.about-container {
    max-width: 800px;
    text-align: center;
}

.about-category {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: #A69685;
    /* Dov beige */
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.about-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    /* Slightly more balanced size */
    margin-bottom: 4rem;
    color: #7A7570;
    /* Matching 'SANNER' color */
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-text p {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    /* Slightly smaller to match footer vibe */
    line-height: 2;
    /* Increased for breathing room */
    color: var(--muted-color);
    /* Matching footer text color */
    letter-spacing: 0.05em;
    /* Subtle spacing like footer */
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* Mobile Refinements */
@media (max-width: 900px) {
    header {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
        /* Allow wrapping if items get too tight */
    }

    nav {
        gap: 1.5rem;
        order: 3;
        /* Move links below logo/toggle on very small screens */
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    body.dark-mode nav {
        border-top-color: rgba(255, 255, 255, 0.05);
    }

    .hero {
        padding-top: 4rem;
    }

    .hero-name {
        margin-top: 4rem;
        margin-bottom: 2rem;
    }

    .hero-name h1 {
        font-size: clamp(2.5rem, 12vw, 4rem) !important;
    }

    .first-name {
        font-size: clamp(3rem, 14vw, 5rem) !important;
        letter-spacing: 0.05em !important;
        color: #A69685;
    }

    .last-name {
        color: #7A7570;
    }

    .arches-wrapper {
        grid-template-columns: 1fr;
        gap: 4rem;
        padding: 0 2rem;
    }

    .arch-item:nth-child(n) {
        margin-top: 0 !important;
        /* Reset staggered layout on mobile */
    }

    .arch-image {
        max-width: 100%;
        /* Use full width available on mobile */
    }

    .arch-number {
        font-size: 3.5rem;
        bottom: -1rem;
    }

    .central-badge {
        position: relative;
        top: 0;
        left: auto;
        transform: none;
        margin: 4rem 0;
    }

    .about-section {
        padding: 6rem 2rem;
    }

    .about-title {
        margin-bottom: 2.5rem;
    }

    .about-text p {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    nav a {
        font-size: 0.6rem;
        letter-spacing: 0.1em;
    }
}