/* ============================================================
 * TYPOGRAPHY WEBSITE PREVIEW
 * assets/css/pages/typography-builder/website-preview.css
 * ------------------------------------------------------------
 * Fixed chrome palette — neutral and minimal so typography
 * dominates. Colors never change; only type tokens update.
 *
 * Sections:
 *   Navbar     — brand + nav links + CTA buttons
 *   Hero       — two-column: copy left, 3D Ag illustration right
 *   Features   — three-column icon grid with dividers
 *   Reading    — article column, blockquote, checkmark list
 *   Stats      — dark navy footer, icon + number + desc
 * ============================================================ */

/* ── Chrome variables — shared values from .tb-preview-panel ── */
.tb-wp {
    --wp-bg:          var(--preview-bg);
    --wp-page:        #eef1f6;
    --wp-text:        var(--preview-text);
    --wp-muted:       var(--preview-muted);
    --wp-border:      var(--preview-border);
    --wp-accent:      var(--preview-accent);
    --wp-accent-soft: rgba(79, 70, 229, 0.08);
    --wp-accent-ct:   var(--preview-accent-ct);
    --wp-dark-bg:     #0c1631;
    --wp-dark-border: rgba(255, 255, 255, 0.08);
    --wp-dark-muted:  #94a3b8;

    /* Light gray page — nav and hero paint themselves white,
       the card sections below float on this background. */
    background: var(--wp-bg);
    color: var(--wp-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    overflow: hidden;

}


/* ── Typography role classes — sourced from tokens ──────────── */
.tb-wp-display {
    font-family: var(--te-text-display-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-display-font-size, 2.75rem);
    font-weight: var(--te-text-display-font-weight, 800);
    line-height: var(--te-text-display-line-height, 1.1);
    letter-spacing: var(--te-text-display-letter-spacing, -0.025em);
    margin: 0;
    color: var(--wp-text);
}

.tb-wp-h1 {
    font-family: var(--te-text-h1-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-h1-font-size, 2.25rem);
    font-weight: var(--te-text-h1-font-weight, 700);
    line-height: var(--te-text-h1-line-height, 1.2);
    letter-spacing: var(--te-text-h1-letter-spacing, -0.02em);
    margin: 0;
    color: var(--wp-text);
}

.tb-wp-h2 {
    font-family: var(--te-text-h2-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-h2-font-size, 1.875rem);
    font-weight: var(--te-text-h2-font-weight, 700);
    line-height: var(--te-text-h2-line-height, 1.2);
    letter-spacing: var(--te-text-h2-letter-spacing, -0.02em);
    margin: 0;
}

.tb-wp-h3 {
    font-family: var(--te-text-h3-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-h3-font-size, 1.125rem);
    font-weight: var(--te-text-h3-font-weight, 700);
    line-height: var(--te-text-h3-line-height, 1.3);
    letter-spacing: var(--te-text-h3-letter-spacing, -0.01em);
    margin: 0;
}

.tb-wp-h4 {
    font-family: var(--te-text-h4-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-h4-font-size, 1rem);
    font-weight: var(--te-text-h4-font-weight, 600);
    line-height: var(--te-text-h4-line-height, 1.375);
    letter-spacing: var(--te-text-h4-letter-spacing, -0.01em);
    margin: 0;
}

.tb-wp-body-lg {
    font-family: var(--te-text-body-lg-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-body-lg-font-size, 1.0625rem);
    font-weight: var(--te-text-body-lg-font-weight, 400);
    line-height: var(--te-text-body-lg-line-height, 1.65);
    letter-spacing: var(--te-text-body-lg-letter-spacing, 0em);
    margin: 0;
}

.tb-wp-body {
    font-family: var(--te-text-body-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-body-font-size, 0.9375rem);
    font-weight: var(--te-text-body-font-weight, 400);
    line-height: var(--te-text-body-line-height, 1.65);
    letter-spacing: var(--te-text-body-letter-spacing, 0em);
    margin: 0;
}

.tb-wp-body-sm {
    font-family: var(--te-text-body-sm-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-body-sm-font-size, 0.8125rem);
    font-weight: var(--te-text-body-sm-font-weight, 400);
    line-height: var(--te-text-body-sm-line-height, 1.6);
    letter-spacing: var(--te-text-body-sm-letter-spacing, 0em);
    margin: 0;
}

.tb-wp-label {
    font-family: var(--te-text-label-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-label-font-size, 0.8125rem);
    font-weight: var(--te-text-label-font-weight, 500);
    line-height: var(--te-text-label-line-height, 1.5);
    letter-spacing: var(--te-text-label-letter-spacing, 0em);
    margin: 0;
}

.tb-wp-button {
    font-family: var(--te-text-button-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-button-font-size, 0.875rem);
    font-weight: var(--te-text-button-font-weight, 600);
    line-height: var(--te-text-button-line-height, 1);
    letter-spacing: var(--te-text-button-letter-spacing, 0.01em);
}

.tb-wp-caption {
    font-family: var(--te-text-caption-font-family, 'Inter', sans-serif);
    font-size: var(--te-text-caption-font-size, 0.75rem);
    font-weight: var(--te-text-caption-font-weight, 400);
    line-height: var(--te-text-caption-line-height, 1.5);
    letter-spacing: var(--te-text-caption-letter-spacing, 0.02em);
    margin: 0;
}


/* ── Shared layout ───────────────────────────────────────────── */
.tb-wp-container {
    max-width: 940px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Sections own their padding; hero is full-bleed white, the rest
   are floating cards sharing this base. */
.tb-wp-section {
    padding: 0;
}




/* ═══════════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════════ */

.tb-wp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 32px;
    border-bottom: 1px solid var(--wp-border);
    background: var(--wp-bg);
}

/* Brand — logo mark + wordmark */
.tb-wp-brand-wrap {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.tb-wp-brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(160deg, #6e6af0 0%, var(--wp-accent) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 3px rgba(79, 70, 229, 0.25);
    user-select: none;
}

.tb-wp-brand {
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -0.015em;
    color: var(--wp-text);
    white-space: nowrap;
}

.tb-wp-nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.tb-wp-nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.tb-wp-nav-link:hover {
    color: var(--wp-text);
}

.tb-wp-nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}


/* ── Buttons ─────────────────────────────────────────────────── */
.tb-wp-btn {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: opacity 0.15s ease;
}

.tb-wp-btn:hover {
    opacity: 0.88;
}

.tb-wp-btn-primary {
    background: linear-gradient(180deg, #5b56e8 0%, var(--wp-accent) 100%);
    color: var(--wp-accent-ct);
    border-color: var(--wp-accent);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.30);
}

.tb-wp-btn-ghost {
    background: var(--wp-bg);
    color: var(--wp-text);
    border-color: var(--wp-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}


/* ═══════════════════════════════════════════════════════════════
   HERO — two-column: copy left, 3D Ag illustration right
═══════════════════════════════════════════════════════════════ */

.tb-wp-hero {
    padding-top: 56px;
    padding-bottom: 64px;
    background: var(--wp-bg);
}

.tb-wp-hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 56px;
    align-items: center;
}

/* Left: copy */
.tb-wp-hero-copy {
    min-width: 0;
}

/* Eyebrow badge — "Aa" chip + accented line */
.tb-wp-hero-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.tb-wp-hero-badge-chip {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--wp-accent-soft);
    color: var(--wp-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
    user-select: none;
}

.tb-wp-hero-badge-text {
    color: var(--wp-text);
    font-weight: 500;
}

.tb-wp-hero-badge-accent {
    color: var(--wp-accent);
    font-weight: 600;
}

/* Accent word inside the display headline */
.tb-wp-hero-accent {
    color: var(--wp-accent);
}

.tb-wp-hero-sub {
    color: var(--wp-muted);
    margin-top: 20px;
    max-width: 460px;
}

.tb-wp-hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 32px;
}

