/* ═══════════════════════════════════════════════════════════════════════════
   BUKOWSKA FUNDACJA RODZINNA
   Design System: Heritage Luxury
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══ DESIGN TOKENS ═══ */
:root {
    /* Colors - Deep navy + warm gold */
    --c-navy-900: #0a1628;
    --c-navy-800: #0f2240;
    --c-navy-700: #1a365d;
    --c-navy-600: #234876;
    --c-gold-500: #c9a962;
    --c-gold-400: #d4b978;
    --c-gold-300: #e0ca8e;
    --c-cream-100: #fdfcf9;
    --c-cream-200: #f8f6f0;
    --c-cream-300: #f0ece2;
    --c-ink: #1a1a1a;
    --c-ink-light: #4a4a4a;
    --c-ink-muted: #7a7a7a;

    /* Typography */
    --f-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --f-body: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-6: 1.5rem;
    --s-8: 2rem;
    --s-12: 3rem;
    --s-16: 4rem;
    --s-20: 5rem;
    --s-24: 6rem;
    --s-32: 8rem;

    /* Layout */
    --max-w: 1280px;
    --content-w: 720px;

    /* Effects */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--f-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--c-ink);
    background: var(--c-cream-100);
    overflow-x: hidden;
}

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

/* ═══ GRAIN TEXTURE ═══ */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)'/%3E%3C/svg%3E");
}

/* ═══ TYPOGRAPHY ═══ */
h1, h2, h3 {
    font-family: var(--f-display);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section__label {
    display: inline-block;
    font-family: var(--f-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-gold-500);
    margin-bottom: var(--s-4);
}
.section__label--light { color: var(--c-gold-400); }

.section__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--c-navy-800);
    margin-bottom: var(--s-8);
}
.section__title--center { text-align: center; }
.section--dark .section__title { color: var(--c-cream-100); }

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

.section {
    position: relative;
    padding: var(--s-24) 0;
}

.section--dark {
    background: var(--c-navy-900);
    color: var(--c-cream-200);
}

.section__bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 40px, var(--c-gold-500) 40px, var(--c-gold-500) 41px),
        repeating-linear-gradient(-45deg, transparent, transparent 40px, var(--c-gold-500) 40px, var(--c-gold-500) 41px);
    pointer-events: none;
}

/* ═══ HEADER ═══ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--s-6) 0;
    transition: all 0.4s var(--ease-out);
}

.header--scrolled {
    padding: var(--s-3) 0;
    background: rgba(253, 252, 249, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.header--hidden { transform: translateY(-100%); }

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.header__logo-mark {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-navy-800);
    color: var(--c-gold-500);
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 2px;
}

.header__logo-text {
    font-family: var(--f-display);
    font-size: 0.875rem;
    line-height: 1.2;
    color: var(--c-navy-800);
    font-weight: 500;
}

.header__nav {
    display: flex;
    gap: var(--s-8);
}

.header__link {
    position: relative;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--c-ink-light);
    transition: color 0.3s;
}

.header__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--c-gold-500);
    transition: width 0.3s var(--ease-out);
}

.header__link:hover { color: var(--c-navy-800); }
.header__link:hover::after { width: 100%; }

.header__menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: var(--s-2);
}

.header__menu span {
    width: 24px;
    height: 2px;
    background: var(--c-navy-800);
    transition: all 0.3s;
}

.header__menu--open span:first-child { transform: rotate(45deg) translate(3px, 3px); }
.header__menu--open span:last-child { transform: rotate(-45deg) translate(3px, -3px); }

/* ═══ HERO ═══ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--s-32) 0;
    overflow: hidden;
}

.hero__deco {
    position: absolute;
    border: 1px solid var(--c-gold-400);
    opacity: 0.15;
    pointer-events: none;
}

.hero__deco--1 {
    top: 15%;
    right: 10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
}

.hero__deco--2 {
    bottom: 20%;
    right: 25%;
    width: 150px;
    height: 150px;
    transform: rotate(45deg);
}

.hero__content { max-width: 700px; }

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-4);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--c-gold-500);
    margin-bottom: var(--s-8);
}

.hero__badge-line {
    width: 40px;
    height: 1px;
    background: var(--c-gold-500);
}

.hero__title {
    margin-bottom: var(--s-8);
}

.hero__title-line {
    display: block;
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: var(--c-navy-800);
}

.hero__title-line--accent {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-style: italic;
    font-weight: 400;
    color: var(--c-gold-500);
    margin-top: var(--s-2);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--c-ink-light);
    margin-bottom: var(--s-12);
    max-width: 500px;
}

.hero__scroll {
    position: absolute;
    bottom: var(--s-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-3);
    color: var(--c-ink-muted);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero__scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--c-gold-500), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ═══ BUTTON ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-8);
    background: var(--c-navy-800);
    color: var(--c-cream-100);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    transition: all 0.4s var(--ease-out);
}

.btn:hover {
    background: transparent;
    color: var(--c-navy-800);
    border-color: var(--c-navy-800);
}

.btn svg { transition: transform 0.3s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

/* ═══ DIVIDER ═══ */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-6);
    padding: var(--s-12) var(--s-6);
    color: var(--c-gold-500);
}

