/* ===================================
   CUSTOM FONTS
   =================================== */

@font-face {
    font-family: 'England';
    src: url('england-font.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Poiret One';
    src: url('PoiretOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ===================================
   RESET & BASE
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto; /* Pozwól na scrollowanie w pionie */
    /* Edge-to-edge display support */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    background: #0a0e1a;
    line-height: 1.6;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(180deg, #050510 0%, #0f0a25 40%, #1a1540 70%, #2d2560 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Edge-to-edge: extend behind notch/status bar */
    padding-top: env(safe-area-inset-top);
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero__canvas--stars {
    z-index: 1;
    /* GPU acceleration optimizations */
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.hero__canvas--aurora {
    z-index: 2;
    filter: blur(8px);
    /* GPU acceleration optimizations */
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Responsive blur - stronger on desktop */
@media (min-width: 1024px) {
    .hero__canvas--aurora {
        filter: blur(10px);
    }
}

@media (min-width: 1900px) {
    .hero__canvas--aurora {
        filter: blur(12px);
    }
}

/* ===================================
   CONTENT OVERLAY
   =================================== */

.hero__content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
    --parallax-offset: 0px;
    transform: translate3d(0, calc(15vh + var(--parallax-offset)), 0);
    will-change: transform, opacity;
}

.hero__title {
    font-family: 'England', cursive;
    font-size: clamp(3rem, 15vw, 12rem);
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6),
                 0 4px 40px rgba(106, 169, 255, 0.3);
    white-space: nowrap;
    user-select: none;
}

.hero__subtitle {
    font-family: 'England', cursive;
    font-size: clamp(4rem, 8vw, 6rem);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    margin-top: -40px;
    user-select: none;
}

.hero__cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(106, 169, 255, 0.2);
    text-decoration: none;
}

.hero__cta:hover,
.hero__cta:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4),
                0 0 60px rgba(106, 169, 255, 0.4);
}

.hero__cta:focus {
    outline: 3px solid rgba(106, 169, 255, 0.6);
    outline-offset: 4px;
}

.hero__cta:active {
    transform: translateY(0);
}

/* ===================================
   FALLBACK (No-JS)
   =================================== */

.hero__fallback {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero__fallback h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.hero__fallback p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero__fallback button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, calc(15vh + var(--parallax-offset) + 30px), 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, calc(15vh + var(--parallax-offset)), 0);
    }
}

/* ===================================
   ACCESSIBILITY - REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .hero__content {
        animation: none;
    }
    
    .hero__cta {
        transition: none;
    }
    
    .hero__cta:hover,
    .hero__cta:focus {
        transform: none;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .hero {
        min-height: 500px;
    }
    
    .hero__content {
        padding: 1.5rem;
    }
    
    .hero__cta {
        padding: 0.875rem 2rem;
    }
}


/* ===================================
   HIGH RESOLUTION DISPLAYS
   =================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero__title,
    .hero__subtitle {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===================================
   INVITATION SECTION
   =================================== */

.invitation {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg, #2d2560 0%, #1a1540 40%, #0f0a25 70%, #050510 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.invitation__container {
    max-width: 900px;
    width: 100%;
    background: transparent;
    padding: 3rem;
    position: relative;
}

.invitation__content {
    text-align: center;
    color: #ffffff;
    position: relative;
}

.invitation__heading {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(2.8rem, 8vw, 4.5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.05em;
    position: relative;
    text-shadow: 0 0 30px rgba(140, 80, 200, 0.5);
}

.invitation__heading::after {
    content: '';
    display: block;
    width: 90%;
    max-width: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(140, 80, 200, 0.6), transparent);
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(140, 80, 200, 0.5);
}

.invitation__guest-label {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 4rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 0.03em;
}

.invitation__details-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 768px) {
    .invitation__details-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.invitation__details-block {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Efekt świetlny dla ceremonii (fiolet) */
.invitation__details-block:nth-child(1)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(140, 80, 200, 0.15) 0%, transparent 70%);
    filter: blur(30px);
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulseGlow 4s ease-in-out infinite;
}