/* ── Hero Illustration ───────────────────────────────────────── */
.tb-wp-hero-illus {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 380px;
}

.tb-wp-hero-illus-img {
    width: 100%;
    height: auto;
    display: block;
}


/* ═══════════════════════════════════════════════════════════════
   FEATURES — three-column icon grid
═══════════════════════════════════════════════════════════════ */

.tb-wp-hierarchy {
    background: var(--wp-bg);
    border: 1px solid var(--wp-border);
    margin-top: 28px;
    padding-top: 36px;
    padding-bottom: 36px;
}

.tb-wp-hierarchy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

/* Column — icon left, title beside it, description under the title */
.tb-wp-hierarchy-col {
    padding: 0 28px;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    row-gap: 10px;
    align-items: center;
    text-align: left;
}

/* Flush outer edges */
.tb-wp-hierarchy-col:first-child {
    padding-left: 0;
}

.tb-wp-hierarchy-col:last-child {
    padding-right: 0;
}

/* Vertical dividers between columns */
.tb-wp-hierarchy-col+.tb-wp-hierarchy-col {
    border-left: 1px solid var(--wp-border);
}

/* Soft tinted circle icon */
.tb-wp-hierarchy-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #eef0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wp-accent);
    flex-shrink: 0;
}

/* Third feature is the green one in the reference */
.tb-wp-hierarchy-col:nth-child(3) .tb-wp-hierarchy-icon {
    background: #e3f6ec;
    color: #16a34a;
}

