/* ══════════════════════════════════════════════════════════════
   REPTALICA — Nu-Brutalist × Lone Trail Design System
   ══════════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
    --bg: #1a1a1a;
    --surface: #222222;
    --surface-elevated: #2a2a2a;
    --accent: #c5a059;
    --accent-dim: rgba(197, 160, 89, 0.15);
    --accent-glow: rgba(197, 160, 89, 0.3);
    --text: #e0e0e0;
    --text-dim: #888888;
    --border: rgba(197, 160, 89, 0.25);
    --border-strong: rgba(197, 160, 89, 0.5);

    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease-snap: cubic-bezier(0.2, 0, 0, 1);
    --speed-fast: 0.15s;
    --speed-med: 0.25s;

    --clip-corner: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    --clip-corner-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg);
    overflow-x: hidden;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Noise Overlay ── */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ── Mono Label ── */
.label-mono {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ═════════════════════════════════════════════════════════════
   HERO SECTION
   ═════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Orbital ring decorations */
.orbital-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--border);
    pointer-events: none;
}

.orbital-ring--1 {
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbit-pulse 8s ease-in-out infinite;
}

/* Accelerator Glow Layers */
.orbital-ring::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent);
    opacity: var(--accel, 0);
    will-change: opacity;
    pointer-events: none;
}

/* Thicken inner ring border without layout repaint */
.orbital-ring--1::after {
    inset: -4px;
    border: 3px solid var(--accent);
}

.orbital-ring--2 {
    width: 700px;
    height: 700px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-style: dashed;
    opacity: 0.4;
    animation: orbit-pulse 12s ease-in-out infinite reverse;
}

.orbital-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translate(250px, 0);
    box-shadow: 0 0 12px var(--accent-glow);
    animation: orbit-rotate 8s linear infinite;
}

@keyframes orbit-pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.8;
    }
}

@keyframes orbit-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(250px);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) translateX(250px);
    }
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero__tag {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.3rem 1rem;
    border: 1px solid var(--border);
    clip-path: var(--clip-corner-sm);
    background: var(--accent-dim);
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent);
    line-height: 0.9;
    margin-bottom: 1rem;
    text-shadow: 0 0 60px rgba(197, 160, 89, 0.15);
    position: relative;
}

/* Pre-rendered glowing title for GPU-friendly opacity transition */
.hero__title::after {
    content: 'REPTALICA';
    position: absolute;
    left: 0;
    top: 0;
    color: transparent;
    text-shadow: 0 0 40px var(--accent);
    opacity: var(--accel, 0);
    pointer-events: none;
    will-change: opacity;
}

.hero__subtitle {
    font-size: 1rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.hero__subtitle .label-mono {
    color: var(--accent);
}

/* Navigation links */
.hero__nav {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-dim);
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border);
    clip-path: var(--clip-corner-sm);
    transition: all var(--speed-fast) var(--ease-snap);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

.nav-link__index {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.7;
}

.nav-link:hover {
    color: var(--bg);
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.nav-link:hover .nav-link__index {
    color: var(--bg);
    opacity: 1;
}

.nav-divider {
    color: var(--text-dim);
    opacity: 0.3;
    font-size: 1.2rem;
    font-weight: 300;
}

/* Scroll hint */
.hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes scroll-bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ═════════════════════════════════════════════════════════════
   SECTION COMMON
   ═════════════════════════════════════════════════════════════ */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section__header {
    margin-bottom: 3rem;
    position: relative;
}

.section__tag {
    display: block;
    margin-bottom: 0.5rem;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text);
    line-height: 1;
}

.section__line {
    margin-top: 1rem;
    height: 3px;
    width: 60px;
    background: var(--accent);
}

/* ═════════════════════════════════════════════════════════════
   ABOUT SECTION
   ═════════════════════════════════════════════════════════════ */
.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about__heading {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.contact-item {
    margin-bottom: 1.2rem;
}

.contact-item__label {
    display: block;
    margin-bottom: 0.3rem;
}

.contact-item__value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text);
    letter-spacing: 0.02em;
}

.contact-item__copy {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    clip-path: var(--clip-corner-sm);
    transition: all var(--speed-fast) var(--ease-snap);
}

.contact-item__copy:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.contact-item__copy i {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* About divider */
.about__divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 2rem;
}

.divider-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
}

.divider-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* Social row */
.social-row {
    display: flex;
    gap: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    text-decoration: none;
    clip-path: var(--clip-corner-sm);
    transition: all var(--speed-fast) var(--ease-snap);
    font-size: 1.1rem;
}

.social-btn .label-mono {
    font-size: 0.65rem;
    color: var(--text-dim);
    transition: color var(--speed-fast);
}

.social-btn:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.social-btn:hover .label-mono {
    color: var(--bg);
}

/* ═════════════════════════════════════════════════════════════
   GALLERY SECTION
   ═════════════════════════════════════════════════════════════ */
.gallery__controls {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.control-group .label-mono {
    padding-left: 2px;
}

.select-wrapper,
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.control-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.7rem 2.5rem 0.7rem 1rem;
    clip-path: var(--clip-corner-sm);
    cursor: pointer;
    min-width: 180px;
    transition: all var(--speed-fast) var(--ease-snap);
    outline: none;
    letter-spacing: 0.05em;
}

.control-select:hover,
.control-select:focus {
    border-color: var(--accent);
    background: var(--surface-elevated);
}

.control-select option {
    background: var(--bg);
    color: var(--text);
}

.select-arrow {
    position: absolute;
    right: 12px;
    color: var(--accent);
    font-size: 0.7rem;
    pointer-events: none;
}

.control-input {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.7rem 2.5rem 0.7rem 1rem;
    clip-path: var(--clip-corner-sm);
    min-width: 250px;
    transition: all var(--speed-fast) var(--ease-snap);
    outline: none;
    letter-spacing: 0.05em;
}

