@font-face {
    font-family: 'GT Super Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/public/fonts/GT-Super-Display-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/public/fonts/CormorantGaramond-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/public/fonts/Inter_24pt-Medium.ttf') format('truetype');
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(120deg, #FAFAFA, #FFFFFF 45%, #F8F8F8);
    color: #2C3E50;
    overflow-x: hidden;
    position: relative;
    --motif-size: 48px;
    --halo-x: 50%;
    --halo-y: 50%;
    --halo-r: 220px;
    --gold: #D4AF37;
    --motif-opacity: 0.01;
    --halo-opacity: 0.06;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url('public/images/motif.svg');
    background-size: var(--motif-size) var(--motif-size);
    background-repeat: repeat;
    background-position: center;
    opacity: var(--motif-opacity);
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at var(--halo-x) var(--halo-y), rgba(212, 175, 55, 0.65) 0, rgba(212, 175, 55, 0) var(--halo-r)),
        radial-gradient(circle at calc(var(--halo-x) + 60px) calc(var(--halo-y) - 30px), rgba(212, 175, 55, 0.25) 0, rgba(212, 175, 55, 0) calc(var(--halo-r) * 0.75)),
        radial-gradient(circle at calc(var(--halo-x) - 55px) calc(var(--halo-y) + 45px), rgba(212, 175, 55, 0.22) 0, rgba(212, 175, 55, 0) calc(var(--halo-r) * 0.70)),
        radial-gradient(circle at calc(var(--halo-x) + 35px) calc(var(--halo-y) + 70px), rgba(212, 175, 55, 0.18) 0, rgba(212, 175, 55, 0) calc(var(--halo-r) * 0.60)),
        radial-gradient(circle at calc(var(--halo-x) - 80px) calc(var(--halo-y) - 65px), rgba(212, 175, 55, 0.16) 0, rgba(212, 175, 55, 0) calc(var(--halo-r) * 0.55));
    mask-image: url('public/images/motif.svg');
    mask-mode: alpha;
    mask-mode: alpha;
    mask-mode: alpha;
    mask-size: var(--motif-size) var(--motif-size);
    mask-repeat: repeat;
    mask-position: center;
    -webkit-mask-image: url('public/images/motif.svg');
    -webkit-mask-size: var(--motif-size) var(--motif-size);
    -webkit-mask-repeat: repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: var(--motif-size) var(--motif-size);
    -webkit-mask-repeat: repeat;
    -webkit-mask-position: center;
    z-index: 1;
    opacity: var(--halo-opacity);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E0E0E0;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #2C3E50;
}

nav {
    display: flex;
    gap: 3rem;
}

nav a {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2C3E50;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: opacity 0.3s ease;
}

nav a:hover {
    opacity: 0.6;
}

/* Main Content */
main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem 0;
    position: relative;
    transition: transform 3s cubic-bezier(0.4, 0, 0.2, 1);
}

main.slide-up {
    transform: translateY(-10vh);
}

.hero {
    position: relative;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInSmooth 2s ease-out forwards;
    z-index: 2;
}

.hero::before {
    content: "";
    position: absolute;
    top: -10rem;
    left: -10rem;
    right: -10rem;
    bottom: -10rem;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 40%, rgba(255, 255, 255, 0.4) 70%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 600;
    line-height: 1;
    color: #2C3E50;
    margin-bottom: 2rem;
}

.novier {
    display: block;
    letter-spacing: 0.02em;
    margin-bottom: -0.1em;
}

.aurex {
    display: block;
    letter-spacing: -0.05em;
}

/* Manual Kerning Adjustments */

/* N-O */
.novier .letter:nth-child(1) {
    margin-right: -0.05em;
}

/* O-V */
.novier .letter:nth-child(2) {
    margin-right: -0.05em;
}

/* V-I */
.novier .letter:nth-child(3) {
    margin-right: 0em;
}

/* I-E */
.novier .letter:nth-child(4) {
    margin-right: 0.1em;
}

/* E-R */
.novier .letter:nth-child(5) {
    margin-right: 0.08em;
}

/* A-U */
.aurex .letter:nth-child(1) {
    margin-right: -0.02em;
}

/* U-R */
.aurex .letter:nth-child(2) {
    margin-right: 0.01em;
}

/* R-E */
.aurex .letter:nth-child(3) {
    margin-right: 0.08em;
}

/* E-X */
.aurex .letter:nth-child(4) {
    margin-right: 0.01em;
}