.tb-wp-hierarchy-title {
    color: var(--wp-text);
}

.tb-wp-hierarchy-body {
    grid-column: 2;
    color: var(--wp-muted);
}


/* ═══════════════════════════════════════════════════════════════
   READING — article layout
═══════════════════════════════════════════════════════════════ */

.tb-wp-reading {
    background: var(--wp-bg);
    border: 1px solid var(--wp-border);
    padding-top: 36px;
    padding-bottom: 28px;
}

.tb-wp-reading-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Eyebrow — accent bar + small-caps label */
.tb-wp-reading-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
}

.tb-wp-reading-eyebrow-bar {
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--wp-accent);
    flex-shrink: 0;
}

.tb-wp-reading-eyebrow-text {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #475569;
}

/* Two-column head — copy left, pull-quote right */
.tb-wp-reading-head {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    align-items: start;
}

.tb-wp-reading-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.tb-wp-reading-title {
    color: var(--wp-text);
}

.tb-wp-reading-lead {
    color: var(--wp-text);
}

.tb-wp-reading .tb-wp-body {
    color: var(--wp-muted);
}

.tb-wp-reading .tb-wp-body-sm {
    color: var(--wp-muted);
}

/* Pull-quote card */
.tb-wp-blockquote {
    margin: 0;
    padding: 22px 26px;
    border-radius: 12px;
    background: #f4f2fc;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tb-wp-blockquote-mark {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 0.9;
    color: var(--wp-accent);
    user-select: none;
}

.tb-wp-blockquote .tb-wp-body-lg {
    color: var(--wp-text);
    font-style: italic;
}

.tb-wp-reading-note {
    color: var(--wp-muted);
}

/* Checkmark list — three columns with dividers */
.tb-wp-check-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--wp-border);
    padding-top: 24px;
    margin-top: 4px;
}

.tb-wp-check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 24px;
}

.tb-wp-check-item:first-child {
    padding-left: 0;
}

.tb-wp-check-item:last-child {
    padding-right: 0;
}

.tb-wp-check-item+.tb-wp-check-item {
    border-left: 1px solid var(--wp-border);
}

/* Filled accent check circle */
.tb-wp-check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--wp-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    margin-top: 2px;
}

.tb-wp-check-icon svg {
    display: block;
}

.tb-wp-check-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tb-wp-check-label {
    color: var(--wp-text);
    font-weight: 600;
}

.tb-wp-check-desc {
    color: var(--wp-muted);
}

/* Caption rule */
.tb-wp-reading-caption {
    color: var(--wp-muted);
    padding-top: 16px;
    border-top: 1px solid var(--wp-border);
}


/* ═══════════════════════════════════════════════════════════════
   STATS — dark navy footer
═══════════════════════════════════════════════════════════════ */

.tb-wp-stats {
    background: var(--wp-dark-bg);
    padding-top: 34px;
    padding-bottom: 38px;
    position: relative;
    overflow: hidden;
}

/* Decorative concentric arcs — bottom right corner */
.tb-wp-stats::after {
    content: '';
    position: absolute;
    right: -70px;
    bottom: -130px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at center,
            transparent 0 30px,
            rgba(99, 91, 235, 0.28) 30px 31.5px);
    pointer-events: none;
}

/* Override container text colors for dark context; sit above the arcs */
.tb-wp-stats .tb-wp-container {
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.tb-wp-stats-eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wp-dark-muted);
    margin-bottom: 28px;
}

