/* ── Theme Variables ── */
:root,
[data-theme="dark"] {
    --bg: #ffffff;
    --cream: #caa992;
    --cream-dim: rgba(202, 169, 146, 1);
    --cream-hover: #000000;
    --toggle-track: rgba(202, 169, 146, 1);
    --toggle-thumb: #635145;
    --toggle-text: rgba(202, 169, 146, 1);
}

[data-theme="light"] {
    --bg: #000000;
    --cream: #635145;
    --cream-dim: rgba(99, 81, 69, 1);
    --cream-hover: #ffffff;
    --toggle-track: rgba(99, 81, 69, 1);
    --toggle-thumb: #caa992;
    --toggle-text: rgba(99, 81, 69, 1);
}

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

html,
body {
    height: 100%;
}

body {
    background-color: var(--bg);
    color: var(--cream);
    font-family: "DM Sans", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    transition: background-color 0.5s ease;
}

/* ── Toggle ── */
.toggle-wrap {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    z-index: 10;
    animation: fadeDown 0.8s ease 0.3s both;
}

.toggle-label {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--toggle-text);
    transition: color 0.4s ease;
    user-select: none;
}

.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--toggle-track);
    border: 1px solid var(--cream-dim);
    border-radius: 999px;
    cursor: pointer;
    outline: none;
    transition:
        background 0.4s ease,
        border-color 0.4s ease;
    flex-shrink: 0;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: var(--toggle-thumb);
    border-radius: 50%;
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.4s ease;
}

[data-theme="dark"] .toggle-thumb {
    transform: translateX(18px);
}

[data-theme="light"] .toggle-thumb {
    transform: translateX(0);
}

/* ── Layout ── */
.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 2.5rem;
    animation: fadeUp 1s ease both;
}

/* ── Logo ── */
.logo-wrap {
    width: clamp(180px, 40vw, 320px);
    animation: fadeUp 1s ease 0.1s both;
}

.logo-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.4s ease;
}

/* ── Divider ── */
.divider {
    width: 1px;
    height: 48px;
    background: var(--cream-dim);
    animation: scaleIn 0.8s ease 0.4s both;
    transition: background 0.4s ease;
}

/* ── Tagline ── */
.tagline {
    font-size: clamp(0.65rem, 2vw, 0.78rem);
    font-weight: 400;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--cream-dim);
    animation: fadeUp 1s ease 0.5s both;
    transition: color 0.4s ease;
}

/* ── Contact ── */
.contact {
    animation: fadeUp 1s ease 0.7s both;
}

.contact a {
    display: inline-block;
    font-size: clamp(0.75rem, 2.2vw, 0.88rem);
    font-weight: 300;
    letter-spacing: 0.18em;
    color: var(--cream);
    text-decoration: none;
    border-bottom: 1px solid var(--cream-dim);
    padding-bottom: 2px;
    transition:
        color 0.3s ease,
        border-color 0.3s ease;
}

.contact a:hover {
    color: var(--cream-hover);
    border-color: var(--cream-hover);
}

/* ── Animations ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scaleY(0);
        opacity: 0;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* ── Noise overlay ── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 100;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .wrapper {
        gap: 2rem;
    }
    .divider {
        height: 36px;
    }
    .toggle-wrap {
        top: 1.5rem;
        right: 1.5rem;
    }
}
