/* =========================================================
   MAIN.CSS — Kancelaria Radcy Prawnego
   Base variables, reset, grid, utilities
   ========================================================= */

/* ----- Google Fonts fallback stack ----- */
/* Loaded in header.php: Cinzel, Playfair Display, Montserrat */

/* ----- CSS Custom Properties ----- */
:root {
    /* Brand colors */
    --gold:         #C3A04B;
    --gold-light:   #d4b76a;
    --gold-pale:    rgba(195, 160, 75, 0.08);
    --graphite:     #505050;
    --graphite-dark:#333333;
    --gray:         #B9B9B9;
    --gray-light:   #E8E8E8;
    --bg:           #F9F9F9;
    --white:        #FFFFFF;
    --black:        #1a1a1a;

    /* Typography */
    --font-display: 'Cinzel', 'Playfair Display', Georgia, serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body:    'Montserrat', 'Open Sans', sans-serif;

    /* Spacing scale */
    --space-xs:  8px;
    --space-sm:  16px;
    --space-md:  32px;
    --space-lg:  64px;
    --space-xl:  96px;
    --space-xxl: 128px;

    /* Layout */
    --container:  1200px;
    --container-wide: 1400px;
    --gutter:     40px;

    /* Timing */
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in:  cubic-bezier(0.4, 0, 1, 1);

    /* Section padding */
    --section-py: 96px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--graphite);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
}

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

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

/* ----- Grid System ----- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

/* ----- Typography Scale ----- */
.heading-display {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.15;
    color: var(--graphite-dark);
}

.heading-section {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--graphite-dark);
}

.heading-gold-rule {
    position: relative;
    padding-bottom: 24px;
}

.heading-gold-rule::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--gold);
}

.heading-gold-rule--center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Section label (small uppercase caption above heading) */
.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.25s var(--ease-out),
                color 0.25s var(--ease-out),
                box-shadow 0.25s var(--ease-out),
                transform 0.15s var(--ease-out);
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--gold);
    color: var(--white);
    padding: 15px 36px;
}

.btn--primary:hover {
    background: var(--gold-light);
    box-shadow: 0 8px 24px rgba(195, 160, 75, 0.35);
}

.btn--outline {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--gold);
    padding: 14px 34px;
}

.btn--outline:hover {
    background: var(--gold);
    color: var(--white);
}

.btn--white {
    background: var(--white);
    color: var(--graphite-dark);
    padding: 15px 36px;
}

.btn--white:hover {
    background: var(--bg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* ----- Divider ----- */
.gold-divider {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 24px auto;
}

.gold-divider--left {
    margin-left: 0;
}

/* ----- Section wrapper ----- */
section {
    padding: var(--section-py) 0;
}

section.section--gray {
    background: var(--bg);
}

section.section--dark {
    background: var(--graphite-dark);
    color: var(--white);
}

/* ----- Utilities ----- */
.text-center { text-align: center; }
.text-gold   { color: var(--gold); }
.text-gray   { color: var(--gray); }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- Reveal animations (triggered by JS IntersectionObserver) ----- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    will-change: opacity, transform;
}

.reveal--left {
    transform: translateX(-48px);
}

.reveal--right {
    transform: translateX(48px);
}

.reveal--scale {
    transform: translateY(20px) scale(0.94);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

.reveal-delay-1  { transition-delay: 0.08s; }
.reveal-delay-2  { transition-delay: 0.16s; }
.reveal-delay-3  { transition-delay: 0.24s; }
.reveal-delay-4  { transition-delay: 0.32s; }
.reveal-delay-5  { transition-delay: 0.40s; }
.reveal-delay-6  { transition-delay: 0.48s; }
.reveal-delay-7  { transition-delay: 0.56s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal--left, .reveal--right, .reveal--scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ----- Responsive Breakpoints ----- */
@media (max-width: 1024px) {
    :root {
        --gutter: 32px;
        --section-py: 72px;
    }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --gutter: 24px;
        --section-py: 56px;
    }
    .grid-2,
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    :root {
        --gutter: 20px;
        --section-py: 48px;
    }
}
