/* ============================================================
   INFANTJS — STATIC CONSTRAINTS PAGE
   Matches site aesthetic: black bg, #ffda00 yellow, Helvetica Neue
   ============================================================ */

/* --- 1. GLOBAL RESET --- */
*, *::before, *::after { box-sizing: border-box; }

img { max-width: 100%; height: auto; display: block; }

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s, color 0.4s;
}

main { padding: 0; }
.page-buffer { height: 120px; width: 100%; }

/* --- 2. FIXED HEADER / NAV --- */
.overlay-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 30px;
    z-index: 200;
    box-sizing: border-box;
    background: linear-gradient(to bottom, var(--bg-color) 55%, transparent);
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.site-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--nav-text, #fff);
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.site-title:hover { opacity: 0.55; cursor: pointer; }

.site-subtitle {
    margin: 5px 0 0;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.5;
}

.top-nav { display: flex; gap: 16px; align-items: center; }

.top-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 3px;
    transition: opacity 0.25s ease;
}

.top-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--text-color);
    transition: width 0.3s ease;
}
.top-nav a:hover::after { width: 100%; }
.top-nav a:hover { opacity: 0.65; }

/* --- 3. PAGE CONTAINER --- */
.constraints-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 48px 120px;
}

/* --- 4. PAGE HEADER --- */
.constraints-header {
    padding-bottom: 48px;
    margin-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.constraints-eyebrow {
    display: block;
    font-size: 10px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #ffda00;
    margin-bottom: 20px;
    opacity: 0.9;
}

.constraints-title {
    font-size: clamp(36px, 5.5vw, 68px);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.0;
    text-transform: uppercase;
    margin: 0 0 24px;
}

.constraints-subtitle {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-color);
    opacity: 0.55;
    margin: 0;
    max-width: 560px;
}

/* --- 5. INTRO BLURB --- */
.constraints-intro {
    margin-bottom: 48px;
}

.constraints-intro p {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-color);
    opacity: 0.7;
    margin: 0;
}

.constraints-intro strong {
    color: #ffda00;
    font-weight: 700;
    opacity: 1;
}

/* --- 6. TABLE WRAPPER --- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 72px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
}

/* --- 7. CONSTRAINTS TABLE --- */
.constraints-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.constraints-table thead tr {
    border-bottom: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
}

.constraints-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.4;
}

.constraints-table thead th:first-child {
    width: 52px;
}

.constraints-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s ease;
}

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

.constraints-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.constraints-table tbody td {
    padding: 18px 20px;
    vertical-align: top;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.75;
}

/* Row number */
.constraints-table tbody td.num {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffda00;
    opacity: 0.6;
    padding-top: 20px;
    white-space: nowrap;
}

/* Inline code */
.constraints-table code {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(255,218,0,0.10);
    color: #ffda00;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}

/* --- 8. GRAMMAR LINK BLOCK --- */
.grammar-link-block {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    padding: 36px 40px;
    background: rgba(255,255,255,0.015);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.grammar-eyebrow {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

.grammar-link-block p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.6;
    margin: 0;
}

.inline-link {
    color: #ffda00;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,218,0,0.3);
    padding-bottom: 1px;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}
.inline-link:hover {
    border-color: #ffda00;
    opacity: 0.8;
}

.grammar-btn {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-color);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    border-radius: 2px;
}
.grammar-btn:hover {
    background: #ffda00;
    border-color: #ffda00;
    color: #000;
}

/* --- 9. RESPONSIVE --- */
@media (max-width: 720px) {
    .constraints-container { padding: 0 20px 80px; }
    .constraints-title { font-size: 34px; letter-spacing: -0.5px; }

    .overlay-header {
        flex-direction: column;
        gap: 14px;
        padding: 16px;
        align-items: center;
    }
    .logo-wrapper { align-items: center; text-align: center; }
    .top-nav { gap: 8px; justify-content: center; flex-wrap: wrap; }
    .page-buffer { height: 130px; }

    .constraints-table thead th,
    .constraints-table tbody td { padding: 14px 12px; }

    .grammar-link-block { padding: 24px 20px; }
}
