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

/* No native smooth scroll; we control slides */

body {
    font-family: 'Oxygen', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    /* Hide native scrollbars entirely */
    overflow: hidden;
    cursor: default;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fixed viewport stack; JS drives transitions */
.scroll-container {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 100;
}

.progress-bar {
    height: 100%;
    width: 12.5%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.12) 35%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0.12) 65%,
        rgba(255, 255, 255, 0) 100%
    );
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    /* Feather left & right edges so gradient blends smoothly */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #ffffff 10%, #ffffff 90%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #ffffff 10%, #ffffff 90%, transparent 100%);
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: radial-gradient(ellipse at center,
                 rgba(255, 255, 255, 0.45) 0%,
                 rgba(255, 255, 255, 0.0) 70%);
    filter: blur(8px);
    opacity: 0.4;
    pointer-events: none;
}

.card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.card[data-card="1"],
.card.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.card.prev,
.card.next {
    opacity: 0;
    z-index: 1;
}

.card-content {
    max-width: min(650px, 90vw);
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 85vh;
    overflow-y: auto;
}

/* Imagery */
.hero-photo {
    width: clamp(180px, 32vw, 280px);
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto 1.25rem;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    outline: 1px solid rgba(255, 255, 255, 0.08);
    outline-offset: -1px;
}

.media-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 1.25rem;
}

@media (min-width: 700px) {
    .media-grid {
        gap: 18px;
    }
}

.image-card {
    border-radius: 12px;
    overflow: hidden;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    width: fit-content;
    max-width: 500px;
    max-height: 50vh;
}

.image-card img {
    width: auto;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.wide-media {
    margin: 1.25rem auto 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    width: fit-content;
    max-width: 100%;
    max-height: 35vh;
}

.wide-media img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 12px;
}

/* keyframes no longer used; using transitions */

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.7;
    font-weight: 300;
    color: #b0b0b0;
    letter-spacing: 0.01em;
}

.contact-links {
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.contact-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #ffffff;
    transition: width 0.2s ease;
}

.contact-links a:hover {
    color: #ffffff;
}

.contact-links a:hover::after {
    width: 100%;
}

.nav-dots {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;

    /* Design tokens for dot rail */
    --dot-size: 11px;              /* base diameter of each dot */
    --rail-gap: calc(var(--dot-size) * 1.8);
    --ring-min: 2px;              /* min ring thickness */
    --ring-max: calc(var(--dot-size) * 0.9); /* max ring thickness */
    --ring-range: calc(var(--ring-max) - var(--ring-min));
    --scale-min: 1;               /* min active scale */
    --scale-max: 1.25;            /* max active scale */
    --scale-range: calc(var(--scale-max) - var(--scale-min));
    --glow-min: 0px;              /* min glow radius */
    --glow-max: calc(var(--dot-size) * 1.2);
    --glow-range: calc(var(--glow-max) - var(--glow-min));

    gap: var(--rail-gap);
}

