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

html {
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    text-align: center;
    color: #111;
    overflow-x: clip;
}

h1,
h2,
h3 {
    margin: 0;
}

main {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
}

img,
svg {
    -webkit-user-drag: none;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 200;
}

.skip-link:focus {
    top: 0;
}

.navbar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 1.5rem;
}

.lang-switcher {
    position: relative;
}

.lang-switcher-toggle {
    list-style: none;
    cursor: pointer;
    padding: 1.5rem 0.75rem;
    display: flex;
    align-items: center;
}

.lang-switcher-toggle::-webkit-details-marker {
    display: none;
}

.globe-icon {
    width: 30px;
    height: 30px;
    color: #111;
    opacity: 0.8;
    transition: color 0.2s, opacity 0.2s;
}

.lang-switcher-toggle:hover .globe-icon {
    color: rgb(0, 187, 187);
    opacity: 1;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    min-width: 90px;
    z-index: 100;
    border-radius: 0.5rem;
    overflow: hidden;
}

.lang-menu-link {
    display: block;
    padding: 0.6rem 1.25rem;
    color: #363636;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.lang-menu-link:hover {
    background: #f5f5f5;
}

.lang-active {
    color: rgb(0, 187, 187) !important;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-wrapper {
    margin-top: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(5rem, 12vw, 500px);
}

.heading-wrapper {
    max-width: 600px;
    width: 100%;
    text-align: justify !important;
    animation: fade-up 0.8s ease both;
}

.heading-wrapper-de {
    max-width: 700px;
    width: 100%;
    text-align: justify !important;
    animation: fade-up 0.8s ease both;
}

.hero-wrapper {
    position: relative;
    height: 70vh;
    flex-shrink: 0;
}

.circle {
    position: absolute;
    width: 120%;
    height: 84%;
    top: -50px;
    left: -50px;
    background: #ececec;
    border-radius: 100%;
    z-index: 0;
    animation: fade-up 0.6s ease 0.1s both;
}

.hero-image {
    position: relative;
    z-index: 1;
    width: auto;
    height: 100%;
    animation: fade-up 0.8s ease 0.45s both;
}

.heading-top {
    font-size: 100px;
    font-weight: 400;
    color: transparent;
    background: linear-gradient(to right, rgb(0, 187, 187), rgb(102, 205, 170));
    -webkit-background-clip: text;
    background-clip: text;
    margin-top: 100px;
}

.heading-bottom {
    font-size: 60px;
    font-weight: 300;
    display: block;
    color: rgb(49, 49, 49);
    margin-top: -15px;
    margin-bottom: 10px;
    text-align-last: justify;
}

.heading-subtext {
    font-size: 28px;
    color: #646464;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
}

.section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 4rem;
    font-weight: 700;
    color: rgb(49, 49, 49);
    margin-bottom: 5rem;
    display: inline-block;
    background-image: linear-gradient(rgba(0, 187, 187, 0.5), rgba(0, 187, 187, 0.5));
    background-repeat: no-repeat;
    background-size: 100% 11px;
    background-position: 0 72%;
}

.standards-break {
    display: none;
}

.technologies {
    height: 700px;
    align-self: stretch;
    background: #ececec;
    padding: 3.5rem 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.technology-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 80%;
    max-width: 1080px;
}

.technology-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.technology-badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: white;
    border: 1px solid #d8d8d8;
    border-radius: 0.85rem;
    overflow: hidden;
    padding: 1.25rem 1.5rem;
    gap: 0.5rem;
    transition: flex 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.technology-badge::details-content {
    display: block;
}

.technology-description {
    display: block !important;
    font-size: 1.05rem;
    color: #666;
    line-height: 1.5;
    text-align: justify;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.2, 0.46, 0.45, 0.94), opacity 0s;
}

