:root {
    color: #253044;
    font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 16%, rgb(117 213 229 / 35%), transparent 26rem),
        radial-gradient(circle at 88% 12%, rgb(255 190 113 / 30%), transparent 24rem),
        radial-gradient(circle at 72% 88%, rgb(151 128 205 / 24%), transparent 28rem),
        linear-gradient(145deg, #f7fbff 0%, #fff9f4 48%, #f8f5ff 100%);
    background-attachment: fixed;
}

body::before,
body::after {
    position: fixed;
    z-index: 0;
    width: 11rem;
    height: 11rem;
    border: 1px solid rgb(255 255 255 / 65%);
    border-radius: 3rem;
    background: rgb(255 255 255 / 16%);
    content: "";
    pointer-events: none;
    rotate: 18deg;
    animation: float 9s ease-in-out infinite;
}

body::before {
    top: 10%;
    left: -5rem;
}

body::after {
    right: -4rem;
    bottom: 5%;
    width: 8rem;
    height: 8rem;
    rotate: -14deg;
    animation-delay: -4s;
}

.site-header {
    position: relative;
    z-index: 1;
    min-height: 7rem;
    padding: 1rem max(1.5rem, calc((100% - 69rem) / 2));
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-block;
    border-radius: 0.75rem;
    transition: transform 180ms ease;
}

.brand:hover {
    transform: rotate(-1deg) scale(1.015);
}

.brand:focus-visible,
.category:focus-visible,
.button:focus-visible {
    outline: 3px solid #1b7890;
    outline-offset: 4px;
}

.site-header img {
    display: block;
    width: min(100%, 34rem);
    height: auto;
}