.divider--dark {
    background: var(--c-navy-900);
    color: var(--c-gold-400);
}

.divider__line {
    flex: 1;
    max-width: 200px;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
}

.divider__ornament svg {
    width: 60px;
    height: 20px;
}

/* ═══ ABOUT ═══ */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-16);
    align-items: center;
}

.about__content p {
    color: var(--c-ink-light);
    margin-bottom: var(--s-4);
}

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

.about__frame {
    position: relative;
    padding: var(--s-6);
}

.about__image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--c-cream-300);
    overflow: hidden;
}

.about__image-wrap--placeholder::after {
    content: 'Zdjęcie rodzinne';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-display);
    font-style: italic;
    color: var(--c-ink-muted);
}

.about__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about__frame-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: var(--c-gold-500);
    border-style: solid;
    border-width: 0;
}

.about__frame-corner--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.about__frame-corner--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.about__frame-corner--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.about__frame-corner--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* ═══ VALUES ═══ */
.mission__header {
    text-align: center;
    margin-bottom: var(--s-16);
}

.values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-8);
}

.value {
    padding: var(--s-8);
    text-align: center;
    border: 1px solid rgba(201, 169, 98, 0.2);
    background: rgba(255,255,255,0.02);
    transition: all 0.4s var(--ease-out);
}

.value:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--c-gold-500);
    transform: translateY(-4px);
}

.value__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--s-6);
    color: var(--c-gold-400);
}

.value__icon svg {
    width: 100%;
    height: 100%;
}

.value__title {
    font-size: 1.25rem;
    color: var(--c-cream-100);
    margin-bottom: var(--s-3);
}

.value__text {
    font-size: 0.9rem;
    color: var(--c-cream-300);
    opacity: 0.8;
}

/* ═══ CONTACT ═══ */
.contact {
    max-width: var(--content-w);
    margin: 0 auto;
    text-align: center;
}

.contact__desc {
    font-size: 1.125rem;
    color: var(--c-ink-light);
    margin-bottom: var(--s-12);
}

.contact__email {
    display: inline-flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-8) var(--s-12);
    border: 1px solid var(--c-gold-500);
    transition: all 0.4s var(--ease-out);
}

.contact__email:hover {
    background: var(--c-navy-800);
    border-color: var(--c-navy-800);
}

.contact__email-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-gold-500);
    transition: color 0.3s;
}

.contact__email-address {
    font-family: var(--f-display);
    font-size: 1.5rem;
    color: var(--c-navy-800);
    transition: color 0.3s;
}

.contact__email:hover .contact__email-label { color: var(--c-gold-400); }
.contact__email:hover .contact__email-address { color: var(--c-cream-100); }

/* ═══ FOOTER ═══ */
.footer {
    padding: var(--s-16) 0;
    background: var(--c-navy-900);
    color: var(--c-cream-300);
    text-align: center;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-4);
}

.footer__logo-mark {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-gold-500);
    color: var(--c-gold-500);
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: var(--s-4);
}

.footer__text {
    font-size: 0.875rem;
    opacity: 0.6;
}

.footer__tagline {
    font-family: var(--f-display);
    font-style: italic;
    font-size: 0.875rem;
    color: var(--c-gold-400);
    opacity: 0.8;
}

/* ═══ REVEAL ANIMATIONS ═══ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

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

.values .reveal:nth-child(2) { transition-delay: 0.1s; }
.values .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .about { gap: var(--s-12); }
    .values { gap: var(--s-6); }
}

@media (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--s-8);
        background: var(--c-cream-100);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s var(--ease-out);
    }

    .header__nav--open {
        opacity: 1;
        visibility: visible;
    }

    .header__nav--open .header__link {
        font-size: 1.5rem;
    }

    .header__menu { display: flex; z-index: 10; }

    .hero { padding-top: var(--s-24); min-height: auto; }
    .hero__deco { display: none; }
    .hero__scroll { display: none; }

    .about {
        grid-template-columns: 1fr;
        gap: var(--s-8);
    }

    .about__visual { order: -1; }

    .values { grid-template-columns: 1fr; }

    .section { padding: var(--s-16) 0; }
    .divider { padding: var(--s-8) var(--s-6); }
}

@media (max-width: 480px) {
    .header__logo-text { display: none; }

    .hero__badge-line { width: 20px; }

    .contact__email {
        width: 100%;
        padding: var(--s-6);
    }

    .contact__email-address { font-size: 1.125rem; }
}