@media (hover: hover) {
    .technology-badge:hover {
        flex: 2.5;
        border-color: rgb(0, 187, 187);
        box-shadow: 0 4px 20px rgba(0, 187, 187, 0.15);
    }

    .technology-badge:hover .technology-description {
        max-height: 150px;
        opacity: 1;
        transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.2s ease 0.3s;
    }
}

.badge-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    list-style: none;
    cursor: default;
    pointer-events: none;
    user-select: none;
}

.badge-header::-webkit-details-marker {
    display: none;
}

.badge-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.technology-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: rgb(49, 49, 49);
    white-space: nowrap;
}

.badge-caret {
    display: none;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: auto;
    color: #666;
    transition: transform 0.3s ease;
}

.work-section {
    width: 100%;
    max-width: 1400px;
    padding: 4rem 2rem 6rem;
    box-sizing: border-box;
}

.work-card {
    display: flex;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.card-image {
    flex: 1;
    min-width: 0;
}

.card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-content {
    flex: 1;
    padding: 3.5rem 3rem;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "label  logo"
        "title  logo"
        "text   text"
        "action action";
    column-gap: 1.5rem;
}

.work-label {
    grid-area: label;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgb(0, 187, 187);
    margin-bottom: 0.5rem;
    align-self: end;
}

.work-title {
    grid-area: title;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgb(49, 49, 49);
    align-self: start;
}

.rookoo-logo {
    grid-area: logo;
    height: 58px;
    width: auto;
    object-fit: contain;
    align-self: center;
}

.work-text {
    grid-area: text;
    font-size: 1.2rem;
    font-weight: 500;
    color: #646464;
    line-height: 1.7;
    margin: 1rem 0 0;
    text-align: justify;
}

.spacer {
    margin-top: 3rem;
}

.work-action {
    font-size: 1.3rem !important;
    grid-area: action;
    display: inline-block;
    justify-self: end;
    margin-top: 2rem;
}

.button-primary {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    background: rgb(0, 187, 187);
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.button-primary:hover {
    background: rgb(0, 160, 160);
}

.button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.philosophy-section {
    align-self: stretch;
    background: #ececec;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.philosophy-logo-mobile {
    display: none;
}

.philosophy-section-title {
    background-image: linear-gradient(rgba(0, 187, 187, 0.5), rgba(0, 187, 187, 0.5));
    background-repeat: no-repeat;
    background-size: 100% 11px;
    background-position: 0 72%;
}

.standards-underline {
    display: inline;
}

.philosophy-inner {
    display: flex;
    gap: 5rem;
    max-width: 1000px;
    width: 100%;
    align-items: flex-start;
}

.philosophy-left {
    position: sticky;
    top: 2rem;
    flex-shrink: 0;
}

.philosophy-logo {
    width: 220px;
    height: 220px;
    object-fit: contain;
}

.philosophy-right {
    flex: 1;
}

.philosophy-item {
    position: relative;
    padding: 7rem 0 6rem;
    text-align: left;
    overflow: hidden;
    isolation: isolate;
}

.philosophy-number {
    position: absolute;
    top: 3.5rem;
    right: 1rem;
    z-index: 0;
    font-size: 8.5rem;
    font-weight: 900;
    font-style: italic;
    color: rgba(0, 187, 187, 0.15);
    line-height: 0.8;
    pointer-events: none;
    user-select: none;
}

.philosophy-item-title {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 700;
    color: rgb(49, 49, 49);
    margin: 0;
}

.philosophy-item-text {
    position: relative;
    z-index: 1;
    font-size: 1.25rem;
    font-weight: 500;
    color: #646464;
    line-height: 1.7;
    margin: 1.75rem 0 0;
    text-align: justify;
}

.philosophy-rule {
    border: none;
    border-top: 1px solid #d8d8d8;
    margin: 0;
}

.contact-section {
    width: 100%;
    max-width: 680px;
    padding: 4rem 2rem 6rem;
    box-sizing: border-box;
}

.contact-card {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.contact-header {
    background: linear-gradient(135deg, rgb(0, 187, 187), rgb(102, 205, 170));
    padding: 2.5rem;
    color: white;
}

.contact-eyebrow {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.contact-heading-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.contact-body {
    background: white;
    padding: 2.5rem;
    min-height: 31rem;
}

.field-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgb(49, 49, 49);
    margin-bottom: 0.4rem;
}

.field-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d8d8d8;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: #363636;
    outline: none;
    transition: border-color 0.2s;
}

.field-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d8d8d8;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: #363636;
    outline: none;
    transition: border-color 0.2s;
    min-height: 160px;
    max-height: 340px;
    resize: vertical;
}

.field-input:focus,
.field-textarea:focus {
    border-color: rgb(0, 187, 187);
}

.field {
    margin-bottom: 1.25rem;
}

.field-error {
    display: none;
    font-size: 0.8rem;
    color: #cc2a2a;
    margin-top: 0.35rem;
}

.field-error-visible {
    display: block;
}

.button-wrapper {
    margin-top: 0.5rem;
}

.button-send {
    width: 100%;
    padding: 0.85rem;
    background: rgb(0, 187, 187);
    color: white;
    border: none;
    border-radius: 0.6rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.button-send:hover {
    background: rgb(0, 160, 160);
}

.contact-thanks {
    margin: 0;
    min-height: calc(31rem - 5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #646464;
    text-align: center;
}

.site-footer {
    align-self: stretch;
    background: #2e2e2e;
    color: #aaa;
    padding: 3rem;
    box-sizing: border-box;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.footer-column-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
}

.footer-column-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-column-right {
    height: 100%;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.footer-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    opacity: 0.7;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.footer-brand-name {
    font-weight: 700;
    color: white;
    font-size: 2rem;
}

.footer-brand-tagline {
    font-size: 1.1rem;
    margin: 0;
    color: #666;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-link {
    color: #aaa;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link:hover {
    color: white;
}

.footer-social {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

.footer-social-icon {
    width: 44px;
    height: 44px;
    display: block;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.footer-social-link:hover .footer-social-icon {
    opacity: 1;
}

.footer-social-icon-invert {
    filter: brightness(0) invert(1);
}

.footer-copy {
    font-size: 1.1em;
    color: #aaa;
    margin: 2.5rem 0 0;
    white-space: nowrap;
}

@media (max-width: 1500px) {
    .top-wrapper {
        gap: clamp(2rem, 8vw, 200px);
    }
}

@media (max-width: 1337px) {

    .navbar {
        padding: 0.25rem 0.5rem;
    }

    .lang-switcher-toggle {
        padding: 0.5rem;
    }

    .top-wrapper {
        flex-direction: column-reverse;
        align-items: center;
        gap: 0;
        margin-top: 2.5rem;
    }

    .heading-wrapper,
    .heading-wrapper-de {
        width: 100%;
        min-width: 100%;
        padding: 0 1.25rem;
        text-align: center !important;
    }

    .heading-top {
        font-size: 80px;
        margin-top: 1.5rem;
        line-height: 1.1;
        text-align: center;
    }

    .heading-bottom {
        font-size: 46px;
        text-align: center;
        text-align-last: initial;
        max-width: 85%;
        margin: 0 auto;
    }

    .heading-subtext {
        font-size: 26px;
        text-align: center;
        max-width: 50vw;
        margin: 1rem auto 3rem;
    }

    .hero-wrapper {
        position: relative;
        width: fit-content;
        height: auto;
        display: block;
        margin: 0 auto;
        padding: 0;
    }

    .hero-image {
        position: relative;
        z-index: 1;
        width: 80vw;
        max-width: 400px;
        height: auto;
        display: block;
        padding: 0;
        margin: 0;
    }

    .circle {
        left: -30px;
        display: flex;
        justify-content: center;
        align-content: center;
        border-radius: 50%;
    }

    .section-title {
        font-size: 3.4rem;
        background-position: 0 88%;
        margin-bottom: 2rem;
        width: fit-content;
        align-self: center;
    }

    .technologies {
        height: auto;
        overflow: visible;
        padding: 2.5rem 1rem;
        display: flex;
    }

    .technology-grid {
        width: 92%;
    }

    .technology-row {
        flex-direction: column;
        align-items: stretch;
    }

    .technology-badge {
        flex: none;
        width: 100%;
        display: block;
        background: white;
        border: 1px solid #d8d8d8;
        border-radius: 0.85rem;
        padding: 1.25rem 1.5rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .technology-badge[open] {
        border-color: rgb(0, 187, 187);
        box-shadow: 0 4px 20px rgba(0, 187, 187, 0.15);
    }

    .technology-badge::details-content {
        interpolate-size: allow-keywords;
        height: 0;
        overflow: hidden;
        transition:
                height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                content-visibility 0.5s allow-discrete;
    }

    .technology-badge[open]::details-content {
        height: auto;
    }

    .badge-header {
        cursor: pointer;
        pointer-events: auto;
    }

    .badge-caret {
        display: block;
    }

    .technology-badge[open] .badge-caret {
        transform: rotate(180deg);
    }

    .technology-description {
        display: block !important;
        max-height: none;
        overflow: visible;
        opacity: 0;
        padding-top: 0.75rem;
        transition: opacity 0.3s ease;
    }

    .technology-badge[open] .technology-description {
        opacity: 1;
        transition: opacity 0.3s ease 0.1s;
    }

    .work-section {
        padding: 3rem 0.75rem 4rem;
    }

    .work-text {
        line-height: 1.25;
        font-size: calc(1.2rem * 0.9);
    }

    .rookoo-logo {
        height: 42px;
    }

    .philosophy-section {
        padding: 4rem 1.25rem;
    }

    .philosophy-section-title {
        font-size: 2.8rem;
        background-image: none;
        line-height: 1.2;
    }

    .standards-break {
        display: inline;
    }

    .standards-underline {
        background-image: linear-gradient(rgba(0, 187, 187, 0.5), rgba(0, 187, 187, 0.5));
        background-repeat: no-repeat;
        background-size: 100% 11px;
        background-position: 0 88%;
    }

    .philosophy-logo-mobile {
        display: block;
        width: 150px;
        height: 150px;
        object-fit: contain;
        margin-bottom: 1.25rem;
    }

    .philosophy-left {
        display: none;
    }

    .philosophy-inner {
        flex-direction: column;
        gap: 2rem;
    }

    .philosophy-item {
        padding: 4rem 0 2.5rem;
    }

    .philosophy-number {
        font-size: 5rem;
        top: 3rem;
        right: 0;
    }

    .philosophy-item-title {
        font-size: 1.6rem;
    }

    .philosophy-item-text {
        line-height: 1.4;
        font-size: calc(1.25rem * 0.9);
    }

    .contact-section {
        padding: 4rem 0.75rem 6rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        align-items: center;
        text-align: center;
    }

    .footer-column-left {
        align-items: center;
        gap: 0.4rem;
    }

    .footer-column-center {
        align-items: center;
    }

    .footer-column-right {
        align-items: center;
        height: auto;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-copy {
        margin-top: 0;
    }
}

@media (max-width: 768px) {

    .globe-icon {
        width: 25px;
        height: 25px;
    }

    .heading-top {
        font-size: 50px;
    }

    .heading-bottom {
        font-size: 26px;
    }

    .heading-subtext {
        font-size: 20px;
        max-width: 80%;
    }

    .section-title {
        font-size: 2.4rem;
    }

    .work-card {
        flex-direction: column;
    }

    .card-cover {
        height: 280px;
        object-fit: cover;
        width: 100%;
        display: block;
    }

    .card-content {
        min-height: 37rem;
        padding: 2rem 1.5rem;
    }

    .work-text {
        margin-top: 1rem;
        line-height: 1.4;
    }

    .work-action {
        justify-self: end;
        align-self: center;
        margin-top: 1.5rem;
    }
}
