/**
 * TinyTax Brand / Design System Page
 * Uses actual brand colours and components
 */

/* CSS Custom Properties - Brand Colours */
:root {
    --navy: #1f2744;
    --green: #11B981;
    --coral: #F97066;
    --warm-50: #FAFAF9;
    --warm-100: #F5F5F4;
    --warm-200: #E7E5E4;
    --warm-500: #78716C;
    --warm-600: #57534E;
    --warm-700: #44403C;
    --primary-50: #ECFDF5;
    --primary-600: #059669;
    --primary-700: #047857;
    --accent-50: #FFF5F4;
    --accent-600: #E5544A;
}

/* Reset for brand page */
.brand-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--warm-700);
    line-height: 1.6;
}

/* Utility classes */
.brand-page .text-primary {
    color: var(--green);
}

.brand-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   Sticky Navigation
   ============================================ */
.brand-nav {
    position: sticky;
    top: 84px; /* Offset by main header height (1rem padding × 2 + ~52px logo) */
    z-index: 90; /* Below main header (z-index: 100) */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--warm-200);
}

.brand-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.brand-nav-inner::-webkit-scrollbar {
    display: none;
}

.brand-nav-link {
    padding: 1rem 1.25rem;
    color: var(--warm-500);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.brand-nav-link:hover {
    color: var(--navy);
}

.brand-nav-link.active {
    color: var(--green);
    border-bottom-color: var(--green);
}

/* ============================================
   Hero Header
   ============================================ */
.brand-hero {
    background: linear-gradient(135deg, var(--navy) 0%, #2d3a5c 100%);
    color: white;
    padding: 5rem 0;
}

.brand-hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.brand-hero-content {
    flex: 1;
}

.brand-hero-label {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.brand-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.1;
}

.brand-hero-tagline {
    font-size: 1.25rem;
    opacity: 0.9;
    margin: 0 0 1.5rem;
    max-width: 500px;
}

.brand-hero-values {
    display: flex;
    gap: 0.75rem;
}

.value-tag {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.value-tag--entrepreneurial {
    background: var(--green);
    color: white;
}

.value-tag--familial {
    background: #F59E0B;
    color: white;
}

.value-tag--happy {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.brand-hero-logo {
    flex-shrink: 0;
}

.brand-hero-logo img {
    width: 200px;
    height: auto;
}

/* ============================================
   Sections
   ============================================ */
.brand-section {
    padding: 5rem 0;
}

.brand-section--warm {
    background: var(--warm-50);
}

.brand-section--dark {
    background: var(--navy);
    color: white;
}

.brand-section--dark h2,
.brand-section--dark h3,
.brand-section--dark h4 {
    color: white;
}

.brand-section--dark .section-intro {
    color: rgba(255, 255, 255, 0.8);
}

.brand-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.5rem;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--warm-500);
    margin: 0 0 2rem;
    max-width: 600px;
}

.section-intro strong {
    color: var(--navy);
}

.subsection-heading {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
    margin: 3rem 0 0.5rem;
}

/* ============================================
   Foundation Section
   ============================================ */
.foundation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.foundation-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.foundation-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem;
}

.foundation-card p {
    margin: 0 0 1rem;
    color: var(--warm-600);
}

.personality-traits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.personality-traits li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--warm-600);
}

.personality-traits li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

.voice-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.voice-example {
    padding: 1rem;
    border-radius: 8px;
}

.voice-example--do {
    background: var(--primary-50);
    border-left: 3px solid var(--green);
}

.voice-example--dont {
    background: #FEF2F2;
    border-left: 3px solid #E57373;
}

.voice-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.voice-example--do .voice-label {
    color: var(--primary-700);
}

.voice-example--dont .voice-label {
    color: #C62828;
}

.voice-example p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--warm-700);
}

/* ============================================
   Brand Colours Showcase
   ============================================ */
