/* =========================================
   UI FOUNDATIONS CASE STUDY — UNIQUE STYLES
   Inspired by Google Material / Stitch Design System
   ========================================= */

/* =========================================
   1. PHILOSOPHY SECTION — Full-Width Manifesto
   ========================================= */
.uif-philosophy {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--primary-bg) 0%, #080810 50%, var(--primary-bg) 100%);
}

.uif-philosophy::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    pointer-events: none;
}

.uif-philosophy-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.uif-philosophy-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 3rem;
}

.uif-philosophy-label::before,
.uif-philosophy-label::after {
    content: '';
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.uif-philosophy-quote {
    font-family: 'Merriweather', Georgia, serif;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2.5rem 0;
    font-style: italic;
    position: relative;
}

.uif-philosophy-quote::before {
    content: '\201C';
    position: absolute;
    top: -30px;
    left: -20px;
    font-size: 6rem;
    font-family: 'Merriweather', Georgia, serif;
    color: rgba(47, 128, 237, 0.2);
    line-height: 1;
    pointer-events: none;
}

.uif-philosophy-credit {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    letter-spacing: 1px;
}

.uif-philosophy-credit strong {
    color: rgba(255, 255, 255, 0.7);
}

/* --- System Overview Board Showcase (Compact Card with Popup Modal) --- */
.uif-board-section {
    padding: 40px 0 80px 0;
    position: relative;
}

.uif-board-container {
    max-width: 720px;
    margin: 0 auto;
}

.uif-board-preview-card {
    position: relative;
    background: rgba(18, 18, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.uif-board-preview-card:hover {
    border-color: rgba(47, 128, 237, 0.5);
    box-shadow: 0 30px 80px rgba(47, 128, 237, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    transform: translateY(-6px);
}

.uif-img-wrapper {
    position: relative;
    width: 100%;
    height: 340px;
    border-radius: 16px;
    overflow: hidden;
    background: #0d0d12;
}

.uif-board-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
    cursor: pointer;
}

.uif-board-preview-card:hover .uif-board-img {
    transform: scale(1.04);
    filter: brightness(0.85);
}

/* Gradient Overlay & Hover Hint */
.uif-preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(5, 5, 10, 0.85) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 2rem;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.uif-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.6rem;
    background: rgba(47, 128, 237, 0.9);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(47, 128, 237, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.uif-board-preview-card:hover .uif-expand-btn {
    background: #2F80ED;
    transform: scale(1.06);
    box-shadow: 0 14px 40px rgba(47, 128, 237, 0.6);
}

.uif-board-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem 0.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
}

.uif-board-footer .badge-tag {
    background: rgba(47, 128, 237, 0.12);
    color: #2F80ED;
    border: 1px solid rgba(47, 128, 237, 0.25);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* =========================================
   2. COLOR PALETTE SHOWCASE
   ========================================= */
.uif-color-section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.uif-color-section .container {
    max-width: 1200px;
}

/* --- Color Bands (Full-width horizontal strips) --- */
.uif-color-bands {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 4rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.uif-color-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem 3rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    min-height: 100px;
}

.uif-color-band:hover {
    padding-left: 3.5rem;
}

.uif-band-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.uif-band-swatch {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.uif-band-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uif-band-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.uif-band-usage {
    font-size: 0.82rem;
    opacity: 0.7;
    font-weight: 400;
}

.uif-band-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.uif-band-hex {
    font-family: 'Courier New', 'SF Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.9;
}

.uif-band-token {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.5;
    min-width: 100px;
    text-align: right;
}

/* --- Text Color Token Grid --- */
.uif-text-colors-header {
    margin-bottom: 2rem;
}

.uif-text-colors-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-align: left;
    margin: 0 0 0.5rem 0;
}

.uif-text-colors-header p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.uif-text-tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.uif-text-token {
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.35s ease;
    backdrop-filter: blur(10px);
}

.uif-text-token:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.uif-text-token-preview {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
}

.uif-text-token-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.uif-text-token-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.uif-text-token-hex {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

/* =========================================
   3. TYPOGRAPHY SCALE SECTION
   ========================================= */
.uif-type-section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--primary-bg) 0%, #06060a 50%, var(--primary-bg) 100%);
}

.uif-type-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47, 128, 237, 0.3), transparent);
}

/* --- Typeface Pair Showcase --- */
.uif-typeface-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 5rem;
}