.nav-dot {
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.nav-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.nav-dot.active {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

/* Integrated progress around active nav dot */
.nav-dot { --p: 0; }

.nav-dot.active::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(calc(var(--scale-min) + var(--scale-range) * var(--p)));
    box-shadow:
        0 0 0 calc(var(--ring-min) + var(--ring-range) * var(--p)) rgba(255,255,255,0.16),
        0 0 calc(var(--glow-min) + var(--glow-range) * var(--p)) rgba(255,255,255, 0.12);
    pointer-events: none;
}

/* Tablet Optimizations (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .card {
        padding: 32px 24px;
    }

    .card-content {
        max-width: min(600px, 85vw);
    }

    .nav-dots {
        right: 24px;
        --dot-size: 10px;
    }

    .hero-photo {
        width: clamp(200px, 28vw, 260px);
    }

    h1 {
        font-size: clamp(2.25rem, 4.5vw, 2.75rem);
    }

    h2 {
        font-size: clamp(1.65rem, 3.5vw, 1.9rem);
    }
}

/* Mobile Optimizations (max 767px) */
@media (max-width: 767px) {
    .card {
        padding: 24px 16px 80px 16px; /* Extra bottom padding for nav dots */
        height: 100dvh; /* Use dynamic viewport height for mobile browsers */
    }

    .card-content {
        max-height: calc(100vh - 104px); /* 100vh - top padding - bottom padding */
        overflow-y: auto;
        /* Enable momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 0 8px;
        justify-content: flex-start; /* Align to top instead of center */
        padding-top: 12px; /* Small top offset for breathing room */
    }

    .nav-dots {
        /* Move to bottom center on mobile */
        right: auto;
        left: 50%;
        top: auto;
        bottom: 24px;
        transform: translateX(-50%);
        flex-direction: row; /* Horizontal layout */
        --dot-size: 10px; /* Larger for better touch targets */
        gap: calc(var(--dot-size) * 2.5); /* More spacing for easier tapping */
    }

    /* Ensure touch targets are at least 44x44px */
    .nav-dot::before {
        width: 44px;
        height: 44px;
    }

    .contact-links {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .contact-links a {
        font-size: 1.125rem;
        padding: 0.75rem 0;
        min-height: 44px; /* Better touch target */
        display: flex;
        align-items: center;
    }

    .hero-photo {
        width: clamp(160px, 50vw, 220px);
        margin-bottom: 1rem;
        max-height: 25vh;
    }

    .wide-media img {
        max-height: 20vh;
    }

    .image-card img {
        max-height: 22vh;
    }

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

    h2 {
        font-size: clamp(1.35rem, 6vw, 1.75rem);
        margin-bottom: 1rem;
    }

    p {
        font-size: clamp(1rem, 4vw, 1.125rem);
        line-height: 1.6;
    }

    .progress-indicator {
        height: 4px; /* Slightly thicker on mobile for visibility */
    }
}

/* Extra small mobile devices */
@media (max-width: 400px) {
    .card {
        padding: 20px 12px 80px 12px; /* Keep bottom padding for nav dots */
    }

    .card-content {
        padding: 0 4px;
    }

    .nav-dots {
        bottom: 20px; /* Slightly less bottom spacing on smaller screens */
        gap: calc(var(--dot-size) * 2); /* Slightly tighter spacing */
    }

    .contact-links {
        gap: 0.75rem;
    }
}

/* Smooth scrolling hint */
@keyframes scrollHint {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.7;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .card,
    .card-content,
    .progress-bar {
        transition: none !important;
    }
}

.scroll-hint {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.875rem;
    animation: scrollHint 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 50;
}
/* Large Desktop Optimizations (1440px+) */
@media (min-width: 1440px) {
    .card-content {
        max-width: 750px;
    }

    .card {
        padding: 50px;
    }

    .nav-dots {
        right: 50px;
        --dot-size: 12px;
    }

    h1 {
        font-size: 3.25rem;
        margin-bottom: 2.5rem;
    }

    h2 {
        font-size: 2.25rem;
        margin-bottom: 1.75rem;
    }

    p {
        font-size: 1.2rem;
        line-height: 1.75;
    }

    .contact-links {
        gap: 2.5rem;
    }

    .contact-links a {
        font-size: 1.125rem;
    }
}

/* Ultra-wide Desktop (1920px+) */
@media (min-width: 1920px) {
    .card-content {
        max-width: 850px;
    }

    .card {
        padding: 60px;
    }

    .nav-dots {
        right: 60px;
    }
}

/* Short screens - reduce vertical spacing */
@media (max-height: 700px) and (min-width: 768px) {
    .card {
        padding: 24px 40px;
    }

    h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    h2 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-photo {
        width: clamp(150px, 25vw, 220px);
        margin-bottom: 0.75rem;
    }

    .wide-media img {
        max-height: 25vh;
    }

    .image-card img {
        max-height: 30vh;
    }
}

/* Very short mobile screens */
@media (max-height: 600px) and (max-width: 767px) {
    .card {
        padding: 16px 16px 70px 16px;
    }

    .card-content {
        max-height: calc(100vh - 86px);
        justify-content: flex-start;
        padding-top: 8px;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .hero-photo {
        width: clamp(120px, 35vw, 180px);
        margin-bottom: 0.5rem;
        max-height: 18vh;
    }

    .wide-media img {
        max-height: 18vh !important;
    }

    .image-card img {
        max-height: 18vh !important;
    }

    .nav-dots {
        bottom: 16px;
        --dot-size: 8px;
    }
}

/* Landscape mobile phones */
@media (max-width: 926px) and (max-height: 500px) and (orientation: landscape) {
    .card {
        padding: 12px 24px 60px 24px;
    }

    .card-content {
        max-height: calc(100vh - 72px); /* 100vh - top and bottom padding */
        padding: 0 12px;
        justify-content: flex-start;
        padding-top: 8px;
    }

    .hero-photo {
        width: clamp(100px, 20vh, 140px) !important;
        margin-bottom: 0.5rem !important;
    }

    .wide-media {
        margin-top: 0.75rem;
    }

    .wide-media img {
        max-height: 25vh !important;
    }

    .image-card img {
        max-height: 25vh !important;
    }

    h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.5rem;
    }

    .contact-links {
        margin-top: 1rem !important;
        gap: 0.75rem !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }

    .contact-links a {
        font-size: 0.95rem !important;
        padding: 0.5rem 0 !important;
        min-height: 36px !important;
    }

    .nav-dots {
        bottom: 12px;
        --dot-size: 8px;
        gap: calc(var(--dot-size) * 2);
    }

    .progress-indicator {
        height: 3px;
    }
}

/* Landscape tablets in mobile range */
@media (min-width: 568px) and (max-width: 926px) and (max-height: 500px) and (orientation: landscape) {
    .hero-photo {
        width: clamp(120px, 22vh, 160px) !important;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.4rem !important;
    }

    p {
        font-size: 1rem !important;
    }
}
/* end integrated progress */

/* Email reveal guard */
.email-guard[hidden] { display: none; }
.email-guard {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    display: grid;
    place-items: center;
    z-index: 200;
}
.email-guard__dialog {
    width: min(92vw, 420px);
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    padding: 16px;
    color: #e0e0e0;
    position: relative;
}
.email-guard__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #9a9a9a;
    font-size: 18px;
    cursor: pointer;
}
.email-guard__prompt { margin-top: 8px; color: #c8c8c8; }
.email-guard__form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
#eg-answer {
    flex: 1;
    background: #121212;
    border: 1px solid rgba(255,255,255,0.12);
    color: #e0e0e0;
    border-radius: 8px;
    padding: 8px 10px;
}
#eg-answer.eg-error {
    border-color: #e57373;
    box-shadow: 0 0 0 2px rgba(229, 115, 115, 0.15);
}
#eg-submit {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.16);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
}
#eg-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.email-guard__hold { margin-top: 12px; text-align: left; }
.hold-btn {
    width: 100%;
    position: relative;
    background: #121212;
    border: 1px solid rgba(255,255,255,0.16);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
}
.hold-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, rgba(255,255,255,0.14), rgba(255,255,255,0.35));
    opacity: 0.6;
    transition: width 0.05s linear;
    pointer-events: none;
}
.email-guard__hold .hint {
    margin-top: 6px;
    color: #9a9a9a;
    font-size: 0.9rem;
}

