/* AI Portrait Generator — SEO Doorway Styles
   Brand: AI Fantasy (aifantasy.site)
   Color palette: cyan/teal utility-flavored
   Unique CSS per doorway per SEO_Strategy_FantasyXXX.md §5 (prevents cookie-cutter flag)
*/

:root {
    --primary: #0891b2;          /* cyan */
    --primary-dark: #0e7490;
    --secondary: #cffafe;        /* light cyan */
    --accent: #164e63;           /* deep teal */
    --bg-body: #f0fbfd;          /* page background */
    --bg-card: #ffffff;
    --bg-elevated: #ecfeff;
    --bg-section: #ffffff;
    --text-primary: #0a1f2e;     /* body text */
    --text-secondary: #164e63;
    --text-muted: #5b7a8c;
    --border: #cffafe;
    --border-strong: #a5e9f3;
    --gradient-primary: linear-gradient(135deg, #0891b2 0%, #164e63 100%);
    --shadow-sm: 0 2px 8px rgba(8, 145, 178, 0.08);
    --shadow-md: 0 8px 24px rgba(8, 145, 178, 0.12);
    --shadow-glow: 0 0 30px rgba(8, 145, 178, 0.20);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Header ---- */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.5px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.logo-text span {
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav a:hover,
.nav a.nav-active {
    color: var(--primary);
}

.nav a.nav-active {
    font-weight: 600;
}

.menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-btn svg {
    width: 22px;
    height: 22px;
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(180deg, var(--secondary) 0%, var(--bg-body) 100%);
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.hero-inner {
    max-width: 920px;
    margin: 0 auto;
}

.hero-eyebrow {
    display: inline-block;
    background: var(--bg-card);
    color: var(--accent);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-strong);
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero h1 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 1.75rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: #ffffff;
    padding: 0.95rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

/* ---- Main container ---- */
.main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Filter / category bar ---- */
.filters {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.filter-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
}

/* ---- Models grid ---- */
.models-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

@media (max-width: 1100px) {
    .models-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
    .models-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .models-grid { grid-template-columns: 1fr; }
}

.model-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.model-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.model-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--bg-elevated);
}

.model-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.model-card:hover .model-image {
    transform: scale(1.04);
}

.model-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--accent);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.model-info {
    padding: 1.1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.model-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.model-tag {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.model-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-cta {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ---- SEO Content Section ---- */
.seo-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.seo-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.seo-section h3 {
    font-size: 1.15rem;
    margin: 1.25rem 0 0.75rem;
    color: var(--text-primary);
}

.seo-section p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.9rem;
}

.seo-section ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1rem;
}

.seo-section li {
    color: var(--text-secondary);
    padding: 0.45rem 0 0.45rem 1.5rem;
    position: relative;
    line-height: 1.6;
}

.seo-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.seo-section a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.seo-section a:hover {
    border-bottom-color: var(--primary);
}

/* ---- Bio detail page ---- */
.model-detail {
    padding-top: 2rem;
}

.breadcrumbs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .sep {
    color: var(--text-muted);
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

.model-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 820px) {
    .model-hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.25rem;
    }
}

.model-hero-img-wrap {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
}

.model-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.model-detail-name {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.model-detail-tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.model-attributes {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.attribute {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.attribute-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.1rem;
}

.attribute-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.model-bio {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 1.75rem;
}

.model-bio p {
    margin-bottom: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    padding: 0.95rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.02rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.95rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ---- Footer ---- */
.footer {
    background: var(--accent);
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: 0.85rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    padding: 0.3rem 0;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--secondary);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0.35rem 0;
}

/* ---- Mobile menu / nav ---- */
@media (max-width: 820px) {
    .header-content { padding: 0.85rem 1rem; }
    .menu-btn { display: flex; }
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        flex-basis: 100%;
        gap: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }
    .nav.nav-open { display: flex; }
    .nav a {
        padding: 0.75rem 0;
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    .nav a:last-child { border-bottom: none; }
}

/* ---- Print ---- */
@media print {
    .header, .footer, .hero-cta { display: none; }
}

/* ---- A11y ---- */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: #ffffff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 200;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}