/* =============================================================================
   CREATE ADVERTISING — BRAND TOOLKIT
   Shared stylesheet for hub and all detail pages
   Design language: dark, minimal, APA-style, Baikal font, red accent
   ============================================================================= */


/* =============================================================================
   FONT FACES
   ============================================================================= */

@font-face {
    font-family: 'Baikal';
    src: url('assets/fonts/Baikal VAR-VF.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    font-stretch: 50% 200%;
}

@font-face {
    font-family: 'Baikal';
    src: url('assets/fonts/Baikal-ExpandedLight.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Baikal';
    src: url('assets/fonts/Baikal-ExpandedMedium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Baikal';
    src: url('assets/fonts/Baikal-ExpandedSemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Baikal';
    src: url('assets/fonts/Baikal-ExpandedBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* =============================================================================
   CSS RESET
   ============================================================================= */

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


/* =============================================================================
   DESIGN TOKENS
   ============================================================================= */

:root {
    /* Backgrounds */
    --bg:             #0A0A0A;
    --bg-card:        #111111;
    --bg-card-hover:  #181818;
    --bg-elevated:    #151515;

    /* Text */
    --text:           #FFFFFF;
    --text-secondary: #888888;
    --text-dim:       #555555;

    /* Accent */
    --accent:         #d24b4a;
    --accent-hover:   #e05555;

    /* Borders */
    --border:         #222222;
    --border-light:   #333333;

    /* Typography */
    --font-body:      'Baikal', system-ui, -apple-system, sans-serif;
    --font-mono:      'JetBrains Mono', 'Fira Mono', 'Courier New', monospace;

    /* Spacing */
    --section-padding: 120px 80px;
    --grid-padding:    40px 80px;
    --max-width:       1400px;

    /* Transitions */
    --transition:      0.2s ease;
}


/* =============================================================================
   BASE / BODY
   ============================================================================= */

html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =============================================================================
   MOBILE GATE
   Matches brand-intro pattern — blocks content below 900px
   ============================================================================= */

.mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.mobile-warning__logo {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
}

.mobile-warning__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.mobile-warning__body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .mobile-warning {
        display: flex;
        flex-direction: column;
    }

    body > *:not(.mobile-warning) {
        display: none !important;
    }
}


/* =============================================================================
   HEADER
   ============================================================================= */

.toolkit-header {
    border-bottom: 1px solid var(--border);
}

.toolkit-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 80px 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.toolkit-header__wordmark {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.toolkit-header__wordmark img {
    height: 20px;
    width: auto;
    display: block;
}

.toolkit-header__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding-bottom: 2px;
}

.toolkit-header__nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.toolkit-header__nav-link {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color var(--transition);
}

.toolkit-header__nav-link:hover,
.toolkit-header__nav-link.is-active {
    color: var(--text);
}


/* =============================================================================
   BENTO GRID SYSTEM
   ============================================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 40px 80px;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Grid column span helpers */
.grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

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


/* =============================================================================
   TILE COMPONENTS
   ============================================================================= */

.tile {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 32px;
    min-height: 200px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition), border-color var(--transition);
}

.tile:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.tile:hover .tile__arrow {
    color: var(--accent);
}

.tile:hover .tile__icon {
    color: var(--accent);
}

/* Span variants */
.tile--wide {
    grid-column: span 2;
}

.tile--full {
    grid-column: 1 / -1;
}

.tile--tall {
    min-height: 320px;
}

/* Download tile — visual differentiation */
.tile--download {
    border-style: dashed;
    position: relative;
}

.tile--download::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-light);
    transition: background var(--transition);
}

.tile--download:hover::after {
    background: var(--accent);
}

/* Tile content elements */
.tile__label {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    line-height: 1.2;
}

.tile__desc {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    margin-top: 8px;
    line-height: 1.5;
}

.tile__arrow {
    font-size: 18px;
    color: var(--text-dim);
    align-self: flex-end;
    margin-top: auto;
    transition: color var(--transition);
    line-height: 1;
}

.tile__icon {
    font-size: 18px;
    color: var(--text-dim);
    align-self: flex-end;
    margin-top: auto;
    transition: color var(--transition);
    line-height: 1;
}

/* Subtle visual preview area at top of tile */
.tile__preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    min-height: 80px;
    overflow: hidden;
}

.tile__preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.tile:hover .tile__preview img {
    opacity: 1;
}

/* Color strip preview */
.tile__color-strip {
    display: flex;
    height: 40px;
    width: 100%;
    margin-bottom: 24px;
    overflow: hidden;
}

.tile__color-strip > span {
    flex: 1;
}

/* Tile meta row (for showing sub-labels) */
.tile__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
}