.control-input::placeholder {
    color: var(--text-dim);
    opacity: 0.6;
}

.control-input:hover,
.control-input:focus {
    border-color: var(--accent);
    background: var(--surface-elevated);
}

.input-icon {
    position: absolute;
    right: 12px;
    color: var(--text-dim);
    font-size: 0.8rem;
    pointer-events: none;
    transition: color var(--speed-fast);
}

.control-input:focus~.input-icon,
.control-input:focus+.input-icon {
    color: var(--accent);
}

/* ── Gallery Grid ── */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ── Card ── */
.card {
    background: var(--surface);
    border: 2px solid var(--border);
    clip-path: var(--clip-corner);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--speed-fast) var(--ease-snap);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--speed-med) var(--ease-snap);
    z-index: 2;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-glow);
}

.card:hover::before {
    transform: scaleX(1);
}

.card__image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-snap);
}

.card:hover .card__image img {
    transform: scale(1.08);
}

.card__body {
    padding: 1.2rem;
}

.card__brand {
    display: inline-block;
    margin-bottom: 0.4rem;
    color: var(--accent);
    opacity: 0.8;
}

.card__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
    margin-bottom: 0.4rem;
}

.card__desc {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
    font-family: var(--font-mono);
    font-weight: 400;
}

.card.hidden {
    display: none;
}

/* ═════════════════════════════════════════════════════════════
   MODAL
   ═════════════════════════════════════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(8px);
    animation: modal-fade-in 0.2s ease;
}

.modal__content {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border: 2px solid var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    width: 90%;
    max-width: 950px;
    max-height: 90vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    overflow: hidden;
    animation: modal-scale-in 0.25s var(--ease-snap);
    box-shadow: 0 0 40px rgba(197, 160, 89, 0.15), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.85);
    border: 2px solid var(--border-strong);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 10;
    transition: all var(--speed-fast) var(--ease-snap);
    clip-path: var(--clip-corner-sm);
}

.modal__close:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.modal__image-container {
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-right: 2px solid var(--border);
}

#modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal__info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.modal__tag {
    margin-bottom: 0.8rem;
}

.modal__title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}

.modal__desc {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 1rem 0 2rem 0;
}

/* ── Button ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-decoration: none;
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
    cursor: pointer;
    clip-path: var(--clip-corner-sm);
    transition: all var(--speed-fast) var(--ease-snap);
    position: relative;
    overflow: hidden;
}

.btn--primary {
    align-self: flex-start;
}

.btn:hover {
    background: var(--accent);
    color: var(--bg);
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modal-scale-in {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ═════════════════════════════════════════════════════════════
   FOOTER
   ═════════════════════════════════════════════════════════════ */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer__sep {
    color: var(--text-dim);
    opacity: 0.3;
}

.footer__disclaimer {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    opacity: 0.5;
}

/* ═════════════════════════════════════════════════════════════
   TOAST
   ═════════════════════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent);
    color: var(--bg);
    padding: 0.8rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    clip-path: var(--clip-corner-sm);
    z-index: 20000;
    opacity: 0;
    transition: all 0.3s var(--ease-snap);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ═════════════════════════════════════════════════════════════
   ENTRANCE ANIMATIONS
   ═════════════════════════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease-snap), transform 0.5s var(--ease-snap);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═════════════════════════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
    .about__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery__grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }

    .modal__content {
        grid-template-columns: 1fr;
        width: 95%;
        max-height: 85vh;
        overflow-y: auto;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    }

    .modal__close {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
        top: 8px;
        right: 10px;
        background: rgba(26, 26, 26, 0.95);
        border-color: var(--accent);
        color: var(--accent);
    }

    .modal__image-container {
        border-right: none;
        border-bottom: 2px solid var(--border);
        height: 35vh;
        padding: 1rem;
    }

    .modal__info {
        padding: 1.5rem;
    }

    .gallery__controls {
        flex-direction: column;
        gap: 1rem;
    }

    .control-input,
    .control-select {
        min-width: 0;
        width: 100%;
    }

    .hero__nav {
        flex-direction: column;
        gap: 0.8rem;
    }

    .nav-divider {
        display: none;
    }

    .orbital-ring--1 {
        width: 300px;
        height: 300px;
    }

    .orbital-ring--2 {
        width: 450px;
        height: 450px;
    }

    .orbital-dot {
        transform: translate(-50%, -50%) translate(150px, 0);
    }

    @keyframes orbit-rotate {
        0% {
            transform: translate(-50%, -50%) rotate(0deg) translateX(150px);
        }

        100% {
            transform: translate(-50%, -50%) rotate(360deg) translateX(150px);
        }
    }
}

/* Mobile */
@media (max-width: 480px) {
    .section {
        padding: 4rem 1.2rem;
    }

    .hero__title {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .section__title {
        font-size: 1.8rem;
    }

    .gallery__grid {
        grid-template-columns: 1fr;
    }

    .card__image {
        height: 150px;
    }

    .social-row {
        flex-direction: column;
    }

    .social-btn {
        width: 100%;
        justify-content: center;
    }

    .modal__title {
        font-size: 1.4rem;
    }

    .modal__desc {
        font-size: 0.8rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .orbital-ring--1 {
        width: 200px;
        height: 200px;
    }

    .orbital-ring--2 {
        width: 320px;
        height: 320px;
    }

    .orbital-dot {
        transform: translate(-50%, -50%) translate(100px, 0);
    }

    @keyframes orbit-rotate {
        0% {
            transform: translate(-50%, -50%) rotate(0deg) translateX(100px);
        }

        100% {
            transform: translate(-50%, -50%) rotate(360deg) translateX(100px);
        }
    }
}