/* ==========================================================================
   HasiKe — Editorial Dark Design System
   ========================================================================== */

:root {
    /* Surfaces */
    --bg: #0b0b0d;
    --bg-1: #0f0f12;
    --bg-2: #14141a;
    --bg-elev: #1a1a22;
    --line: rgba(245, 240, 232, 0.08);
    --line-strong: rgba(245, 240, 232, 0.16);

    /* Ink */
    --ink: #ECE8E1;
    --ink-2: #b8b3aa;
    --ink-3: #8a8780;
    --ink-4: #5a5852;

    /* Accents */
    --amber: #FF6A2C;
    --amber-soft: #FFB089;
    --amber-glow: rgba(255, 106, 44, 0.35);
    --ice: #7EC5FF;
    --ice-glow: rgba(126, 197, 255, 0.25);

    /* Gradients */
    --grad-flame: linear-gradient(135deg, #FF6A2C 0%, #FFB089 50%, #FFD9B8 100%);
    --grad-ink: linear-gradient(180deg, #ECE8E1 0%, #b8b3aa 100%);
    --grad-deep: linear-gradient(180deg, #0b0b0d 0%, #14141a 100%);

    /* Typography */
    --font-display: 'Fraunces', 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    /* Layout */
    --container: 1280px;
    --container-narrow: 880px;
    --gutter: clamp(20px, 4vw, 60px);
    --section-y: clamp(80px, 12vw, 180px);
}

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

html { scroll-behavior: smooth; }

::selection { background: var(--amber); color: var(--bg); }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'ss01', 'cv02', 'cv03';
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* (Film grain overlay entfernt — war zu teuer für die GPU) */

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-elev); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* ==========================================================================
   Typography Primitives
   ========================================================================== */

.display {
    font-family: var(--font-display);
    font-weight: 400;
    font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 0;
    letter-spacing: -0.04em;
    line-height: 0.92;
}

.display em {
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-3);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--amber);
}

.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); }

/* ==========================================================================
   Container + Section
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

section {
    position: relative;
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.section-head {
    margin-bottom: clamp(40px, 6vw, 80px);
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-top: 16px;
    max-width: 18ch;
}

.section-head h2 em { font-style: italic; color: var(--amber); }

/* ==========================================================================
   Navigation
   ========================================================================== */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px var(--gutter);
    transition: padding 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.site-nav.scrolled {
    padding: 14px var(--gutter);
    background: rgba(11, 11, 13, 0.95);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s var(--ease-out);
}

.brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 18px var(--amber-glow);
    animation: pulseDot 2.2s var(--ease-in-out) infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.78); opacity: 0.7; }
}

.brand:hover { color: var(--amber); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s var(--ease-out);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--amber);
    transition: width 0.4s var(--ease-out);
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
    transition: all 0.3s var(--ease-out);
}

.back-link svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out); }
.back-link:hover { color: var(--ink); }
.back-link:hover svg { transform: translateX(-4px); }

.nav-toggle {
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

/* Mobile menu */
.nav-mobile {
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 13, 0.98);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}

.nav-mobile.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-mobile a {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 26px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
}

.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }

.btn-primary {
    background: var(--ink);
    color: var(--bg);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-flame);
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-out);
    z-index: -1;
}

.btn-primary:hover { color: var(--bg); }
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-outline:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);
}
.btn-outline:hover svg { transform: translateX(4px); }

.btn-ghost {
    background: transparent;
    color: var(--ink-2);
    padding: 12px 0;
}

.btn-ghost:hover { color: var(--amber); }
.btn-ghost:hover svg { transform: translateX(4px); }

/* ==========================================================================
   Reveal Animation
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left { transform: translateX(-40px); }
.reveal-left.in { transform: translateX(0); }
.reveal-right { transform: translateX(40px); }
.reveal-right.in { transform: translateX(0); }
.reveal-scale { transform: scale(0.96); }
.reveal-scale.in { transform: scale(1); }

[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.4s; }
[data-reveal-delay="6"] { transition-delay: 0.48s; }

/* Word-by-word splittext-like animation */
.split-words {
    display: inline-block;
}
.split-words .word {
    display: inline-block;
    overflow: hidden;
    padding-bottom: 0.08em;
}
.split-words .word > span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1s var(--ease-out);
}
.split-words.in .word > span {
    transform: translateY(0);
}
.split-words .word:nth-child(2) > span { transition-delay: 0.05s; }
.split-words .word:nth-child(3) > span { transition-delay: 0.1s; }
.split-words .word:nth-child(4) > span { transition-delay: 0.15s; }
.split-words .word:nth-child(5) > span { transition-delay: 0.2s; }
.split-words .word:nth-child(6) > span { transition-delay: 0.25s; }
.split-words .word:nth-child(7) > span { transition-delay: 0.3s; }
.split-words .word:nth-child(8) > span { transition-delay: 0.35s; }
.split-words .word:nth-child(9) > span { transition-delay: 0.4s; }