.tile__tag {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(210, 75, 74, 0.1);
    padding: 4px 8px;
}


/* =============================================================================
   DETAIL PAGE LAYOUT
   ============================================================================= */

.detail-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 80px 0;
    display: flex;
    align-items: center;
    gap: 32px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 32px;
}

.detail-back {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-back:hover {
    color: var(--accent);
}

.detail-back::before {
    content: '←';
    font-size: 12px;
}

.detail-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}

.detail-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-left: auto;
}

/* Detail page main content area */
.detail-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 80px 80px;
}

/* Individual sections within detail page */
.detail-section {
    margin-bottom: 80px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
}

.detail-section:first-child {
    border-top: none;
    padding-top: 40px;
}

.detail-section__title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.detail-section__body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
}

.detail-section__body p + p {
    margin-top: 16px;
}


/* =============================================================================
   DOWNLOAD BUTTONS
   ============================================================================= */

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--text);
    border: none;
    color: var(--bg);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.btn-download:hover {
    background: var(--accent);
    color: var(--text);
}

.btn-download--secondary {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text);
}

.btn-download--secondary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text);
}

.btn-download--sm {
    padding: 10px 18px;
    font-size: 10px;
}

/* Button group */
.btn-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}


/* =============================================================================
   COLOR SWATCHES
   ============================================================================= */

.swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.swatch-grid--5col {
    grid-template-columns: repeat(5, 1fr);
}

.swatch-grid--4col {
    grid-template-columns: repeat(4, 1fr);
}