.brand-colours-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.brand-colour-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.brand-colour-swatch {
    height: 140px;
    background: var(--colour);
}

.brand-colour-info {
    padding: 1.25rem;
}

.brand-colour-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.25rem;
}

.brand-colour-info code {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--warm-500);
    background: var(--warm-100);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.brand-colour-info p {
    font-size: 0.875rem;
    color: var(--warm-500);
    margin: 0;
}

/* ============================================
   Palette Tabs & Panels
   ============================================ */
.palette-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.palette-tab {
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid var(--warm-200);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--warm-600);
    cursor: pointer;
    transition: all 0.2s;
}

.palette-tab:hover {
    border-color: var(--green);
    color: var(--green);
}

.palette-tab.active {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.palette-panel {
    display: none;
}

.palette-panel.active {
    display: block;
}

.palette-description {
    font-size: 0.9375rem;
    color: var(--warm-600);
    margin: 0 0 1rem;
}

.palette-strip {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.palette-chip {
    flex: 1;
    background: var(--bg);
    padding-top: 80px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.palette-chip:hover {
    transform: scaleY(1.05);
    transform-origin: bottom;
    z-index: 1;
}

.palette-chip.is-primary {
    flex: 1.5;
    padding-top: 100px;
}

.palette-chip .chip-shade,
.palette-chip .chip-hex {
    display: block;
    text-align: center;
    padding: 0.25rem 0;
    background: white;
}

.chip-shade {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--navy);
}

.chip-hex {
    font-size: 0.625rem;
    color: var(--warm-500);
    font-family: monospace;
}

/* ============================================
   Semantic Colours
   ============================================ */
.semantic-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.semantic-block {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.semantic-header {
    margin-bottom: 1rem;
}

.semantic-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.25rem;
}

.semantic-tone {
    font-size: 0.8125rem;
    color: var(--warm-500);
    font-style: italic;
}

.semantic-colours {
    display: flex;
    gap: 0.5rem;
}

.semantic-chip {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.semantic-chip span {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.8;
}

.semantic-chip code {
    display: block;
    font-size: 0.625rem;
    margin-top: 0.25rem;
    opacity: 0.7;
    background: none;
}

/* ============================================
   Components Section
   ============================================ */
.component-group {
    margin-bottom: 3rem;
}

.component-group:last-child {
    margin-bottom: 0;
}

.component-group h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--warm-200);
}

.component-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

.component-example {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.component-showcase--stack {
    flex-direction: column;
    align-items: stretch;
    max-width: 600px;
}

.component-showcase--cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.component-showcase--form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 700px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-primary {
    background: var(--green);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-600);
}

.btn-secondary {
    background: var(--warm-100);
    color: var(--navy);
}

.btn-secondary:hover {
    background: var(--warm-200);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--warm-200);
}

.btn-outline:hover {
    border-color: var(--navy);
}

.btn-coral {
    background: var(--coral);
    color: white;
}

.btn-coral:hover {
    background: var(--accent-600);
}

.btn-ghost {
    background: transparent;
    color: var(--warm-600);
}

.btn-ghost:hover {
    background: var(--warm-100);
    color: var(--navy);
}

.btn-danger {
    background: #FEF2F2;
    color: #C62828;
}

.btn-danger:hover {
    background: #FECACA;
}

.btn-celebration {
    background: linear-gradient(135deg, var(--green) 0%, #34D399 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(17, 185, 129, 0.3);
}

.btn-celebration:hover {
    box-shadow: 0 6px 20px rgba(17, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 4px solid;
    font-size: 0.9375rem;
}

.alert strong {
    font-weight: 600;
}

.alert-success {
    background: var(--primary-50);
    border-color: var(--green);
    color: var(--primary-700);
}

.alert-warning {
    background: #FFFBEB;
    border-color: #F59E0B;
    color: #B45309;
}

.alert-error {
    background: #FEF2F2;
    border-color: #E57373;
    color: #C62828;
}

.alert-info {
    background: #EFF6FF;
    border-color: #60A5FA;
    color: #2563EB;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--warm-200);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-body {
    padding: 1.5rem;
}

.card-body h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.5rem;
}

.card-body p {
    color: var(--warm-600);
    margin: 0 0 1rem;
    font-size: 0.9375rem;
}

.card-celebration {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--accent-50) 100%);
    border: 2px solid var(--green);
    text-align: center;
}

