/* ============================================
   MAIN.CSS – Fliesen Chudy Design-System
   "Luxury Craftsman" – Refined luxury meets raw craftsmanship
   Reset, Custom Properties, Typografie, Layout
   ============================================ */

/* === CSS RESET === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
    touch-action: pan-x pan-y;
    -ms-touch-action: pan-x pan-y;
    background-color: var(--color-page-bg, #0c0b09);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    background-color: var(--color-page-bg, #0c0b09);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

/* Subtiler Grain/Noise-Overlay auf dem gesamten Body */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    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");
    background-repeat: repeat;
    background-size: 256px 256px;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

address {
    font-style: normal;
}

/* === CUSTOM PROPERTIES (Design-Tokens) === */
:root {
    --color-page-bg: #0c0b09;

    /* Hintergründe: Warmes Dunkel, kein reines Schwarz */
    --color-bg-primary: #0c0b09;
    --color-bg-secondary: #161412;
    --color-bg-card: #1e1b17;
    --color-bg-card-elevated: #231f1b;

    /* Akzent: Warmes Messing/Brushed Gold */
    --color-accent: #c49a6c;
    --color-accent-hover: #d4aa7c;
    --color-accent-subtle: rgba(196, 154, 108, 0.12);
    --color-accent-glow: rgba(196, 154, 108, 0.08);

    /* Text: Warmes Cremeweiß, kein reines Weiß */
    --color-text-primary: #ece6de;
    --color-text-secondary: #9a9187;
    --color-white: #ece6de;

    /* Border: Subtil, warm */
    --color-border: #2a2520;

    /* Typografie: DM Serif Display + DM Sans */
    --font-heading: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing – großzügig aber kontrolliert */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: clamp(3.25rem, 6vw, 5rem);

    /* Layout */
    --max-width: 1200px;
    --max-width-wide: 1400px;
    --max-width-text: 60ch;
    --container-padding: 1.25rem;
    --border-radius: 2px;

    --header-height: 72px;
    --safe-area-top: 0px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --browserbar-guard-height: 96px;
    --mobile-cta-height: 52px;
    --mobile-fixed-bottom-reserve: calc(var(--mobile-cta-height) + var(--safe-area-bottom));

    /* Premium Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* === @FONT-FACE === */

/* DM Serif Display – Headings */
@font-face {
    font-family: 'DM Serif Display';
    src: url('/static/fonts/DMSerifDisplay-latin-ext.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'DM Serif Display';
    src: url('/static/fonts/DMSerifDisplay-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'DM Serif Display';
    src: url('/static/fonts/DMSerifDisplay-italic-latin-ext.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: optional;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'DM Serif Display';
    src: url('/static/fonts/DMSerifDisplay-italic-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: optional;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Sans – Body */
@font-face {
    font-family: 'DM Sans';
    src: url('/static/fonts/DMSans-latin-ext.woff2') format('woff2');
    font-weight: 100 1000;
    font-style: normal;
    font-display: optional;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'DM Sans';
    src: url('/static/fonts/DMSans-latin.woff2') format('woff2');
    font-weight: 100 1000;
    font-style: normal;
    font-display: optional;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'DM Sans';
    src: url('/static/fonts/DMSans-italic-latin-ext.woff2') format('woff2');
    font-weight: 100 1000;
    font-style: italic;
    font-display: optional;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'DM Sans';
    src: url('/static/fonts/DMSans-italic-latin.woff2') format('woff2');
    font-weight: 100 1000;
    font-style: italic;
    font-display: optional;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === TYPOGRAFIE === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-weight: 400;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.25rem, 4.2vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.625rem, 3vw, 2.35rem);
    line-height: 1.15;
    margin-bottom: var(--space-sm);
    overflow-wrap: break-word;
    text-wrap: balance;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
    margin-bottom: var(--space-xs);
}

p {
    max-width: var(--max-width-text);
    margin-bottom: 1rem;
    line-height: 1.7;
}

p:last-child {
    margin-bottom: 0;
}

.kicker {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: fit-content;
}

.kicker::before {
    content: '';
    width: 3rem;
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    flex-shrink: 0;
}

/* Centered kickers (text-center contexts only) */
.text-center .kicker {
    margin-left: auto;
    margin-right: auto;
}

/* === LAYOUT === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}

/* Subtile Sektionsübergänge */
.section--alt {
    background-color: var(--color-bg-secondary);
}

.section--alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 154, 108, 0.1), transparent);
}

.section-header {
    text-align: left;
    margin-bottom: var(--space-md);
    max-width: 700px;
}

.section-header .kicker {
    margin-left: 0;
}

.section-header h2 {
    margin-bottom: var(--space-sm);
}

.section-header p {
    max-width: 700px;
}

/* Dekorative horizontale Trennlinie */
.section-divider {
    width: 60px;
    height: 1px;
    background: var(--color-accent);
    margin: var(--space-md) 0;
    opacity: 0.4;
}

.text-center .section-divider {
    margin-left: auto;
    margin-right: auto;
}


main {
    position: relative;
    padding-top: calc(var(--header-height) + var(--safe-area-top));
}

/* === SCROLL REVEAL ANIMATIONS === */
html.js .fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out-expo),
                transform 0.9s var(--ease-out-expo);
}

