/* =========================================================
   SIDE HASSEL — STYLESHEET
   Black & white editorial identity with a purple accent
   ========================================================= */

/* Display face */
@font-face {
    font-family: "Lemon Milk";
    src: url("../fonts/lemon-milk-regular.ed663ae75182.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lemon Milk";
    src: url("../fonts/lemon-milk-medium.0b52d364a2e1.woff") format("woff");
    font-weight: 500 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lemon Milk";
    src: url("../fonts/lemon-milk-bold.12afc5171828.woff") format("woff");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

/* 1. Tokens and reset */
:root {
    --black: #050406;
    --black-soft: #0b080d;
    --white: #f4f1f5;
    --muted: #9b939f;
    --line: rgba(244, 241, 245, 0.16);
    --line-strong: rgba(244, 241, 245, 0.55);

    --purple: #53085a;
    --purple-light: #a84cb4;
    --purple-glow: rgba(83, 8, 90, 0.45);

    --font-display: "Lemon Milk", "Inter Tight", "Arial Black", Arial, sans-serif;
    --font-body: "Inter", Arial, Helvetica, sans-serif;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --gutter: 5%;
}

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

html {
    background: var(--black);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(52% 40% at 84% 4%, var(--purple-glow), transparent 72%),
        radial-gradient(42% 34% at -4% 74%, rgba(83, 8, 90, 0.22), transparent 74%),
        var(--black);
    background-attachment: fixed;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Film grain — adds depth without images */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    background-size: 140px 140px;
    mix-blend-mode: soft-light;
}

::selection {
    background: var(--purple);
    color: var(--white);
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

a,
button,
select,
.menu-toggle,
.back-to-top {
    cursor: pointer;
}

input,
textarea {
    cursor: text;
}

:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 3px;
}

section[id] {
    scroll-margin-top: 90px;
}

/* 2. Header and navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    min-height: 82px;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(5, 4, 6, 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    color: var(--white);
    border-bottom: 1px solid var(--line);
}

.logo {
    color: var(--white);
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.005em;
    transition: opacity 0.3s ease;
}

.logo span {
    color: var(--purple-light);
    font-size: 28px;
}

.logo:hover {
    opacity: 0.65;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.main-nav a {
    position: relative;
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: var(--purple-light);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s var(--ease-out);
}

.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    position: relative;
    z-index: 1002;
    background: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: transform 0.3s ease;
}

.mobile-nav {
    display: none;
}

/* 3. Hero */
.hero {
    position: relative;
    min-height: calc(100vh - 82px);
    padding: 64px var(--gutter) 88px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    color: var(--white);
    opacity: 0;
    transform: translateY(15px);
    animation: heroSupportingReveal 0.8s var(--ease-out) 2.1s forwards;
}

.hero-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple-light);
    box-shadow: 0 0 14px var(--purple-light);
}

.hero-headline {
    margin: 60px 0;
    font-family: var(--font-display);
    font-size: clamp(64px, 12.5vw, 172px);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.hero-line {
    display: flex;
    gap: 0.18em;
    overflow: hidden;
    padding: 0.1em 0.02em;
    margin: -0.1em -0.02em;
}

.hero-word {
    display: inline-block;
    color: var(--white);
    opacity: 0;
    transform: translateY(120%);
    animation: heroWordReveal 0.95s var(--ease-out) forwards;
    will-change: transform, opacity;
}

.hero-line:nth-child(1) .hero-word:first-child {
    animation-delay: 1.5s;
}

.hero-line:nth-child(1) .hero-word:last-child {
    animation-delay: 1.62s;
}

.hero-line:nth-child(2) .hero-word {
    animation-delay: 1.74s;
}

.hero-line.hero-outline-line {
    filter:
        drop-shadow(0 0 10px rgba(168, 76, 180, 0.35))
        drop-shadow(0 0 34px rgba(83, 8, 90, 0.95))
        drop-shadow(0 0 80px rgba(83, 8, 90, 0.6));
}

.hero-line.hero-outline-line .hero-word {
    color: transparent;
    -webkit-text-stroke: 2px var(--purple-light);
    animation-delay: 1.86s;
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
}

.hero-description {
    max-width: 330px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
    opacity: 0;
    transform: translateY(20px);
    animation: heroSupportingReveal 0.8s var(--ease-out) 2.25s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-strong);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateY(20px);
    animation: heroSupportingReveal 0.8s var(--ease-out) 2.35s forwards;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.hero-cta span {
    display: inline-block;
    transition: transform 0.3s var(--ease-out);
}

.hero-cta:hover {
    color: var(--purple-light);
    border-color: var(--purple-light);
}

.hero-cta:hover span {
    transform: translateY(3px);
}

/* 4. Shared section chrome */
.section-label,
.section-top,
.contact-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--muted);
}