.celebration-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--warm-700);
}

.form-input,
.form-select {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--warm-200);
    border-radius: 8px;
    background: var(--warm-50);
    color: var(--navy);
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(17, 185, 129, 0.15);
    background: white;
}

.form-group--error .form-input {
    border-color: #E57373;
    background: #FEF2F2;
}

.form-error {
    font-size: 0.8125rem;
    color: #C62828;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-success {
    background: var(--primary-50);
    color: var(--primary-700);
}

.badge-warning {
    background: #FFFBEB;
    color: #B45309;
}

.badge-error {
    background: #FEF2F2;
    color: #C62828;
}

.badge-info {
    background: #EFF6FF;
    color: #2563EB;
}

.badge-neutral {
    background: var(--warm-100);
    color: var(--warm-600);
}

.badge-draft {
    background: #E0E7FF;
    color: #3730A3;
}

/* Status Badges */
.status-badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.status-badge-example {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--warm-200);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    width: fit-content;
}

.status-badge:hover {
    transform: scale(1.02);
    filter: brightness(105%);
}

.status-badge-icon {
    font-size: 0.75rem;
}

.status-badge--filed {
    background: #ECFDF5;
    color: #047857;
}

.status-badge--pending {
    background: #FFFBEB;
    color: #B45309;
}

.status-badge--error {
    background: #FEF2F2;
    color: #C62828;
}

.status-badge--draft {
    background: #E0E7FF;
    color: #3730A3;
}

.status-badge--due-soon {
    background: #FFFBEB;
    color: #D97706;
}

.status-badge--none {
    background: var(--warm-100);
    color: var(--warm-500);
}

.status-badge-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-badge-info strong {
    font-size: 0.8125rem;
    color: var(--navy);
}

.status-badge-info code {
    font-size: 0.6875rem;
    color: var(--warm-500);
    background: var(--warm-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.status-badge-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

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

/* ============================================
   Links
   ============================================ */
.link-examples {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--warm-200);
}

.link-examples p {
    margin: 0.75rem 0;
    color: var(--warm-600);
}

.link-examples p:first-child {
    margin-top: 0;
}

.link-examples p:last-child {
    margin-bottom: 0;
}

.link {
    color: var(--green);
    text-decoration: none;
    transition: all 0.15s ease;
}

.link:hover {
    text-decoration: underline;
    color: var(--primary-600);
}

.link:focus {
    outline: 2px solid var(--green);
    outline-offset: 2px;
    border-radius: 2px;
}

.link-muted {
    color: var(--warm-500);
}

.link-muted:hover {
    color: var(--warm-700);
}

.link-external {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.link-external-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.link-spec-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    background: var(--warm-50);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.spec-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--warm-500);
}

.spec-value {
    font-size: 0.875rem;
    color: var(--navy);
    font-family: 'SF Mono', Monaco, monospace;
}

/* ============================================
   Modals
   ============================================ */
.modal-preview {
    background: var(--warm-100);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-preview-backdrop {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.modal-preview-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--warm-200);
}

.modal-preview-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--warm-500);
    transition: all 0.15s;
}

.modal-close-btn:hover {
    background: var(--warm-100);
    color: var(--navy);
}

.modal-close-btn svg {
    width: 18px;
    height: 18px;
}

.modal-preview-body {
    padding: 1.25rem;
}

.modal-preview-body p {
    margin: 0;
    color: var(--warm-600);
    font-size: 0.9375rem;
}