.tb-wp-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

/* Stat — icon tile left, number beside it, desc aligned under the
   number. The header wrapper participates via display: contents. */
.tb-wp-stat-item {
    padding: 0 32px;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    row-gap: 6px;
    align-items: center;
}

.tb-wp-stat-item:first-child {
    padding-left: 0;
}

.tb-wp-stat-item:last-child {
    padding-right: 0;
}

/* Vertical dividers */
.tb-wp-stat-item+.tb-wp-stat-item {
    border-left: 1px solid var(--wp-dark-border);
}

.tb-wp-stat-header {
    display: contents;
}

/* Colorful rounded icon tile */
.tb-wp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

.tb-wp-stat-item:nth-child(1) .tb-wp-stat-icon {
    background: #7c3aed;
}

.tb-wp-stat-item:nth-child(2) .tb-wp-stat-icon {
    background: #16a34a;
}

.tb-wp-stat-item:nth-child(3) .tb-wp-stat-icon {
    background: #2563eb;
}

.tb-wp-stat-icon svg {
    display: block;
}

.tb-wp-stat-number {
    color: #ffffff;
}

.tb-wp-stat-desc {
    grid-column: 2;
    color: var(--wp-dark-muted);
    max-width: 220px;
}


/* ── Mobile mode — phone frame simulation (.tb-wp--mobile) ──────
   Mirrors the @media block below. Applied via a class so the narrow
   phone-frame container triggers responsive layout without relying
   on viewport-width media queries (which don't fire inside a fixed-
   size iframe-like div).
─────────────────────────────────────────────────────────────── */
.tb-wp--mobile .tb-wp-container {
    padding: 0 20px;
}

.tb-wp--mobile .tb-wp-nav {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 20px;
}

.tb-wp--mobile .tb-wp-nav-links {
    display: none;
}

.tb-wp--mobile .tb-wp-nav-actions {
    gap: 8px;
}

.tb-wp--mobile .tb-wp-hero {
    padding-top: 36px;
    padding-bottom: 36px;
}

.tb-wp--mobile .tb-wp-hero-inner {
    grid-template-columns: 1fr;
}

.tb-wp--mobile .tb-wp-hero-illus {
    display: none;
}

.tb-wp--mobile .tb-wp-hierarchy-grid {
    grid-template-columns: 1fr;
}

.tb-wp--mobile .tb-wp-hierarchy-col {
    padding: 20px 0 0;
    border-left: none !important;
    border-top: 1px solid var(--wp-border);
}

.tb-wp--mobile .tb-wp-hierarchy-col:first-child {
    padding-top: 0;
    border-top: none;
}

.tb-wp--mobile .tb-wp-reading-head {
    grid-template-columns: 1fr;
    gap: 20px;
}

.tb-wp--mobile .tb-wp-check-list {
    grid-template-columns: 1fr;
    gap: 14px;
}

.tb-wp--mobile .tb-wp-check-item {
    padding: 0;
    border-left: none !important;
}

.tb-wp--mobile .tb-wp-stats-grid {
    grid-template-columns: 1fr;
    gap: 28px;
}

.tb-wp--mobile .tb-wp-stat-item {
    padding: 0;
    border-left: none !important;
}


/* Responsive rules moved to typograpy-responsive.css */


/* ── Dark mode ───────────────────────────────────────────────────
   Root/nav/hero/section surfaces follow --preview-* (themed centrally).
   Only the hardcoded light literals are overridden here. */
[data-theme="dark"] [data-page="typography-builder"] .tb-wp {
    --wp-accent-soft: rgba(129, 140, 248, 0.16);
}

[data-theme="dark"] [data-page="typography-builder"] .tb-wp-nav-link,
[data-theme="dark"] [data-page="typography-builder"] .tb-wp-reading-eyebrow-text {
    color: var(--wp-muted);
}

[data-theme="dark"] [data-page="typography-builder"] .tb-wp-hierarchy-icon {
    background: rgba(129, 140, 248, 0.15);
}

[data-theme="dark"] [data-page="typography-builder"] .tb-wp-hierarchy-col:nth-child(3) .tb-wp-hierarchy-icon {
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
}

[data-theme="dark"] [data-page="typography-builder"] .tb-wp-blockquote {
    background: rgba(129, 140, 248, 0.10);
}