.section-label {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.section-label .section-index,
.section-top .section-index,
.contact-top .section-index {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.section-index::before {
    content: "";
    width: 5px;
    height: 5px;
    background: var(--purple-light);
    box-shadow: 0 0 12px rgba(83, 8, 90, 0.9);
}

/* 5. Selected work */
.work-section {
    padding: 130px var(--gutter);
    border-top: 1px solid var(--line);
}

.section-top {
    margin-bottom: 96px;
}

.work-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 80px;
}

.work-heading h2 {
    font-family: var(--font-display);
    font-size: clamp(52px, 8.8vw, 130px);
    line-height: 0.94;
    letter-spacing: -0.01em;
    font-weight: 700;
}

.work-heading h2 > span:not(.split-word),
.about-content h2 > span:not(.split-word),
.contact-content h2 > span:not(.split-word) {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--purple-light);
}

.work-heading p {
    max-width: 240px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 70px 26px;
}

.work-card {
    transition: transform 0.45s var(--ease-out);
}

.work-card:nth-child(even) {
    margin-top: 100px;
}

.work-card:hover {
    transform: translateY(-6px);
}

.work-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: 24px;
    background: var(--black-soft);
    color: var(--white);
    border: 1px solid var(--line);
    transition: border-color 0.45s ease, box-shadow 0.45s ease;
}

.work-image img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.work-image > span {
    position: relative;
    z-index: 2;
    font-size: 10px;
    letter-spacing: 0.2em;
}

.work-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 40%, rgba(83, 8, 90, 0.6));
    opacity: 0;
    transition: opacity 0.45s ease;
}

.work-image::after {
    content: "SIDE HASSEL — SELECTED WORK";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    font-size: 9px;
    letter-spacing: 0.22em;
    white-space: nowrap;
    color: var(--muted);
}

.work-image.has-image::after {
    content: none;
}

.work-card:hover .work-image {
    border-color: var(--purple-light);
    box-shadow: 0 40px 90px -50px var(--purple);
}

.work-card:hover .work-image::before {
    opacity: 1;
}

.work-card:hover .work-image img {
    transform: scale(1.045);
}

.work-info {
    padding-top: 20px;
}

.work-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
}

.work-title h3 {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
}

.work-title h3 a {
    transition: color 0.3s ease;
}

.work-title h3 a:hover {
    color: var(--purple-light);
}

.work-title > span {
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--muted);
    white-space: nowrap;
}

.work-desc {
    max-width: 46ch;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--muted);
}

.work-empty {
    font-size: 14px;
    color: var(--muted);
}

.work-link {
    display: inline-block;
    margin-top: 100px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-strong);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.work-link:hover {
    color: var(--purple-light);
    border-color: var(--purple-light);
    transform: translateY(-3px);
}

/* 6. About */
.about-section {
    padding: 110px var(--gutter);
    border-top: 1px solid var(--line);
}

.about-content {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    align-items: end;
    gap: 60px;
    padding-top: 88px;
}

.about-content h2 {
    font-family: var(--font-display);
    font-size: clamp(54px, 8.8vw, 130px);
    line-height: 0.94;
    letter-spacing: -0.01em;
    font-weight: 700;
}

.about-description {
    max-width: 380px;
    padding-bottom: 10px;
}

.about-description p {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--muted);
}

.text-link {
    display: inline-block;
    margin-top: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-strong);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.text-link:hover {
    color: var(--purple-light);
    border-color: var(--purple-light);
}

/* 7. Services */
.services-section {
    padding: 110px var(--gutter);
    border-top: 1px solid var(--line);
}

.services-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    padding: 88px 0 66px;
}

.services-heading h2 {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 92px);
    line-height: 0.96;
    letter-spacing: -0.005em;
    font-weight: 700;
}

.services-heading p {
    max-width: 250px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.services-list {
    border-top: 1px solid var(--line);
}

.service-item {
    min-height: 112px;
    display: grid;
    grid-template-columns: 70px 1fr 40px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    transition: padding 0.4s var(--ease-out), border-color 0.4s ease, background 0.4s ease;
}

.service-item:hover {
    padding-left: 18px;
    border-bottom-color: var(--purple-light);
    background: linear-gradient(90deg, rgba(83, 8, 90, 0.28), transparent 62%);
}

.service-number {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--muted);
    transition: color 0.3s ease;
}

