/* ══════════════════════════════════════════════════════════════
   EMIT Yachts — Model Pages Stylesheet
   Shared styles for /models/e35/ and /models/e42/
   Uses CSS custom properties from style.css
   ══════════════════════════════════════════════════════════════ */

/* ── Model Hero ─────────────────────────────────────────────── */
.model-hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.model-hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.model-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(22, 24, 29, 0.3) 0%, var(--color-obsidian) 100%);
    z-index: 1;
}

.model-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 5%;
}

.model-hero-title {
    font-family: 'Protrakt-Semi-Bold-Exp-One', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-pearl);
    margin-bottom: 0.5rem;
}

.model-hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(1rem, 3vw, 1.4rem);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--color-pearl);
    opacity: 0.8;
    margin-bottom: var(--space-lg);
}

.model-hero-ctas {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.model-hero-ctas .btn {
    font-family: var(--font-body);
    letter-spacing: 0.2em;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.model-breadcrumb {
    padding: calc(100px + var(--safe-area-top, 0px)) 5% 20px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
}

.model-breadcrumb a {
    color: var(--color-pearl);
    text-decoration: none;
    transition: var(--transition-base);
}

.model-breadcrumb a:hover {
    opacity: 1;
    color: var(--color-accent-pearl);
}

.model-breadcrumb span {
    color: var(--color-accent-pearl);
    opacity: 0.8;
}

.model-breadcrumb .breadcrumb-sep {
    margin: 0 8px;
    opacity: 0.3;
}

/* ── Section Base ──────────────────────────────────────────── */
.model-section {
    padding: var(--section-padding) 5%;
    position: relative;
    scroll-margin-top: 80px;
}

.model-section-title {
    font-family: 'Protrakt-Semi-Bold-Exp-One', sans-serif;
    font-size: var(--h2-size);
    color: var(--color-pearl);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-align: center;
    margin-bottom: 3rem;
}

/* ── Gallery Grid ────────────────────────────────────────────── */
.model-gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.model-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-standard);
    cursor: pointer;
    aspect-ratio: 16 / 10;
    background: #000;
}

.model-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.model-gallery-item:hover img {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .model-gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Lightbox ───────────────────────────────────────────────── */
.model-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.model-lightbox.active {
    display: flex;
}

.model-lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: var(--color-pearl);
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-lightbox-close:hover {
    opacity: 1;
}

.model-lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-luxury);
}

/* ── Specs Table ────────────────────────────────────────────── */
.model-specs-table {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    border-collapse: collapse;
}

.model-specs-table tbody {
    display: block;
}

.spec-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid rgba(242, 240, 239, 0.06);
    cursor: pointer;
    transition: background 0.2s ease;
}

.spec-row:hover {
    background: rgba(242, 240, 239, 0.02);
}

.spec-key {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-pearl);
    opacity: 0.6;
    flex: 0 0 45%;
    letter-spacing: 0.05em;
}

.spec-value {
    font-family: 'Protrakt-Semi-Bold-Exp-One', sans-serif;
    font-size: 1rem;
    color: var(--color-accent-pearl);
    flex: 0 0 55%;
    letter-spacing: 0.03em;
}

.spec-detail {
    flex: 0 0 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    padding: 0 0 0 45%;
}

.spec-row.expanded .spec-detail {
    max-height: 80px;
    opacity: 0.7;
    padding-top: 10px;
    padding-bottom: 0;
}

.spec-detail-text {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-pearl);
    line-height: 1.5;
}

/* ── Color Swatches ─────────────────────────────────────────── */
.model-colors-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 10px;
}

.model-colors-scroll::-webkit-scrollbar {
    display: none;
}

.model-colors-row {
    display: flex;
    gap: 32px;
    justify-content: center;
    min-width: min-content;
    padding: 10px 0;
}

.color-swatch-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.color-swatch {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(242, 240, 239, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: rgba(242, 240, 239, 0.4);
}

.color-swatch.selected {
    border-color: var(--color-pearl);
    box-shadow: 0 0 0 3px var(--color-obsidian), 0 0 0 5px var(--color-pearl);
    transform: scale(1.1);
}

.color-swatch-name {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--color-pearl);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.color-swatch-wrapper.selected .color-swatch-name {
    opacity: 1;
    color: var(--color-accent-pearl);
}

.model-colors-cta {
    text-align: center;
    margin-top: 2.5rem;
}

@media (max-width: 768px) {
    .model-colors-row {
        justify-content: flex-start;
    }
}

/* ── Walkthrough Video ──────────────────────────────────────── */
.model-video-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.video-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-large);
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.video-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-thumb-wrapper:hover img {
    transform: scale(1.03);
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-thumb-wrapper:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.video-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--color-pearl);
    transition: all 0.3s ease;
    text-indent: 4px; /* optical center the play triangle */
}

.video-thumb-wrapper:hover .video-play-btn {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

.video-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-large);
    border: none;
}

/* ── Quote + Brochure ───────────────────────────────────────── */
.model-quote-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.model-quote-form {
    flex: 1;
}

.model-brochure {
    flex: 1;
}

.model-brochure-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(242, 240, 239, 0.1);
    border-radius: var(--radius-large);
    padding: clamp(30px, 5vw, 50px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    gap: 1rem;
}

.model-brochure-icon {
    font-size: 3rem;
    opacity: 0.3;
    color: var(--color-pearl);
}

.model-brochure-title {
    font-family: var(--font-brand);
    font-size: 1.2rem;
    color: var(--color-pearl);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.model-brochure-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-pearl);
    opacity: 0.5;
    line-height: 1.6;
    max-width: 300px;
}

.model-quote-cta {
    text-align: center;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .model-quote-grid {
        flex-direction: row;
    }
}

/* ── Model Footer Nav ───────────────────────────────────────── */
.model-footer-nav {
    text-align: center;
    padding: var(--space-lg) 5%;
}

.model-footer-nav a {
    font-family: var(--font-brand);
    font-size: 1.1rem;
    color: var(--color-accent-pearl);
    text-decoration: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.model-footer-nav a:hover {
    opacity: 0.8;
    transform: translateX(4px);
}

/* ── Specs Description ──────────────────────────────────────── */
.model-specs-desc {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-pearl);
    opacity: 0.7;
}

/* ── Brochure Email Signup ──────────────────────────────────── */
.brochure-email-form {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 320px;
}

.brochure-email-form input {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(242, 240, 239, 0.15);
    border-radius: var(--radius-pill);
    color: var(--color-pearl);
    font-family: var(--font-body);
    font-size: 0.8rem;
    padding: 10px 16px;
    outline: none;
    transition: var(--transition-base);
}

.brochure-email-form input:focus {
    border-color: var(--color-accent-pearl);
}

.brochure-email-form button {
    background: var(--color-accent-pearl);
    color: var(--color-obsidian);
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 18px;
    cursor: pointer;
    font-family: var(--font-brand);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: var(--transition-base);
    white-space: nowrap;
}

.brochure-email-form button:hover {
    background: var(--color-pearl);
}