/* Letter Animation */
.letter {
    display: inline-block;
    cursor: pointer;
    transition: all 0.5s ease-in-out;
    background:
        linear-gradient(180deg, #2C3E50, #2C3E50),
        repeating-linear-gradient(12deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.letter:hover {
    background:
        linear-gradient(180deg, #000000, #000000),
        repeating-linear-gradient(12deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Brushed-silver (anisotropic) effect - applied to container for inheritance */
.wordmark.texture {
    /* Container styling to ensure proper text rendering */
    -webkit-font-smoothing: antialiased;
}

/* Fallback: remove texture on small screens */
@media (max-width: 768px) {
    .wordmark.texture {
        color: #2C3E50;
        -webkit-text-fill-color: #2C3E50;
        background: none;
    }
}

.tagline {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #5A6C7D;
    margin-bottom: 3rem;
    letter-spacing: 0.01em;
}

.cta-button {
    position: relative;
    background: #f5e5d1;
    color: #2C3E50;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    overflow: visible;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    z-index: 0;
}

/* Paper texture effect */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.02) 2px,
            rgba(0, 0, 0, 0.02) 4px);
    pointer-events: none;
}

.cta-button span {
    position: relative;
    z-index: 2;
}

/* Envelope fold effect - top flap */
.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, #f9f0e0 0%, #f5e5d1 100%);
    transform-origin: top center;
    transform: perspective(400px) rotateX(0deg);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    z-index: 1;
    border-radius: 4px 4px 0 0;
}

.cta-button:hover {
    background: #E8D4B8;
    transform: translateY(-2px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* Letter opened state */
.cta-button.letter-opened {
    background: linear-gradient(180deg, #f0ddc4 0%, #f5e5d1 100%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0 -2px 4px rgba(0, 0, 0, 0.06);
}

.cta-button.letter-opened::after {
    transform: perspective(400px) rotateX(-160deg);
    background: linear-gradient(to bottom, #faf5ed 0%, #f5e5d1 100%);
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.15);
}

/* Subtle animation for opened state */
.cta-button.letter-opened::before {
    animation: paperShimmer 3s ease-in-out infinite;
}

@keyframes paperShimmer {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Section Reveal */
.reveal {
    max-width: 960px;
    width: calc(100% - 4rem);
    margin: 3rem auto;
    padding: 0 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1000ms ease, visibility 1000ms ease;
    position: relative;
    z-index: 2;
}

.reveal.open {
    visibility: visible;
    opacity: 1;
}

.reveal::before {
    content: "";
    position: absolute;
    top: -6rem;
    left: -6rem;
    right: -6rem;
    bottom: -6rem;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 40%, rgba(255, 255, 255, 0.4) 70%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
}

.reveal-hairline {
    height: 1px;
    background: linear-gradient(90deg, rgba(44, 62, 80, 0), rgba(44, 62, 80, 0.6), rgba(44, 62, 80, 0));
}

.reveal-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 1000ms cubic-bezier(0.4, 0, 0.2, 1),
        opacity 1000ms ease;
}

.reveal.open .reveal-content {
    max-height: 800px;
    opacity: 1;
}

.reveal h2 {
    font-family: 'GT Super Display', serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: #2C3E50;
    letter-spacing: 0.02em;
    margin: 1.25rem 0 0.75rem;
}

.reveal p {
    color: #5A6C7D;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: reduce) {

    .reveal-hairline,
    .reveal-content {
        transition: none;
    }

    .reveal-content {
        max-height: none;
        opacity: 1;
        transform: none;
    }

    body::after {
        background: none;
    }
}

/* Hero Animation on page load */
@keyframes fadeInSmooth {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 2rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    nav {
        gap: 2rem;
    }

    nav a {
        font-size: 0.875rem;
    }

    h1 {
        font-size: clamp(2.5rem, 12vw, 5rem);
        margin-bottom: 1.5rem;
    }

    .tagline {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .tagline br {
        display: none;
    }

    body {
        --halo-r: 180px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.25rem 1.5rem;
    }

    nav {
        gap: 1.5rem;
    }

    nav a {
        font-size: 0.8rem;
    }

    h1 {
        font-size: 3rem;
    }

    body {
        --halo-r: 160px;
    }
}

/* Vision Section */
.vision-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.vision-container.vision-active {
    display: block;
}

.vision-container.vision-visible {
    opacity: 1;
}

.vision-timeline {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.vision-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1s ease;
}

.vision-panel.active {
    opacity: 1;
    z-index: 2;
}

.vision-image {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: sepia(0.2) contrast(1.1) brightness(0.9);
    opacity: 0.7;
    animation: kenBurns 20s ease-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.05) translate(-1%, -1%);
    }
}

.vision-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
    pointer-events: none;
}

.vision-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    opacity: 0;
    animation: fadeInUp 1.5s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vision-year {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.vision-divider {
    font-size: 1.5rem;
    opacity: 0.4;
}

.vision-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

/* Future Panel */
.vision-future {
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vision-future .vision-content {
    flex-direction: column;
    gap: 3rem;
}

.vision-void {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
}

.vision-question {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
}

.vision-nvx {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    background: linear-gradient(180deg, var(--gold) 0%, #8B7355 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Progress Bar */
.vision-progress {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: rgba(212, 175, 55, 0.15);
    z-index: 100;
    border-radius: 1px;
}

.vision-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--gold) 0%, rgba(212, 175, 55, 0.8) 100%);
    width: 0;
    transition: width 0.3s ease;
    border-radius: 1px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Close Button */
.vision-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10000;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vision-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: rotate(90deg);
}

/* Play/Pause Controls */
.vision-controls {
    position: fixed;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
    display: flex;
    gap: 1rem;
}

.vision-play-pause {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2rem;
}

.vision-play-pause:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vision-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vision-year {
        font-size: 1.2rem;
    }
    
    .vision-title {
        font-size: 1.8rem;
        letter-spacing: 0.2em;
    }
    
    .vision-nvx {
        font-size: 3rem;
        letter-spacing: 0.3em;
    }
    
    .vision-question {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vision-image {
        animation: none;
    }
    
    .vision-content {
        animation: none;
        opacity: 1;
    }
}

::selection {
    background-color: rgba(44, 62, 80, 0.1);
    color: #2C3E50;
}

::-moz-selection {
    background-color: rgba(44, 62, 80, 0.1);
    color: #2C3E50;
}