/* Efekt świetlny dla wesela (niebieski) */
.invitation__details-block:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 140, 220, 0.15) 0%, transparent 70%);
    filter: blur(30px);
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulseGlow 4s ease-in-out infinite 2s;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.invitation__details-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.invitation__icon {
    font-size: 2.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.invitation__subheading {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 400;
    color: rgba(140, 80, 200, 1);
    text-shadow: 0 0 20px rgba(140, 80, 200, 0.6);
}

.invitation__details-block:nth-child(2) .invitation__subheading {
    color: rgba(0, 140, 220, 1);
    text-shadow: 0 0 20px rgba(0, 140, 220, 0.6);
}

.invitation__details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.invitation__date {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.4rem, 3vw, 1.7rem);
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 400;
}

.invitation__time {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.invitation__location {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    line-height: 1.5;
}

.invitation__text {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

.invitation__location--reception {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: normal;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Style dla linków w sekcji invitation */
.invitation__location a {
    color: rgba(180, 148, 255, 0.95);
    text-decoration: none;
    border-bottom: 1px solid rgba(180, 148, 255, 0.3);
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(180, 148, 255, 0.2);
    padding-bottom: 2px;
}

.invitation__location a:hover {
    color: rgba(106, 169, 255, 1);
    border-bottom-color: rgba(106, 169, 255, 0.6);
    text-shadow: 0 0 15px rgba(106, 169, 255, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .invitation {
        padding: 3rem 1.5rem;
    }
    .invitation__container {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .invitation {
        padding: 2rem 1rem;
    }
    .invitation__container {
        padding: 2rem 1rem;
    }
    .invitation__details-block {
        padding: 1.5rem;
    }
    .invitation__heading {
        font-size: 2rem;
    }
    .invitation__guest-label {
        font-size: 1.5rem;
    }
}

/* ===================================
   INFORMATION SECTION
   =================================== */

.info {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg, #050510 0%, #0a0e1a 50%, #050510 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.info__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* GPU acceleration optimizations */
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.info__container {
    max-width: 1000px;
    width: 100%;
    background: transparent;
    padding: 3rem;
    position: relative;
    z-index: 2;
}

.info__content {
    text-align: center;
    color: #ffffff;
    position: relative;
}

.info__heading {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 400;
    margin-bottom: 4rem;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.05em;
    position: relative;
    text-shadow: 0 0 30px rgba(106, 169, 255, 0.4);
}

.info__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .info__grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 3rem;
        justify-items: center;
    }
    
    /* Gdy jest tylko jeden element w rzędzie, wycentruj go */
    .info__block:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: 500px;
        width: 100%;
    }
}

.info__block {
    background: transparent;
    padding: 2.5rem 2rem;
    position: relative;
    text-align: center;
}

/* Efekty świetlne dla bloków */
.info__block::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(106, 169, 255, 0.08) 0%, transparent 70%);
    filter: blur(40px);
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulseInfoGlow 5s ease-in-out infinite;
}

.info__block:nth-child(2n)::before {
    background: radial-gradient(ellipse at center, rgba(140, 80, 200, 0.08) 0%, transparent 70%);
    animation-delay: 2.5s;
}

@keyframes pulseInfoGlow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

.info__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.info__subheading {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.03em;
}

.info__text {
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.info__contact {
    margin-top: 1.5rem;
    font-family: 'Poiret One', Georgia, 'Times New Roman', serif;
}

.info__contact p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.85);
}

.info__contact a {
    color: rgba(106, 169, 255, 1);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(106, 169, 255, 0.3);
}

.info__contact a:hover {
    color: rgba(140, 80, 200, 1);
    text-shadow: 0 0 15px rgba(140, 80, 200, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .info {
        padding: 3rem 1.5rem;
    }
    .info__container {
        padding: 2rem 1.5rem;
    }
    .info__grid {
        gap: 2.5rem;
    }
}

@media (max-width: 480px) {
    .info {
        padding: 2rem 1rem;
    }
    .info__container {
        padding: 2rem 1rem;
    }
    .info__block {
        padding: 2rem 1.5rem;
    }
    .info__heading {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
}