.service-item h3 {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.6vw, 31px);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
}

.service-arrow {
    font-size: 24px;
    text-align: right;
    color: var(--muted);
    transition: color 0.35s ease, transform 0.35s var(--ease-out);
}

.service-item:hover .service-number,
.service-item:hover .service-arrow {
    color: var(--purple-light);
}

.service-item:hover .service-arrow {
    transform: translate(4px, -4px);
}

/* 8. Contact */
.contact-section {
    padding: 100px var(--gutter) 90px;
    border-top: 1px solid var(--line);
}

.contact-content {
    padding: 140px 0 130px;
}

.contact-content > p {
    margin-bottom: 34px;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.contact-content h2 {
    font-family: var(--font-display);
    font-size: clamp(54px, 10.6vw, 158px);
    line-height: 0.94;
    letter-spacing: -0.01em;
    font-weight: 700;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 60px;
    margin-top: 62px;
    padding: 19px 24px;
    border: 1px solid var(--line-strong);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.contact-button:hover {
    background: var(--purple);
    border-color: var(--purple-light);
    color: var(--white);
}

.contact-button span {
    font-size: 16px;
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    padding: 42px 0 40px;
    border-top: 1px solid var(--line);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-label {
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.contact-item a,
.contact-item > span:last-child {
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
}

.contact-item a {
    width: fit-content;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--purple-light);
}

/* 9. Contact form */
.contact-form-wrapper {
    padding: 80px 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: 90px;
}

.contact-form-heading {
    margin-bottom: 50px;
}

.contact-form-heading > span {
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.contact-form-heading h3 {
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: clamp(36px, 5.8vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.005em;
    font-weight: 700;
}

.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.form-group label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--muted);
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--purple-light);
}

.form-group input,
.form-group textarea,
.form-group select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 13px 0;
    background: transparent;
    color: var(--white);
    border: none;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-bottom-color: var(--purple-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #7b7480;
    opacity: 1;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23f4f1f5' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
}

.form-group select option {
    background: var(--black-soft);
    color: var(--white);
}

.form-group ul.errorlist {
    color: var(--purple-light);
    font-size: 11px;
    list-style: none;
}

.form-success {
    padding: 16px 18px;
    border: 1px solid var(--purple-light);
    background: rgba(83, 8, 90, 0.18);
    font-size: 10px;
    letter-spacing: 0.14em;
}

.contact-submit {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 19px 24px;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, transform 0.35s var(--ease-out);
}

.contact-submit:hover {
    background: var(--purple);
    border-color: var(--purple-light);
    color: var(--white);
    transform: translateY(-3px);
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

/* 10. Footer */
.site-footer {
    padding: 90px var(--gutter) 28px;
    border-top: 1px solid var(--line);
}

.footer-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 90px;
}

.footer-top h2 {
    font-family: var(--font-display);
    font-size: clamp(44px, 7.4vw, 102px);
    line-height: 0.96;
    letter-spacing: -0.005em;
    font-weight: 700;
}

.footer-email {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-strong);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    white-space: nowrap;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-email:hover {
    color: var(--purple-light);
    border-color: var(--purple-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-bottom p {
    font-size: 9px;
    letter-spacing: 0.14em;
}

/* 11. Intro screen */
.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(50% 45% at 50% 118%, var(--purple-glow), transparent 70%),
        var(--black);
    color: var(--white);
    animation: introExit 0.7s cubic-bezier(0.76, 0, 0.24, 1) 1.5s forwards;
    pointer-events: none;
}

.intro-content {
    width: min(82%, 850px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-caption {
    margin-bottom: 28px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.36em;
    opacity: 0;
    animation: introCaption 0.7s ease 0.15s forwards;
}

.intro-logo {
    font-family: var(--font-display);
    font-size: clamp(42px, 9vw, 105px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.005em;
    white-space: nowrap;
    clip-path: inset(0 100% 0 0);
    animation: introLogoReveal 1s var(--ease-out) 0.3s forwards;
}

.intro-logo span {
    color: var(--purple-light);
}

.intro-line {
    width: 0;
    height: 1px;
    margin-top: 26px;
    background: linear-gradient(90deg, var(--purple-light), var(--white));
    animation: introLineReveal 0.9s var(--ease-out) 0.9s forwards;
}

.intro-bottom {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 8px;
    letter-spacing: 0.22em;
    opacity: 0;
    animation: introCaption 0.6s ease 1.05s forwards;
}

/* 12. Back to top */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(5, 4, 6, 0.75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--white);
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s var(--ease-out), background-color 0.3s ease, border-color 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--purple);
    border-color: var(--purple-light);
    color: var(--white);
}

.back-to-top.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

/* 13. Scroll reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.85s ease,
        transform 0.85s var(--ease-out);
}

[data-reveal="left"] {
    transform: translateX(-45px);
}

[data-reveal="right"] {
    transform: translateX(45px);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

[data-delay="1"] {
    transition-delay: 0.1s;
}

[data-delay="2"] {
    transition-delay: 0.2s;
}

[data-delay="3"] {
    transition-delay: 0.3s;
}

[data-delay="4"] {
    transition-delay: 0.4s;
}

/* 14. Animations */
@keyframes heroWordReveal {
    from {
        opacity: 0;
        transform: translateY(110%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroSupportingReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes introCaption {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 0.65;
        transform: translateY(0);
    }
}

@keyframes introLogoReveal {
    from {
        clip-path: inset(0 100% 0 0);
        transform: translateY(15px);
    }

    to {
        clip-path: inset(0 0 0 0);
        transform: translateY(0);
    }
}

@keyframes introLineReveal {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes introExit {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-100%);
        visibility: hidden;
    }
}

/* 15. Responsive */
@media (max-width: 900px) {
    .hero-headline {
        font-size: clamp(64px, 15vw, 150px);
    }

    .work-grid {
        gap: 55px 22px;
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .mobile-nav {
        position: fixed;
        inset: 75px 0 0;
        z-index: 999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 25px;
        padding: 50px var(--gutter);
        background: rgba(5, 4, 6, 0.97);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        border-top: 1px solid var(--line);
        transform: translateY(-110%);
        visibility: hidden;
        transition: transform 0.45s var(--ease-out), visibility 0.45s;
    }

    .mobile-nav a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 18px;
        border-bottom: 1px solid var(--line);
        color: var(--white);
        font-family: var(--font-display);
        font-size: clamp(28px, 7.4vw, 50px);
        font-weight: 700;
        letter-spacing: -0.005em;
    }

    .mobile-nav a span {
        font-family: var(--font-body);
        font-size: 10px;
        letter-spacing: 0.16em;
        color: var(--purple-light);
    }

    .mobile-nav.active {
        transform: translateY(0);
        visibility: visible;
    }

    .menu-toggle.active span:first-child {
        transform: translateY(4.5px) rotate(45deg);
    }

    .menu-toggle.active span:last-child {
        transform: translateY(-4.5px) rotate(-45deg);
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .back-to-top {
        opacity: 0;
        visibility: hidden;
    }

    .site-header {
        min-height: 75px;
    }

    .logo {
        font-size: 21px;
    }

    .hero {
        min-height: 82vh;
        padding-top: 44px;
        padding-bottom: 64px;
    }

    .hero-headline {
        margin: 52px 0;
        font-size: clamp(60px, 16.5vw, 120px);
    }

    .hero-outline-line .hero-word {
        -webkit-text-stroke-width: 1.5px;
    }

    .hero-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 26px;
    }

    .work-section,
    .about-section,
    .services-section {
        padding: 78px var(--gutter);
    }

    .section-top {
        margin-bottom: 62px;
    }

    .work-heading {
        display: block;
        margin-bottom: 52px;
    }

    .work-heading p {
        margin-top: 28px;
    }

    .work-grid {
        grid-template-columns: 1fr;
        gap: 46px;
    }

    .work-card:nth-child(even) {
        margin-top: 0;
    }

    .work-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .work-link {
        margin-top: 60px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 42px;
        padding-top: 58px;
    }

    .services-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 62px 0 42px;
    }

    .service-item {
        min-height: 88px;
        grid-template-columns: 40px 1fr 25px;
    }

    .service-item h3 {
        font-size: 17px;
        letter-spacing: 0;
    }

    .service-item:hover {
        padding-left: 10px;
    }

    .contact-section {
        padding-top: 74px;
    }

    .contact-content {
        padding: 100px 0;
    }

    .contact-content h2 {
        font-size: clamp(52px, 13.5vw, 96px);
    }

    .contact-button {
        margin-top: 44px;
        gap: 40px;
    }

    .contact-details {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 34px 0 40px;
    }

    .contact-form-wrapper {
        padding: 60px 0;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-top {
        align-items: flex-start;
        flex-direction: column;
        padding-bottom: 56px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }

    .back-to-top {
        right: 20px;
        bottom: 20px;
        width: 44px;
        height: 44px;
    }
}

/* =========================================================
   16. MOTION LAYER
   ========================================================= */

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 10001;
    pointer-events: none;
}

.scroll-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--purple-light));
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* Header state */
.site-header {
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.site-header.is-scrolled {
    background: rgba(5, 4, 6, 0.92);
    border-bottom-color: rgba(244, 241, 245, 0.22);
}

.main-nav a.is-active {
    color: var(--purple-light);
}

.main-nav a.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Purple glow that follows the pointer across the page */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: min(62vw, 560px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(83, 8, 90, 0.5), rgba(83, 8, 90, 0.16) 45%, transparent 70%);
    filter: blur(50px);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(62vw, 32vh, 0) translate(-50%, -50%);
    transition: transform 0.35s ease-out, opacity 0.8s ease;
    will-change: transform;
}

html.has-fine-pointer .cursor-glow {
    opacity: 0.8;
}

main,
.site-footer {
    position: relative;
    z-index: 1;
}

.hero-eyebrow,
.hero-headline,
.hero-bottom {
    position: relative;
    z-index: 1;
}

.hero-headline {
    transform: translate3d(0, var(--hero-parallax, 0px), 0);
    will-change: transform;
}

.hero-bottom {
    transform: translate3d(0, calc(var(--hero-parallax, 0px) * 0.55), 0);
}

/* Split headline animation */
html.js [data-split] {
    opacity: 0;
}

html.js [data-split].is-split {
    opacity: 1;
}

.split-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding: 0.12em 0.03em 0.14em;
    margin: -0.12em -0.03em -0.14em;
}

.split-word-inner {
    display: inline-block;
    transform: translate3d(0, 125%, 0);
    transition: transform 0.95s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 45ms);
    will-change: transform;
}