/* ==========================================================================
   Cards (project / feature / spec)
   ========================================================================== */

.card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px;
    transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.card:hover {
    border-color: var(--line-strong);
    background: var(--bg-2);
}

/* Project card */
.project-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--bg-1);
    transition: transform 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}

.project-card .media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--bg-2);
}

.project-card .media img,
.project-card .media .preview-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out);
}

.project-card:hover .media img,
.project-card:hover .media .preview-canvas {
    transform: scale(1.05);
}

.project-card .media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(11, 11, 13, 0.95) 100%);
    pointer-events: none;
}

.project-card .body {
    padding: 28px 28px 32px;
    position: relative;
}

.project-card .tag {
    position: absolute;
    top: -16px;
    left: 28px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 6px 12px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--amber);
}

.project-card h3 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 12px;
}

.project-card p {
    color: var(--ink-3);
    font-size: 0.96rem;
    line-height: 1.6;
}

.project-card .arrow {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--ink);
    transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
    z-index: 2;
}

.project-card .arrow svg { width: 18px; height: 18px; transition: transform 0.4s var(--ease-out); }

.project-card:hover .arrow {
    background: var(--amber);
    color: var(--bg);
    border-color: var(--amber);
}

.project-card:hover .arrow svg { transform: translate(2px, -2px) rotate(0deg); }
.project-card:hover { transform: translateY(-6px); border-color: var(--line-strong); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 60px var(--gutter) 40px;
    background: var(--bg-1);
}

.footer-grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.footer-brand .display {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--ink-3);
    max-width: 40ch;
}

.footer-col h6 {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 18px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--ink-2); transition: color 0.3s var(--ease-out); }
.footer-col a:hover { color: var(--amber); }

.footer-base {
    max-width: var(--container);
    margin: 60px auto 0;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-3);
}

/* ==========================================================================
   Marquee
   ========================================================================== */

.marquee {
    overflow: hidden;
    padding: 30px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-1);
    position: relative;
}

.marquee-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: marqueeScroll 35s linear infinite;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4rem);
    color: var(--ink-2);
    letter-spacing: -0.02em;
}

.marquee-track span { white-space: nowrap; display: inline-flex; align-items: center; gap: 60px; }
.marquee-track span::after {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--amber);
}
.marquee-track em {
    font-style: italic;
    color: var(--amber);
}

@keyframes marqueeScroll {
    to { transform: translateX(-50%); }
}

/* (Custom Cursor entfernt — mix-blend-mode + RAF war zu teuer.
   Native Cursor reicht völlig für ein gutes Gefühl.) */

/* ==========================================================================
   Page Loader
   ========================================================================== */

.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 100000;
    display: grid;
    place-items: center;
    transition: opacity 0.6s var(--ease-out), visibility 0.6s var(--ease-out);
}

.page-loader.done {
    opacity: 0;
    visibility: hidden;
}

.loader-wordmark {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    letter-spacing: -0.03em;
    color: var(--ink);
    position: relative;
    overflow: hidden;
    display: flex;
}

.loader-wordmark span {
    display: inline-block;
    transform: translateY(110%);
    animation: loaderRise 0.7s var(--ease-out) forwards;
}

.loader-wordmark span:nth-child(1) { animation-delay: 0.0s; }
.loader-wordmark span:nth-child(2) { animation-delay: 0.05s; }
.loader-wordmark span:nth-child(3) { animation-delay: 0.1s; }
.loader-wordmark span:nth-child(4) { animation-delay: 0.15s; }
.loader-wordmark span:nth-child(5) { animation-delay: 0.2s; }
.loader-wordmark span:nth-child(6) { animation-delay: 0.25s; }

@keyframes loaderRise {
    to { transform: translateY(0); }
}

.loader-bar {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: var(--line);
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--amber);
    transform: translateX(-100%);
    animation: loaderProgress 1s var(--ease-out) 0.3s forwards;
}

@keyframes loaderProgress {
    to { transform: translateX(0); }
}

/* ==========================================================================
   Scroll progress bar
   ========================================================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    z-index: 101;
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--amber);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 18px var(--amber-glow);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-ink { color: var(--ink); }
.text-ink-2 { color: var(--ink-2); }
.text-ink-3 { color: var(--ink-3); }
.text-amber { color: var(--amber); }
.text-ice { color: var(--ice); }

.bg-1 { background: var(--bg-1); }
.bg-2 { background: var(--bg-2); }

.divider {
    width: 100%;
    height: 1px;
    background: var(--line);
    margin: 60px 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-1);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 14px var(--amber-glow);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 968px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    section { padding-top: 80px; padding-bottom: 80px; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .btn { padding: 14px 22px; font-size: 0.74rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