html.js .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

html.js .hero .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Image reveal: clip-path wipe */
html.js .reveal-image {
    opacity: 0;
}

html.js .reveal-image.visible {
    opacity: 1;
    animation: clipReveal 1.2s var(--ease-in-out) forwards;
}

@keyframes clipReveal {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
}

/* Scale reveal for cards */
html.js .reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

html.js .reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Horizontal line grow */
html.js .reveal-line {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s var(--ease-in-out);
}

html.js .reveal-line.visible {
    transform: scaleX(1);
}

/* Fade from left */
html.js .fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 1s var(--ease-out-expo),
                transform 1s var(--ease-out-expo);
}

html.js .fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade from right */
html.js .fade-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 1s var(--ease-out-expo),
                transform 1s var(--ease-out-expo);
}

html.js .fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* === CUSTOM CURSOR (Desktop only) === */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out-expo),
                height 0.4s var(--ease-out-expo),
                background 0.4s var(--ease-out-expo),
                border 0.4s var(--ease-out-expo),
                opacity 0.4s ease;
    will-change: left, top;
}

.cursor-dot.visible {
    opacity: 0.8;
}

.cursor-dot.hovering {
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid rgba(196, 154, 108, 0.4);
    opacity: 0.6;
}

.cursor-dot.clicking {
    width: 4px;
    height: 4px;
}

/* Gold shimmer text effect */
@keyframes goldShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        var(--color-accent) 0%,
        #e8c99b 30%,
        #f5deb3 50%,
        #e8c99b 70%,
        var(--color-accent) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 6s ease-in-out infinite;
}

/* === UTILITY-KLASSEN === */
.text-center {
    text-align: center;
}

.text-center p {
    margin-left: auto;
    margin-right: auto;
}

.text-accent {
    color: var(--color-accent);
}

.text-white {
    color: var(--color-white);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.max-width-narrow {
    max-width: 680px;
}

.container.max-width-narrow {
    max-width: var(--max-width);
}

.container.max-width-narrow > * {
    max-width: 680px;
}

.container.text-center.max-width-narrow > * {
    margin-left: auto;
    margin-right: auto;
}

.text-center .max-width-narrow {
    margin-left: auto;
    margin-right: auto;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    html.js .fade-up,
    html.js .fade-left,
    html.js .fade-right,
    html.js .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html.js .reveal-image {
        opacity: 1;
        clip-path: none;
        animation: none;
    }

    .cursor-dot {
        display: none;
    }
}
