/* ============================================
   Style Guide Layout — styleguide.css
   Import AFTER styles.css
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #111;
    font-family: Arial, sans-serif;
}

/* --- Page wrapper --- */
.sg-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* --- Logo bar --- */
.sg-logo-bar {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #2a2a2a;
}

.sg-logo-bar h1 {
    font-size: 2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0 0 0.4rem;
}

.sg-logo-bar p {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #555;
    margin: 0;
}

/* --- Section --- */
.sg-section {
    margin-bottom: 3.5rem;
}

.sg-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #444;
    margin: 0 0 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #222;
}

/* --- Swatch grid --- */
.sg-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.sg-swatch {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #222;
}

.sg-swatch-color {
    height: 80px;
    display: flex;
    align-items: flex-end;
    padding: 0.6rem 0.75rem;
}

.sg-swatch-name {
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    display: block;
}

.sg-swatch-hex {
    font-size: 0.65rem;
    font-family: monospace;
    display: block;
    opacity: 0.7;
}

.sg-swatch-info {
    background-color: #1a1a1a;
    padding: 0.5rem 0.75rem;
}

.sg-swatch-label {
    font-size: 0.7rem;
    color: #555;
    margin: 0;
}

/* swatch color blocks */
.sg-swatch-main    { background-color: #fbfbfb; }
.sg-swatch-purple  { background-color: #b661fd; }
.sg-swatch-blue    { background-color: #0171fe; }
.sg-swatch-lime    { background-color: #dcf803; }
.sg-swatch-ny      { background-color: #d4ff08; }
.sg-swatch-magenta { background-color: #ff10cf; }
.sg-swatch-sky     { background-color: #0391e8; }

/* text on light swatches */
.sg-swatch-main .sg-swatch-name,
.sg-swatch-main .sg-swatch-hex,
.sg-swatch-lime .sg-swatch-name,
.sg-swatch-lime .sg-swatch-hex,
.sg-swatch-ny .sg-swatch-name,
.sg-swatch-ny .sg-swatch-hex {
    color: #333;
}

/* text on dark/vivid swatches */
.sg-swatch-purple .sg-swatch-name,
.sg-swatch-purple .sg-swatch-hex,
.sg-swatch-blue .sg-swatch-name,
.sg-swatch-blue .sg-swatch-hex,
.sg-swatch-magenta .sg-swatch-name,
.sg-swatch-magenta .sg-swatch-hex,
.sg-swatch-sky .sg-swatch-name,
.sg-swatch-sky .sg-swatch-hex {
    color: #fff;
}

/* --- Heading reference table --- */
.sg-heading-table {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
}

.sg-heading-row {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #222;
}

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

.sg-tag {
    font-size: 0.65rem;
    font-family: monospace;
    color: #555;
}

/* --- Color section --- */
.sg-color-section {
    margin-bottom: 2.5rem;
}

.sg-color-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sg-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sg-color-dot-main    { background-color: #fbfbfb; border: 1px solid #444; }
.sg-color-dot-purple  { background-color: #b661fd; }
.sg-color-dot-blue    { background-color: #0171fe; }
.sg-color-dot-lime    { background-color: #dcf803; }
.sg-color-dot-ny      { background-color: #d4ff08; border: 1px solid #333; }
.sg-color-dot-magenta { background-color: #ff10cf; }
.sg-color-dot-sky     { background-color: #0391e8; }

.sg-color-title {
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin: 0;
}

.sg-color-meta {
    font-size: 0.7rem;
    font-family: monospace;
    color: #444;
    margin-left: auto;
}

/* --- Elements grid --- */
.sg-el-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 0.75rem;
}

.sg-el-card {
    background-color: #1a1a1a;
    border-radius: 6px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    align-items: flex-start;
}

.sg-el-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #444;
}

.sg-headings-sample {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sg-headings-sample span {
    line-height: 1.3;
    display: block;
}

.sg-h1-sample { font-size: 1.4rem; }
.sg-h2-sample { font-size: 1.1rem; }
.sg-h3-sample { font-size: 0.95rem; }

/* bg display block */
.sg-bg-block {
    border-radius: 4px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-family: monospace;
}

.sg-bg-block-dark  { color: #fff; }
.sg-bg-block-light { color: #111; }

/* --- Utility section --- */
.sg-util-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.sg-util-card {
    background-color: #1a1a1a;
    border-radius: 6px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sg-code {
    font-family: monospace;
    font-size: 0.75rem;
    background-color: #2a2a2a;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    display: inline-block;
}

/* --- Footer --- */
.sg-footer {
    text-align: center;
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 1px solid #1e1e1e;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #2e2e2e;
    text-transform: uppercase;
}