.email-guard__result {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
#eg-result .email-text {
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 0.01em;
}
#eg-copy {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.16);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}
#eg-copy:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.copied { color: #9ae6b4; font-size: 0.9rem; }

.email-guard__dialog.revealed {
    width: min(92vw, 360px);
    padding: 28px 20px;
    text-align: center;
}
.email-guard__dialog.revealed > .email-guard__close,
.email-guard__dialog.revealed > h3,
.email-guard__dialog.revealed > .email-guard__prompt,
.email-guard__dialog.revealed > .email-guard__form,
.email-guard__dialog.revealed > .email-guard__hold {
    display: none;
}
.email-guard__dialog.revealed .email-guard__result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.email-guard__dialog.revealed .email-text {
    font-size: 1.1rem;
    word-break: break-word;
}
.email-guard__dialog.revealed #eg-copy {
    width: 100%;
}

/* Responsive adjustments for email guard on large screens */
@media (min-width: 1024px) {
    .email-guard__dialog {
        width: min(92vw, 480px);
        padding: 20px;
    }

    #eg-answer {
        padding: 10px 12px;
    }

    #eg-submit {
        padding: 10px 16px;
    }

    .email-guard__dialog.revealed {
        width: min(92vw, 420px);
        padding: 32px 24px;
    }
}