.swatch {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

.swatch__block {
    height: 120px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.swatch__value {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
    mix-blend-mode: difference;
    filter: invert(1);
    line-height: 1.6;
}

.swatch__info {
    padding: 12px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.swatch__name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 4px;
}

.swatch__codes {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Inline swatch dot */
.swatch-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
}


/* =============================================================================
   CODE BLOCKS
   ============================================================================= */

.code-block {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 24px 28px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.code-block pre {
    margin: 0;
    white-space: pre;
}

.code-block code {
    font-family: inherit;
    font-size: inherit;
}

/* Syntax-like coloring */
.code-block .token-key {
    color: #7dd3fc;
}

.code-block .token-value {
    color: #86efac;
}

.code-block .token-comment {
    color: var(--text-dim);
    font-style: italic;
}

/* Copy button */
.code-block__copy {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: var(--border-light);
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.code-block__copy:hover {
    background: var(--accent);
    color: var(--text);
}

.code-block__copy.is-copied {
    background: #166534;
    color: #86efac;
}


/* =============================================================================
   TYPOGRAPHY SPECIMENS
   ============================================================================= */

.specimen {
    padding: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
}

.specimen--dark {
    background: #000;
}

.specimen--light {
    background: #f5f5f5;
}

.specimen__display {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(48px, 8vw, 120px);
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text);
    word-break: break-word;
}

.specimen__display--light {
    color: #0A0A0A;
}

.specimen__body-sample {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    max-width: 600px;
}

/* Weight specimens */
.weight-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.weight-row:last-child {
    border-bottom: none;
}

.weight-row__sample {
    font-family: var(--font-body);
    font-size: 24px;
    color: var(--text);
    letter-spacing: 0.01em;
}

.weight-row__meta {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: right;
}

.weight-row__meta strong {
    display: block;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Type hierarchy table */
.type-hierarchy {
    width: 100%;
    border-collapse: collapse;
}

.type-hierarchy tr {
    border-bottom: 1px solid var(--border);
}

.type-hierarchy tr:last-child {
    border-bottom: none;
}

.type-hierarchy td {
    padding: 20px 0;
    vertical-align: middle;
}

.type-hierarchy td:first-child {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    width: 80px;
    padding-right: 24px;
}

.type-hierarchy td:last-child {
    font-size: 10px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-align: right;
    white-space: nowrap;
}

/* Width axis specimens */
.axis-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.axis-row:last-child {
    border-bottom: none;
}

.axis-row__sample {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}

.axis-row__label {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* =============================================================================
   DO / DON'T USAGE GRIDS
   ============================================================================= */

.usage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.usage-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.usage-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
}

.usage-card__example {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.usage-card__label {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

/* Do variant — green indicator */
.usage-card--do {
    border-top: 2px solid #22c55e;
}

.usage-card--do .usage-card__label::before {
    content: '✓';
    font-size: 12px;
    font-weight: 700;
    color: #22c55e;
}

/* Don't variant — red indicator */
.usage-card--dont {
    border-top: 2px solid var(--accent);
}

.usage-card--dont .usage-card__label::before {
    content: '✕';
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}


/* =============================================================================
   LOGO DISPLAY
   ============================================================================= */

.logo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.logo-cell {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

.logo-cell__preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.logo-cell__preview--dark {
    background: #000;
}

.logo-cell__preview--mid {
    background: #333;
}

.logo-cell__preview--light {
    background: #f0f0f0;
}

.logo-cell__preview--accent {
    background: var(--accent);
}

.logo-cell__preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-cell__info {
    padding: 16px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.logo-cell__name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 4px;
}

.logo-cell__format {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

/* Clearspace diagram */
.clearspace-diagram {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    border: 1px dashed var(--border-light);
}

.clearspace-diagram__inner {
    border: 1px dashed rgba(210, 75, 74, 0.4);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clearspace-diagram__label {
    position: absolute;
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--accent);
    letter-spacing: 0.06em;
}

.clearspace-diagram__label--top    { top: 8px; left: 50%; transform: translateX(-50%); }
.clearspace-diagram__label--bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.clearspace-diagram__label--left   { left: 8px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.clearspace-diagram__label--right  { right: 8px; top: 50%; transform: translateY(-50%) rotate(90deg); }


/* =============================================================================
   MOTION / VIDEO EMBEDS
   ============================================================================= */

.video-preview {
    position: relative;
    background: #000;
    border: 1px solid var(--border);
    overflow: hidden;
}

.video-preview__ratio {
    aspect-ratio: 16 / 9;
}

.video-preview video,
.video-preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-preview__caption {
    padding: 12px 16px;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}


/* =============================================================================
   DATA / SPEC TABLE
   ============================================================================= */

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid var(--border);
}

.spec-table tr:last-child {
    border-bottom: none;
}

.spec-table th {
    padding: 12px 0;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: left;
    padding-right: 24px;
}

.spec-table td {
    padding: 14px 0;
    font-size: 13px;
    color: var(--text);
    padding-right: 24px;
    vertical-align: top;
}

.spec-table td:first-child {
    color: var(--text-secondary);
    font-size: 11px;
    letter-spacing: 0.04em;
    width: 200px;
    font-weight: 500;
}

.spec-table td code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #7dd3fc;
}


/* =============================================================================
   UTILITY / HELPERS
   ============================================================================= */

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

.label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.label--accent {
    color: var(--accent);
}

.text-mono {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* =============================================================================
   FOOTER
   ============================================================================= */

.toolkit-footer {
    border-top: 1px solid var(--border);
    padding: 32px 80px;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.toolkit-footer__text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.toolkit-footer__sep {
    width: 1px;
    height: 12px;
    background: var(--border-light);
}