[data-split].is-visible .split-word-inner {
    transform: translate3d(0, 0, 0);
}

/* Service hover line and slide */
.service-item {
    position: relative;
}

.service-item::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 1px;
    background: var(--purple-light);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

.service-item:hover::after {
    transform: scaleX(1);
}

.service-item h3 {
    transition: transform 0.4s var(--ease-out);
}

.service-item:hover h3 {
    transform: translateX(6px);
}

/* Work image parallax + hover */
.work-image img {
    transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.1);
}

.work-card:hover .work-image img {
    transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.14);
}

.work-card:hover .work-title h3 {
    color: var(--purple-light);
}

/* Magnetic controls */
html.has-fine-pointer [data-magnetic] {
    transition: transform 0.28s var(--ease-out);
}

/* Button sweep */
.contact-button,
.contact-submit {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.contact-button::before,
.contact-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--purple);
    transform: translateY(101%);
    transition: transform 0.45s var(--ease-out);
}

.contact-button:hover::before,
.contact-submit:hover::before {
    transform: translateY(0);
}

.contact-button:hover,
.contact-submit:hover {
    background: transparent;
}

/* Live clock */
#cairo-time {
    color: var(--white);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
}

/* Keyword marquee */
.marquee {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(83, 8, 90, 0.16), transparent 45%, rgba(83, 8, 90, 0.1));
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeMove 42s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 22px 0;
}

.marquee-group span {
    display: inline-block;
    padding: 0 22px;
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 54px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px rgba(244, 241, 245, 0.42);
}

.marquee-group .marquee-dot {
    padding: 0;
    font-size: clamp(13px, 1.5vw, 18px);
    color: var(--purple-light);
    -webkit-text-stroke: 0;
}

@keyframes marqueeMove {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

@media (max-width: 900px) {
    .cursor-glow {
        display: none;
    }

    .marquee-group {
        padding: 16px 0;
    }

    .marquee-group span {
        padding: 0 16px;
    }
}

/* 17. Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .intro-screen {
        display: none;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .hero-word,
    .hero-eyebrow,
    .hero-description,
    .hero-cta {
        opacity: 1;
        transform: none;
    }

    html.js [data-split] {
        opacity: 1;
    }

    .split-word-inner {
        transform: none;
    }

    .hero-headline,
    .hero-bottom,
    .work-image img,
    .work-card:hover .work-image img {
        transform: none;
    }

    .marquee-track {
        animation: none;
    }

    .cursor-glow {
        display: none;
    }
}
