/* ============================================================
   BLDGTYP Design System — Reusable Components
   https://github.com/bldgtyp/branding

   Requires tokens.css to be loaded first:
     @import url('https://bldgtyp.github.io/branding/tokens/tokens.css');
     @import url('https://bldgtyp.github.io/branding/tokens/components.css');

   Or via <link> tags:
     <link rel="stylesheet" href="https://bldgtyp.github.io/branding/tokens/tokens.css">
     <link rel="stylesheet" href="https://bldgtyp.github.io/branding/tokens/components.css">

   Also load fonts (not bundled to avoid duplication):
     <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700&family=JetBrains+Mono:wght@300;400&display=swap" rel="stylesheet">
   ============================================================ */


/* ==========================================================
   1. BUTTONS
   ========================================================== */

.btn-primary {
    font-family: var(--font-mono); font-weight: 400; font-size: 13px;
    letter-spacing: 0.1em; text-transform: uppercase;
    background-color: var(--accent); color: #ffffff;
    border: none; padding: 16px 42px;
    border-radius: var(--radius-sm); cursor: pointer;
    transition: all var(--transition-base); text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--accent-dark); transform: translateY(-2px);
}

.btn-ghost {
    font-family: var(--font-mono); font-weight: 400; font-size: 13px;
    letter-spacing: 0.1em; text-transform: uppercase;
    background: transparent; color: var(--text-secondary);
    border: 1px solid var(--border-subtle); padding: 16px 42px;
    border-radius: var(--radius-sm); cursor: pointer;
    transition: all var(--transition-base); text-decoration: none;
    display: inline-block;
}

.btn-ghost:hover {
    border-color: var(--accent); color: var(--accent);
}


/* ==========================================================
   2. LINKS
   ========================================================== */

.link {
    color: var(--highlight-dark);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: color var(--transition-base), text-decoration-color var(--transition-base);
}

.link:hover {
    color: var(--highlight-darker);
    text-decoration-style: solid;
}


/* ==========================================================
   3. ICON BUTTONS
   ========================================================== */

.icon-btn {
    width: 32px; height: 32px;
    background: transparent; border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--transition-base);
    color: var(--text-secondary);
    text-decoration: none;
}

.icon-btn svg {
    width: 16px; height: 16px;
    fill: currentColor;
}

.icon-btn:hover {
    border-color: var(--accent); color: var(--accent);
}

.nav-icons { display: flex; gap: 8px; align-items: center; }


/* ==========================================================
   4. SERVICE CARD
   ========================================================== */

.service-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 40px 32px;
    border-top: 3px solid var(--border-card);
    border-bottom: 2px solid var(--accent);
    max-width: 340px;
    transition: all var(--transition-base);
}

.service-card:hover {
    border-top-color: var(--highlight);
}

.service-card__title {
    font-family: var(--font-primary); font-weight: 600; font-size: 16px;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 12px;
}

.service-card__subtitle {
    font-family: var(--font-primary); font-weight: 500; font-size: 20px;
    color: var(--text-primary); margin-bottom: 16px; line-height: 1.4;
}

.service-card__body {
    font-family: var(--font-primary); font-weight: 300; font-size: 15px;
    line-height: 1.7; color: var(--text-secondary);
}


/* ==========================================================
   5. STATS BAR
   ========================================================== */

.stats-bar {
    background-color: var(--bg-stats, #111111);
    padding: 60px 40px;
    border-radius: var(--radius-sm);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
}

.stats-bar__number {
    font-family: var(--font-primary); font-weight: 600; font-size: 48px;
    line-height: 1.1; color: var(--accent);
}

.stats-bar__label {
    font-family: var(--font-mono); font-weight: 300; font-size: 12px;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: #6b7280; margin-top: 8px;
}


/* ==========================================================
   6. SECTION LABEL
   ========================================================== */

.section-label {
    font-family: var(--font-mono); font-weight: 300; font-size: 12px;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 48px; display: block;
}


/* ==========================================================
   7. GRAPH PAPER BACKGROUNDS
   Three density variants applied via ::before pseudo-element.
   Add the class to any positioned container.
   ========================================================== */

.graph-paper {
    position: relative;
    overflow: hidden;
}

/* Standard: 20px minor / 100px major — hero sections, service areas */
.graph-paper::before,
.graph-paper--standard::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='0' y1='0' x2='20' y2='0' stroke='rgba(122,148,36,0.06)' stroke-width='0.5'/%3E%3Cline x1='0' y1='0' x2='0' y2='20' stroke='rgba(122,148,36,0.06)' stroke-width='0.5'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100' height='100' fill='none' stroke='rgba(122,148,36,0.12)' stroke-width='0.8'/%3E%3C/svg%3E");
    background-size: 20px 20px, 100px 100px;
}

/* Medium: 12px minor / 60px major — dashboards, data views */
.graph-paper--medium::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg width='12' height='12' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='0' y1='0' x2='12' y2='0' stroke='rgba(122,148,36,0.06)' stroke-width='0.5'/%3E%3Cline x1='0' y1='0' x2='0' y2='12' stroke='rgba(122,148,36,0.06)' stroke-width='0.5'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='60' height='60' fill='none' stroke='rgba(122,148,36,0.12)' stroke-width='0.8'/%3E%3C/svg%3E");
    background-size: 12px 12px, 60px 60px;
}

/* Fine: 6px minor / 30px major — technical details, reports */
.graph-paper--fine::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg width='6' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='0' y1='0' x2='6' y2='0' stroke='rgba(122,148,36,0.06)' stroke-width='0.5'/%3E%3Cline x1='0' y1='0' x2='0' y2='6' stroke='rgba(122,148,36,0.06)' stroke-width='0.5'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='30' height='30' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='30' height='30' fill='none' stroke='rgba(122,148,36,0.12)' stroke-width='0.8'/%3E%3C/svg%3E");
    background-size: 6px 6px, 30px 30px;
}


/* ==========================================================
   8. TYPOGRAPHY HELPERS
   Opt-in classes for common text patterns.
   ========================================================== */

.type-hero {
    font-family: var(--font-primary); font-weight: 600;
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: -0.02em; line-height: 1.15;
}

.type-heading {
    font-family: var(--font-primary); font-weight: 600;
    font-size: 42px; letter-spacing: -0.015em; line-height: 1.15;
}

.type-subheading {
    font-family: var(--font-primary); font-weight: 500;
    font-size: 20px; line-height: 1.4;
}

.type-body {
    font-family: var(--font-primary); font-weight: 300;
    font-size: 16px; line-height: 1.7;
    color: var(--text-secondary);
}

.type-body-lg {
    font-family: var(--font-primary); font-weight: 300;
    font-size: 17px; line-height: 1.8;
    color: var(--text-secondary);
}

.type-mono-label {
    font-family: var(--font-mono); font-weight: 300; font-size: 12px;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--accent);
}

.type-mono-nav {
    font-family: var(--font-mono); font-weight: 300; font-size: 11px;
    letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--text-secondary); text-decoration: none;
    transition: color var(--transition-base);
}

.type-mono-nav:hover { color: var(--accent); }

.type-stat-number {
    font-family: var(--font-primary); font-weight: 600; font-size: 48px;
    line-height: 1.1; color: var(--accent);
}

.type-stat-label {
    font-family: var(--font-mono); font-weight: 300; font-size: 12px;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: #6b7280; margin-top: 8px;
}


/* ==========================================================
   9. THEME TOGGLE
   ========================================================== */

.theme-toggle {
    width: 32px; height: 32px;
    background: transparent; border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; transition: all var(--transition-base);
    color: var(--text-primary);
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