.modal-preview-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
    background: var(--warm-50);
}

.modal-specs,
.table-specs,
.focus-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.spec-item {
    background: var(--warm-50);
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.spec-item .spec-label {
    display: block;
    margin-bottom: 0.25rem;
}

.spec-item .spec-value {
    font-size: 0.8125rem;
}

/* ============================================
   Icons
   ============================================ */
.component-note {
    font-size: 0.875rem;
    color: var(--warm-500);
    margin: 0 0 1rem;
}

.icon-example {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.icon-example span {
    font-size: 0.75rem;
    color: var(--warm-500);
}

.icon-container {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warm-50);
    border-radius: 8px;
    transition: all 0.15s;
}

.icon-container:hover {
    background: var(--primary-50);
}

.icon-container svg {
    width: 20px;
    height: 20px;
    color: var(--navy);
}

.icon-sizes {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--warm-200);
}

.icon-size-example {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.icon-size-example svg {
    width: var(--size);
    height: var(--size);
    color: var(--navy);
}

.icon-size-example code {
    font-size: 0.6875rem;
    background: var(--warm-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--warm-600);
}

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--warm-200);
}

.example-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.example-table th,
.example-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--warm-200);
}

.example-table th {
    background: var(--warm-50);
    font-weight: 600;
    color: var(--navy);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.example-table tbody tr {
    transition: background 0.15s;
}

.example-table tbody tr:hover {
    background: var(--warm-50);
}

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

.text-right {
    text-align: right;
}

/* ============================================
   Focus States
   ============================================ */
.focus-example {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.focus-label {
    font-size: 0.75rem;
    color: var(--warm-500);
}

.focus-demo:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 185, 129, 0.15);
}

.focus-demo.btn:focus {
    box-shadow: 0 0 0 3px rgba(17, 185, 129, 0.3);
}

.focus-demo.link:focus {
    box-shadow: none;
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

/* ============================================
   Loading States
   ============================================ */
.loading-example {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.loading-example span {
    font-size: 0.75rem;
    color: var(--warm-500);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--warm-200);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

.spinner-light {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: not-allowed;
    opacity: 0.8;
}

.loading-skeleton-example {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--warm-200);
}

.skeleton-demo {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--warm-200);
}