.uif-typeface-card {
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.uif-typeface-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.uif-typeface-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(47, 128, 237, 0.9);
    background: rgba(47, 128, 237, 0.1);
    border: 1px solid rgba(47, 128, 237, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 2rem;
}

.uif-typeface-specimen {
    font-size: 8rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.uif-typeface-card.serif .uif-typeface-specimen {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 900;
}

.uif-typeface-card.sans .uif-typeface-specimen {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 800;
}

.uif-typeface-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.uif-typeface-role {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    margin: 0;
}

.uif-typeface-weights {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.uif-weight-chip {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

/* --- Type Scale Ladder --- */
.uif-type-ladder-header {
    margin-bottom: 2rem;
}

.uif-type-ladder-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-align: left;
    margin: 0 0 0.5rem 0;
}

.uif-type-ladder-header p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.uif-type-ladder {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(20, 20, 20, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 5rem;
}

.uif-type-rung {
    display: grid;
    grid-template-columns: 180px 120px 1fr;
    align-items: center;
    padding: 1.75rem 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.3s ease;
}

.uif-type-rung:last-child {
    border-bottom: none;
}

.uif-type-rung:hover {
    background: rgba(255, 255, 255, 0.02);
}

.uif-rung-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.35);
}

.uif-rung-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uif-rung-family {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(47, 128, 237, 0.8);
}

.uif-rung-weight {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Courier New', monospace;
}

.uif-rung-specimen {
    color: white;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Individual type scale sizes */
.uif-rung-specimen.hero-heading {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 3rem;
    font-weight: 900;
}

.uif-rung-specimen.section-heading {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 700;
}

.uif-rung-specimen.card-heading {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.uif-rung-specimen.subheading {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
}

.uif-rung-specimen.paragraph {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.uif-rung-specimen.small-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Type in Context --- */
.uif-type-context {
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
}

.uif-type-context-header {
    padding: 2rem 3rem 0;
}

.uif-type-context-header span {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 1rem;
}

.uif-type-context-body {
    padding: 2rem 3rem 3rem;
}

/* Light-mode preview area */
.uif-context-preview {
    background: #F7F4EF;
    border-radius: 16px;
    padding: 3rem;
    position: relative;
}

.uif-context-preview h2 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 0.75rem 0;
    text-align: left;
    line-height: 1.3;
}

.uif-context-preview h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4B5563;
    margin: 0 0 1.5rem 0;
    text-align: left;
}

.uif-context-preview p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #6B7280;
    margin: 0 0 1rem 0;
}

.uif-context-preview .small-text-demo {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #9CA3AF;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(31, 58, 52, 0.1);
}

/* Light preview: floating labels */
.uif-context-label {
    position: absolute;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(47, 128, 237, 0.7);
    background: rgba(47, 128, 237, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
}

/* =========================================
   4. TOKEN SYSTEM OVERVIEW
   ========================================= */
.uif-tokens-section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.uif-tokens-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

/* --- Token Mapping Table --- */
.uif-token-table-wrapper {
    margin-top: 3rem;
}

.uif-token-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(20, 20, 20, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
}

.uif-token-table thead th {
    padding: 1.25rem 2rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
}

.uif-token-table tbody td {
    padding: 1.25rem 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.uif-token-table tbody tr:last-child td {
    border-bottom: none;
}

.uif-token-table tbody tr {
    transition: background 0.25s ease;
}

.uif-token-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.uif-token-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.uif-token-code {
    font-family: 'Courier New', 'SF Mono', monospace;
    font-size: 0.82rem;
    color: rgba(47, 128, 237, 0.8);
    background: rgba(47, 128, 237, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* --- Token Summary Cards --- */
.uif-token-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.uif-token-card {
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.35s ease;
    backdrop-filter: blur(10px);
}

.uif-token-card:hover {
    transform: translateY(-5px);
    border-color: rgba(47, 128, 237, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.uif-token-card-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    color: #2F80ED;
    background: rgba(47, 128, 237, 0.1);
    border: 1px solid rgba(47, 128, 237, 0.15);
}

.uif-token-card-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.uif-token-card-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* =========================================
   5. LIGHT SECTION DEMONSTRATION
   ========================================= */
.uif-light-demo {
    padding: 100px 0;
    background: #F7F4EF;
    position: relative;
    overflow: hidden;
}

.uif-light-demo::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(31, 58, 52, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 58, 52, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.uif-light-demo .premium-section-header {
    border-bottom-color: rgba(31, 58, 52, 0.1);
}

.uif-light-demo .heading-eyebrow {
    color: #1F3A34;
    background: rgba(31, 58, 52, 0.08);
    border-color: rgba(31, 58, 52, 0.15);
}

.uif-light-demo .heading-title-large {
    background: linear-gradient(to bottom right, #1F2937 20%, #1F3A34);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.uif-light-demo .heading-subtitle {
    color: #6B7280;
}

/* Light section palette applied */
.uif-light-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.uif-light-card {
    background: #FFFFFF;
    border: 1px solid rgba(31, 58, 52, 0.08);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.35s ease;
}

.uif-light-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.uif-light-card h4 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 1rem 0;
    text-align: left;
}

.uif-light-card p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #6B7280;
    margin: 0;
}

.uif-light-card .uif-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2F80ED;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.uif-light-card:hover .uif-card-cta {
    gap: 12px;
}

/* =========================================
   6. RESPONSIVE ADJUSTMENTS
   ========================================= */

/* Tablets */
@media (max-width: 991px) {
    .uif-typeface-pair {
        grid-template-columns: 1fr;
    }

    .uif-typeface-specimen {
        font-size: 5rem;
    }

    .uif-type-rung {
        grid-template-columns: 140px 100px 1fr;
        padding: 1.5rem 1.75rem;
    }

    .uif-rung-specimen.hero-heading {
        font-size: 2rem;
    }

    .uif-rung-specimen.section-heading {
        font-size: 1.6rem;
    }

    .uif-token-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .uif-light-showcase {
        grid-template-columns: 1fr;
    }

    .uif-color-band {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 2rem;
    }

    .uif-band-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .uif-philosophy-quote {
        font-size: 1.3rem;
    }

    .uif-philosophy-quote::before {
        font-size: 4rem;
        top: -20px;
        left: -10px;
    }

    .uif-typeface-specimen {
        font-size: 4rem;
    }

    .uif-typeface-card {
        padding: 2rem;
    }

    .uif-type-rung {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.25rem 1.5rem;
    }

    .uif-rung-label {
        margin-bottom: 0.25rem;
    }

    .uif-rung-meta {
        flex-direction: row;
        gap: 10px;
    }

    .uif-rung-specimen.hero-heading {
        font-size: 1.6rem;
    }

    .uif-rung-specimen.section-heading {
        font-size: 1.3rem;
    }

    .uif-text-tokens-grid {
        grid-template-columns: 1fr;
    }

    .uif-token-summary {
        grid-template-columns: 1fr;
    }

    .uif-token-table {
        display: block;
        overflow-x: auto;
    }

    .uif-context-preview {
        padding: 2rem;
    }

    .uif-context-preview h2 {
        font-size: 1.5rem;
    }

    .uif-light-card {
        padding: 1.75rem;
    }
}

/* =========================================
   MOBILE RESPONSIVE POPUP & BOARD CARD
   ========================================= */
@media (max-width: 768px) {
    .uif-board-container {
        padding: 0 10px;
    }

    .uif-board-preview-card {
        border-radius: 18px;
        padding: 0.75rem;
    }

    .uif-img-wrapper {
        height: 240px;
        border-radius: 14px;
    }

    .uif-expand-btn {
        padding: 0.55rem 1.15rem;
        font-size: 0.78rem;
        gap: 0.4rem;
    }

    .uif-board-footer {
        padding: 0.75rem 0.25rem 0.1rem;
        font-size: 0.75rem;
    }

    .uif-board-footer .badge-tag {
        font-size: 0.65rem;
        padding: 3px 9px;
    }

    /* Mobile Lightbox Responsive Popup Styles */
    .lightbox {
        padding: 10px;
        background: rgba(0, 0, 0, 0.96);
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }

    .lightbox-prev,
    .lightbox-next {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        top: auto;
        bottom: 1.25rem;
        transform: none;
    }

    .lightbox-prev {
        left: 1.25rem;
    }

    .lightbox-next {
        right: 1.25rem;
    }

    .lightbox-prev:hover,
    .lightbox-next:hover {
        transform: scale(1.08);
    }

    .lightbox-content-wrapper {
        width: 100%;
        height: 82vh;
        max-width: 100%;
        padding: 0;
    }

    .lightbox-img {
        max-width: 98%;
        max-height: 88%;
        border-radius: 8px;
    }

    .zoom-hint {
        bottom: 4.5rem;
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
        opacity: 0.85;
    }
}