.install-button {
    flex: none;
    min-height: 2.85rem;
    padding: 0.65rem 1rem;
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    border: 1px solid rgb(36 51 77 / 14%);
    border-radius: 999px;
    background: rgb(255 255 255 / 76%);
    color: #253044;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 780;
    box-shadow: 0 0.6rem 1.2rem rgb(44 54 76 / 10%);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.install-button[hidden] {
    display: none;
}

.install-button:hover {
    transform: translateY(-0.15rem);
    box-shadow: 0 0.8rem 1.5rem rgb(44 54 76 / 15%);
}

.install-button:focus-visible,
.site-footer a:focus-visible,
.dialog-close:focus-visible,
.legal-card a:focus-visible {
    outline: 3px solid #1b7890;
    outline-offset: 4px;
}

main {
    position: relative;
    z-index: 1;
    width: min(72rem, 100%);
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}

h1,
h2,
p {
    text-wrap: balance;
}

h1,
h2 {
    line-height: 1.12;
}

h1 {
    margin: 0;
    color: #202b3d;
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    letter-spacing: -0.05em;
}

.eyebrow {
    margin: 0 0 0.65rem;
    color: #167c93;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    animation: rise-in 450ms ease-out both;
}

.intro {
    max-width: 37rem;
    margin: 1rem 0 2.5rem;
    color: #5d687b;
    font-size: clamp(1rem, 2vw, 1.18rem);
    animation: rise-in 450ms 80ms ease-out both;
}

#category-heading {
    animation: rise-in 450ms 40ms ease-out both;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.category {
    position: relative;
    min-height: 9rem;
    padding: 2rem;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 52%);
    border-radius: 1.4rem;
    color: #fff;
    font-size: clamp(1.25rem, 4vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 1rem 2rem rgb(45 53 76 / 14%), inset 0 1px 0 rgb(255 255 255 / 30%);
    transform-origin: bottom center;
    animation: deal-category 520ms cubic-bezier(.2, .8, .2, 1) both;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.category::before,
.category::after {
    position: absolute;
    border-radius: 50%;
    background: rgb(255 255 255 / 13%);
    content: "";
    transition: transform 260ms ease;
}

.category::before {
    top: -3rem;
    right: -2rem;
    width: 9rem;
    height: 9rem;
}

.category::after {
    top: 1.35rem;
    right: 1.35rem;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid rgb(255 255 255 / 48%);
    background: transparent;
}

.category:nth-child(2) {
    animation-delay: 70ms;
}

.category:nth-child(3) {
    animation-delay: 140ms;
}

.category:nth-child(4) {
    animation-delay: 210ms;
}

.category:hover {
    transform: translateY(-0.4rem) rotate(-0.6deg);
    filter: saturate(1.08);
    box-shadow: 0 1.4rem 2.8rem rgb(45 53 76 / 20%), inset 0 1px 0 rgb(255 255 255 / 35%);
}

.category:hover::before {
    transform: scale(1.15) translate(-0.4rem, 0.4rem);
}

.category-personal {
    background: linear-gradient(135deg, #67558f, #917cc1);
}

.category-relational {
    background: linear-gradient(135deg, #e78b25, #f6b957);
}

.category-organizational {
    background: linear-gradient(135deg, #cb3938, #ef6258);
}

.category-environmental {
    background: linear-gradient(135deg, #159469, #35bd82);
}

.card-layout {
    display: grid;
    grid-template-columns: minmax(17rem, 0.92fr) minmax(18rem, 1.08fr);
    gap: clamp(3rem, 9vw, 7rem);
    align-items: center;
    padding-top: 1rem;
}

.card-layout[hidden] {
    display: none;
}

.card-column {
    min-width: 0;
}

.card-stack {
    --card-dark: #5d4b86;
    --card-light: #917cc1;
    position: relative;
    isolation: isolate;
    width: min(100%, 23rem);
    margin: 0;
}

.card-stack::before,
.card-stack::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 1px solid rgb(255 255 255 / 55%);
    border-radius: 1.6rem;
    background: linear-gradient(145deg, var(--card-dark), var(--card-light));
    content: "";
    box-shadow: 0 1rem 2rem rgb(42 50 70 / 12%);
}

.card-stack::before {
    transform: translate(1rem, 1.05rem) rotate(3.5deg);
    opacity: 0.48;
}

.card-stack::after {
    transform: translate(0.55rem, 0.58rem) rotate(1.8deg);
    opacity: 0.72;
}

.card-stack-personal {
    --card-dark: #5d4b86;
    --card-light: #917cc1;
}

.card-stack-relational {
    --card-dark: #d87816;
    --card-light: #f6b957;
}

.card-stack-organizational {
    --card-dark: #b92f31;
    --card-light: #ef6258;
}

.card-stack-environmental {
    --card-dark: #117e5a;
    --card-light: #35bd82;
}

.card {
    position: relative;
    min-height: 28rem;
    padding: 1.65rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 58%);
    border-radius: 1.6rem;
    background: linear-gradient(145deg, var(--card-dark), var(--card-light));
    color: #fff;
    box-shadow: 0 1.5rem 3.2rem rgb(42 50 70 / 24%), inset 0 1px 0 rgb(255 255 255 / 32%);
}

.card::before {
    position: absolute;
    top: -5rem;
    right: -5rem;
    width: 13rem;
    height: 13rem;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 50%;
    background: rgb(255 255 255 / 7%);
    content: "";
}

.card.is-dealing {
    animation: deal-card 430ms cubic-bezier(.18, .84, .29, 1.18) both;
}

.card-heading {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.card h1 {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.card-number {
    flex: none;
    color: rgb(255 255 255 / 72%);
    font-size: 0.8rem;
    font-weight: 800;
}

.card p {
    position: relative;
    z-index: 1;
    min-height: 14rem;
    margin: 1.5rem 0;
    padding: 1.7rem;
    display: flex;
    flex: 1;
    align-items: center;
    border: 1px solid rgb(255 255 255 / 72%);
    border-radius: 1rem;
    background: rgb(255 255 255 / 94%);
    color: #273145;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 620;
    line-height: 1.35;
    box-shadow: inset 0 0 1.5rem rgb(46 54 75 / 5%);
}

.card-mark {
    align-self: flex-end;
    font-size: 1.2rem;
    opacity: 0.8;
    animation: twinkle 2.8s ease-in-out infinite;
}

.rules {
    position: relative;
    padding: clamp(1.8rem, 5vw, 3rem);
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 82%);
    border-radius: 1.5rem;
    background: rgb(255 255 255 / 72%);
    box-shadow: 0 1.4rem 3rem rgb(55 65 89 / 12%), inset 0 1px 0 #fff;
    backdrop-filter: blur(18px);
    animation: rise-in 480ms 120ms ease-out both;
}

.rules::after {
    position: absolute;
    right: -3rem;
    bottom: -3rem;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: linear-gradient(145deg, rgb(117 213 229 / 18%), rgb(145 124 193 / 16%));
    content: "";
}

.rules-icon {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #e9faff, #f2ebff);
    color: #6d5c9a;
    animation: twinkle 3s 500ms ease-in-out infinite;
}

.rules h2 {
    margin: 1rem 0 1.35rem;
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    letter-spacing: -0.04em;
}

.rules ul {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: rules;
}

.rules li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.8rem;
    align-items: center;
    color: #4e596c;
    counter-increment: rules;
}

.rules li::before {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 50%;
    background: #eef8fb;
    color: #167c93;
    content: counter(rules);
    font-size: 0.78rem;
    font-weight: 800;
}

.rules li + li {
    margin-top: 1rem;
}

.actions {
    margin-top: 2.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
}

.button {
    min-height: 3.15rem;
    padding: 0.75rem 1.25rem;
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 0.6rem 1.2rem rgb(44 54 76 / 10%);
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button span {
    font-size: 1.15rem;
    transition: transform 220ms ease;
}

.button-primary {
    background: #24334d;
    color: #fff;
}

.button-secondary {
    border-color: rgb(36 51 77 / 14%);
    background: rgb(255 255 255 / 68%);
    color: #344158;
    backdrop-filter: blur(12px);
}

.button:hover {
    transform: translateY(-0.18rem);
    box-shadow: 0 0.85rem 1.6rem rgb(44 54 76 / 16%);
}

.button:active {
    transform: translateY(0.05rem) scale(0.98);
}

.button-primary:hover span {
    transform: rotate(180deg);
}

.button-secondary:hover span {
    transform: translateX(-0.2rem);
}

.site-footer {
    position: relative;
    z-index: 1;
    width: min(72rem, 100%);
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    color: #697487;
    font-size: 0.78rem;
    text-align: center;
}

.site-footer a,
.legal-card a:not(.button) {
    color: #286b7b;
    text-underline-offset: 0.18em;
}

.install-dialog {
    width: min(30rem, calc(100% - 2rem));
    padding: 0;
    border: 1px solid rgb(255 255 255 / 82%);
    border-radius: 1.5rem;
    background: #fbfdff;
    color: #253044;
    box-shadow: 0 2rem 6rem rgb(23 32 49 / 30%);
}

.install-dialog::backdrop {
    background: rgb(23 32 49 / 48%);
    backdrop-filter: blur(5px);
}

.install-dialog form {
    position: relative;
    padding: 2.25rem;
    text-align: center;
}

.install-dialog h2 {
    margin: 0.8rem 0;
    font-size: 1.7rem;
}

.install-dialog p {
    margin: 0 0 1.5rem;
    color: #566276;
}

.dialog-icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    margin: 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #e7f7fb;
    color: #167c93;
    font-size: 1.4rem;
    font-weight: 800;
}

.dialog-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5d687b;
    font: inherit;
    font-size: 1.5rem;
    cursor: pointer;
}

.legal-page {
    max-width: 52rem;
}

.legal-card {
    padding: clamp(1.5rem, 6vw, 3.5rem);
    border: 1px solid rgb(255 255 255 / 82%);
    border-radius: 1.5rem;
    background: rgb(255 255 255 / 78%);
    box-shadow: 0 1.4rem 3rem rgb(55 65 89 / 12%), inset 0 1px 0 #fff;
    backdrop-filter: blur(18px);
}

.legal-card h1 {
    font-size: clamp(2.4rem, 7vw, 4rem);
}

.legal-card h2 {
    margin: 2rem 0 0.55rem;
    color: #273145;
    font-size: 1.3rem;
}

.legal-card p,
.legal-card li,
.legal-card dd,
.legal-card address {
    color: #526074;
}

.legal-card address {
    margin-top: 2rem;
    font-style: normal;
}

.legal-lead {
    max-width: 42rem;
    margin: 1rem 0 2rem;
    font-size: 1.16rem;
}

.legal-meta {
    margin-top: 2rem;
    font-size: 0.82rem;
}

.legal-back {
    margin-top: 1rem;
}

.imprint-details {
    margin: 2rem 0;
}

.imprint-details div {
    padding: 0.8rem 0;
    display: grid;
    grid-template-columns: minmax(8rem, 0.42fr) 1fr;
    gap: 1rem;
    border-bottom: 1px solid rgb(36 51 77 / 10%);
}

.imprint-details dt {
    color: #273145;
    font-weight: 750;
}

.imprint-details dd {
    margin: 0;
}

@keyframes deal-category {
    from {
        opacity: 0;
        transform: translateY(1.2rem) rotate(1deg) scale(0.97);
    }
}

@keyframes deal-card {
    from {
        opacity: 0;
        transform: translate(1.25rem, -0.8rem) rotate(2.5deg) scale(0.96);
    }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(0.8rem);
    }
}

@keyframes twinkle {
    0%, 100% {
        transform: rotate(0) scale(1);
    }
    50% {
        transform: rotate(15deg) scale(1.14);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1rem);
    }
}

@media (max-width: 44rem) {
    .site-header {
        min-height: 5.5rem;
    }

    .site-header img {
        width: min(100%, 21rem);
    }

    .install-button {
        width: 2.85rem;
        padding: 0;
        justify-content: center;
        overflow: hidden;
        font-size: 0;
    }

    .install-button span {
        font-size: 1.2rem;
    }

    main {
        padding-top: 1rem;
    }

    .category-grid,
    .card-layout {
        grid-template-columns: 1fr;
    }

    .category {
        min-height: 6.8rem;
        padding: 1.4rem;
    }

    .card-layout {
        gap: 3.5rem;
    }

    .card {
        min-height: 27rem;
    }

    .card-stack {
        margin-inline: auto;
    }

    .rules {
        margin-top: 0.5rem;
    }

    .imprint-details div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