.skeleton {
    background: linear-gradient(90deg, var(--warm-100) 25%, var(--warm-50) 50%, var(--warm-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-title {
    height: 16px;
    width: 60%;
}

.skeleton-text {
    height: 12px;
    width: 100%;
}

.skeleton-text--short {
    width: 40%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   Animations & Transitions
   ============================================ */
.animation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.animation-example {
    text-align: center;
}

.animation-demo {
    background: var(--warm-50);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.demo-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--navy);
    cursor: pointer;
    transition: all 0.2s;
}

.demo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.demo-element {
    background: var(--green);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.animation-demo--fade .demo-element {
    animation: fadeInOut 2s ease infinite;
}

.animation-demo--scale .demo-element {
    animation: scaleInOut 2s ease infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes scaleInOut {
    0%, 100% { transform: scale(0.9); }
    50% { transform: scale(1); }
}

.animation-info {
    text-align: left;
}

.animation-info strong {
    display: block;
    font-size: 0.875rem;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.animation-info code {
    display: block;
    font-size: 0.6875rem;
    color: var(--warm-500);
    background: var(--warm-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.timing-specs {
    background: var(--warm-50);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.timing-specs h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 1rem;
}

.timing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.timing-item {
    text-align: center;
}

.timing-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--warm-500);
    margin-bottom: 0.25rem;
}

.timing-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--green);
    font-family: 'SF Mono', Monaco, monospace;
}

.timing-use {
    display: block;
    font-size: 0.6875rem;
    color: var(--warm-500);
    margin-top: 0.25rem;
}

/* ============================================
   Typography Section
   ============================================ */
.type-showcase {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--warm-200);
}

.type-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.type-scale {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.type-scale-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: baseline;
    gap: 1rem;
}

.type-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--warm-500);
}

.type-scale-item code {
    font-size: 0.75rem;
    color: var(--warm-500);
    background: var(--warm-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.type-display { font-size: 3rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.type-h1 { font-size: 2.25rem; font-weight: 700; color: var(--navy); }
.type-h2 { font-size: 1.875rem; font-weight: 600; color: var(--navy); }
.type-h3 { font-size: 1.5rem; font-weight: 600; color: var(--navy); }
.type-h4 { font-size: 1.25rem; font-weight: 600; color: var(--navy); }
.type-body { font-size: 1rem; color: var(--warm-600); }
.type-small { font-size: 0.875rem; color: var(--warm-500); }

.type-weights {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--warm-200);
}

.weight-sample {
    font-size: 1rem;
    color: var(--navy);
}

/* ============================================
   Logo Section
   ============================================ */
.logo-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.logo-display {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logo-preview {
    background: var(--bg);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.logo-preview img {
    max-width: 180px;
    height: auto;
}

.logo-meta {
    background: white;
    padding: 1rem 1.25rem;
}

.logo-meta h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.25rem;
}

.logo-meta p {
    font-size: 0.875rem;
    color: var(--warm-500);
    margin: 0;
}

.logo-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.spec-card {
    background: var(--warm-50);
    border-radius: 12px;
    padding: 1.25rem;
}

.spec-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 0.5rem;
}

.spec-card p {
    font-size: 0.875rem;
    color: var(--warm-600);
    margin: 0.25rem 0;
}

/* ============================================
   Downloads Section
   ============================================ */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.download-category h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.download-item:last-child {
    border-bottom: none;
}

.download-item span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.download-actions {
    display: flex;
    gap: 0.5rem;
}

.download-link {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--green);
    background: rgba(17, 185, 129, 0.15);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.download-link:hover {
    background: var(--green);
    color: white;
}

/* ============================================
   Footer
   ============================================ */
.brand-footer {
    background: var(--warm-100);
    padding: 2rem 0;
    text-align: center;
}

.brand-footer p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--warm-600);
}

.brand-footer a {
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
}

.brand-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .brand-hero .container {
        flex-direction: column;
        text-align: center;
    }

    .brand-hero h1 {
        font-size: 2.5rem;
    }

    .brand-hero-tagline {
        max-width: 100%;
    }

    .brand-hero-values {
        justify-content: center;
    }

    .brand-colours-showcase {
        grid-template-columns: 1fr;
    }

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

    .type-scale-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .type-scale-item code {
        justify-self: start;
    }

    .type-display {
        font-size: 2rem;
    }

    .type-h1 {
        font-size: 1.75rem;
    }

    .animation-grid {
        grid-template-columns: 1fr;
    }

    .timing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .brand-section {
        padding: 3rem 0;
    }

    .brand-hero {
        padding: 3rem 0;
    }

    .brand-hero h1 {
        font-size: 2rem;
    }

    .palette-strip {
        flex-wrap: wrap;
    }

    .palette-chip {
        flex: 0 0 20%;
        padding-top: 50px;
    }

    .palette-chip.is-primary {
        flex: 0 0 100%;
        padding-top: 60px;
        order: -1;
    }

    .voice-examples {
        grid-template-columns: 1fr;
    }

    .type-weights {
        flex-direction: column;
        gap: 0.75rem;
    }

    .icon-sizes {
        flex-wrap: wrap;
        justify-content: center;
    }

    .modal-specs,
    .table-specs,
    .focus-specs {
        grid-template-columns: 1fr;
    }

    .timing-grid {
        grid-template-columns: 1fr;
    }

    .component-showcase {
        flex-direction: column;
    }

    .focus-example {
        width: 100%;
    }
}
