/* ============================================================
   Ross Simmonds — Resource Pages Design System
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    --rs-primary: #E84E36;
    --rs-secondary: #1A1A2E;
    --rs-text: #4A4A68;
    --rs-text-light: #8A8AA0;
    --rs-text-on-dark: #B0B0C8;
    --rs-bg-light: #F5F5FA;
    --rs-bg-dark: #1A1A2E;
    --rs-white: #FFFFFF;
    --rs-accent-green: #10B981;
    --rs-accent-orange: #FF4500;
    --rs-font-heading: 'DM Sans', sans-serif;
    --rs-font-body: 'Source Sans 3', 'DM Sans', sans-serif;
    --rs-max-width: 1140px;
    --rs-card-radius: 12px;
    --rs-btn-radius: 6px;
}

/* --- Reset & Base --- */
.rs-page *,
.rs-page *::before,
.rs-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.rs-page {
    font-family: var(--rs-font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--rs-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.rs-page a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* --- Layout --- */
.rs-container {
    max-width: var(--rs-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.rs-section {
    padding: 80px 0;
}

.rs-section--hero {
    padding: 80px 0 60px;
}

.rs-text-center {
    text-align: center;
}

/* --- Typography --- */
.rs-eyebrow {
    font-family: var(--rs-font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--rs-primary);
    margin-bottom: 28px;
}

.rs-page h1,
.rs-page h2,
.rs-page h3,
.rs-page h4 {
    font-family: var(--rs-font-heading);
    font-weight: 700;
    color: var(--rs-secondary);
    line-height: 1.2;
}

.rs-page h1 {
    font-size: 52px;
    margin-bottom: 20px;
}

.rs-page h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.rs-page h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.rs-page h4 {
    font-size: 18px;
    margin-bottom: 12px;
}

.rs-subhead {
    font-size: 18px;
    line-height: 1.7;
    max-width: 680px;
}

.rs-subhead--centered {
    margin-left: auto;
    margin-right: auto;
}

.rs-supporting-text {
    font-size: 20px;
    color: var(--rs-text-light);
    margin-top: 16px;
}

/* --- Dark Section Overrides --- */
.rs-dark {
    background: var(--rs-bg-dark);
    color: var(--rs-text-on-dark);
}

.rs-dark h1,
.rs-dark h2,
.rs-dark h3,
.rs-dark h4 {
    color: var(--rs-white);
}

.rs-dark .rs-subhead {
    color: var(--rs-text-on-dark);
}

/* Hero gradient */
.rs-hero-gradient {
    background: linear-gradient(135deg, #1A1A2E 0%, #0F3460 100%);
}

/* --- Light Section --- */
.rs-light {
    background: var(--rs-bg-light);
}

/* --- Buttons --- */
.rs-btn {
    display: inline-block;
    font-family: var(--rs-font-heading);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--rs-btn-radius);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    text-align: center;
    text-decoration: none;
    line-height: 1;
}

.rs-btn:hover {
    transform: scale(1.02);
}

.rs-btn--primary {
    background-color: var(--rs-primary);
    color: var(--rs-white);
    padding: 16px 48px;
}

.rs-btn--primary:hover {
    background-color: #d04430;
}

.rs-btn--full {
    display: block;
    width: 100%;
    padding: 14px 0;
}

.rs-btn--red {
    background-color: var(--rs-primary);
    color: var(--rs-white);
}

.rs-btn--red:hover {
    background-color: #d04430;
}

.rs-btn--orange {
    background-color: var(--rs-accent-orange);
    color: var(--rs-white);
}

.rs-btn--orange:hover {
    background-color: #e03e00;
}

.rs-btn--green {
    background-color: var(--rs-accent-green);
    color: var(--rs-white);
}

.rs-btn--green:hover {
    background-color: #0ea472;
}

/* --- Badges --- */
.rs-badge {
    display: inline-block;
    font-family: var(--rs-font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--rs-white);
    line-height: 1.4;
}

.rs-badge--red {
    background-color: var(--rs-primary);
}

.rs-badge--orange {
    background-color: var(--rs-accent-orange);
}

.rs-badge--green {
    background-color: var(--rs-accent-green);
}

/* --- Card Grid --- */
.rs-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.rs-card {
    background: var(--rs-white);
    border-radius: var(--rs-card-radius);
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.rs-card:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10);
}

.rs-card__subhead {
    font-size: 15px;
    color: var(--rs-text);
    margin-bottom: 12px;
    font-weight: 500;
}

.rs-card__desc {
    font-size: 15px;
    color: var(--rs-text);
    line-height: 1.6;
    margin-bottom: 20px;
}

.rs-card__footer {
    margin-top: auto;
}

.rs-card__proof {
    font-size: 13px;
    font-style: italic;
    color: var(--rs-text-light);
    text-align: center;
    margin-top: 12px;
}

/* --- Icon Checklist --- */
.rs-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.rs-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--rs-text);
    padding: 3px 0;
    line-height: 1.5;
}

.rs-checklist li::before {
    content: "\2713";
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.6;
}

.rs-checklist--red li::before {
    color: var(--rs-primary);
}

.rs-checklist--orange li::before {
    color: var(--rs-accent-orange);
}

.rs-checklist--green li::before {
    color: var(--rs-accent-green);
}

/* --- Two-Column Layout --- */
.rs-two-col {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 60px;
    align-items: center;
}

.rs-two-col--reverse {
    grid-template-columns: 45% 55%;
}

.rs-two-col--30-70 {
    grid-template-columns: 30% 70%;
    gap: 40px;
}

/* --- Forms --- */
.rs-form {
    max-width: 480px;
}

.rs-form__row {
    margin-bottom: 16px;
}

.rs-form__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--rs-secondary);
    margin-bottom: 6px;
}

.rs-form__input,
.rs-form__select {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--rs-font-body);
    font-size: 15px;
    border: 1px solid #D0D0E0;
    border-radius: var(--rs-btn-radius);
    background: var(--rs-white);
    color: var(--rs-secondary);
    transition: border-color 0.2s ease;
}

.rs-form__input:focus,
.rs-form__select:focus {
    outline: none;
    border-color: var(--rs-primary);
    box-shadow: 0 0 0 3px rgba(232, 78, 54, 0.1);
}

.rs-form__input::placeholder {
    color: var(--rs-text-light);
}

.rs-form__privacy {
    font-size: 13px;
    color: var(--rs-text-light);
    margin-top: 12px;
}

/* --- Stats Bar --- */
.rs-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.rs-stat__number {
    font-family: var(--rs-font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--rs-white);
    line-height: 1.1;
}

.rs-stat__label {
    font-size: 14px;
    color: var(--rs-text-on-dark);
    margin-top: 8px;
}

/* --- Icon Boxes (3-col) --- */
.rs-icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.rs-icon-box {
    text-align: center;
}

.rs-icon-box__icon {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1;
}

.rs-icon-box h4 {
    margin-bottom: 12px;
}

.rs-icon-box p {
    font-size: 15px;
    color: var(--rs-text);
}

/* --- Author Section --- */
.rs-author-img {
    width: 100%;
    max-width: 200px;
    border-radius: 50%;
    margin: 0 auto;
}

.rs-author-bio {
    font-size: 16px;
    line-height: 1.7;
    color: var(--rs-text);
}

/* --- FAQ / Accordion --- */
.rs-faq {
    max-width: 800px;
    margin: 0 auto;
}

.rs-faq__item {
    border-bottom: 1px solid #E0E0EE;
    padding: 24px 0;
}

.rs-faq__question {
    font-family: var(--rs-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--rs-secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0;
}

.rs-faq__question::after {
    content: "+";
    font-size: 20px;
    flex-shrink: 0;
    margin-left: 16px;
    transition: transform 0.2s ease;
}

.rs-faq__question.is-open::after {
    content: "\2212";
}

.rs-faq__answer {
    font-size: 15px;
    color: var(--rs-text);
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.rs-faq__answer.is-open {
    max-height: 500px;
    padding-top: 16px;
}

/* --- Score Tiers --- */
.rs-tiers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.rs-tier {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 8px;
    background: var(--rs-white);
}

.rs-tier__grade {
    font-family: var(--rs-font-heading);
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}

.rs-tier__range {
    font-size: 14px;
    font-weight: 600;
    color: var(--rs-secondary);
    flex-shrink: 0;
    width: 60px;
}

.rs-tier__desc {
    font-size: 14px;
    color: var(--rs-text);
}

.rs-tier--a { border-left: 4px solid var(--rs-accent-green); }
.rs-tier--a .rs-tier__grade { color: var(--rs-accent-green); }

.rs-tier--b { border-left: 4px solid #3B82F6; }
.rs-tier--b .rs-tier__grade { color: #3B82F6; }

.rs-tier--c { border-left: 4px solid var(--rs-accent-orange); }
.rs-tier--c .rs-tier__grade { color: var(--rs-accent-orange); }

.rs-tier--d { border-left: 4px solid #EF4444; }
.rs-tier--d .rs-tier__grade { color: #EF4444; }

.rs-tier--f { border-left: 4px solid #991B1B; }
.rs-tier--f .rs-tier__grade { color: #991B1B; }

/* --- Dimensions Grid (2-col numbered) --- */
.rs-dimensions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.rs-dimension {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.rs-dimension__num {
    font-family: var(--rs-font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--rs-accent-green);
    flex-shrink: 0;
    width: 28px;
}

.rs-dimension__title {
    font-weight: 600;
    color: var(--rs-secondary);
    font-size: 15px;
}

.rs-dimension__desc {
    font-size: 14px;
    color: var(--rs-text);
}

/* --- Alternating Content Sections --- */
.rs-alt-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
}

.rs-alt-section:nth-child(even) .rs-alt-section__text {
    order: 2;
}

/* --- Social Proof Bar --- */
.rs-proof-bar {
    text-align: center;
    font-size: 14px;
    color: var(--rs-text-light);
    padding: 20px 0;
}

/* --- Secondary Link --- */
.rs-secondary-link {
    font-size: 14px;
    color: var(--rs-text-light);
    text-align: center;
    margin-top: 12px;
}

.rs-secondary-link a {
    color: var(--rs-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rs-secondary-link a:hover {
    color: var(--rs-white);
    text-decoration: underline;
}

/* --- Custom Footer --- */
.rs-footer {
    background: var(--rs-bg-dark);
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rs-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.rs-footer__copyright {
    font-size: 14px;
    color: var(--rs-text-on-dark);
}

.rs-footer__social {
    display: flex;
    gap: 16px;
}

.rs-footer__social a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--rs-white);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rs-footer__social a:hover {
    background: var(--rs-primary);
    transform: scale(1.1);
}

.rs-footer__social svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    fill: currentColor !important;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .rs-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .rs-icon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .rs-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .rs-page h1 {
        font-size: 34px;
    }
    .rs-page h2 {
        font-size: 28px;
    }
    .rs-page h3 {
        font-size: 20px;
    }
    .rs-section {
        padding: 60px 0;
    }
    .rs-section--hero {
        padding: 80px 0 60px;
    }
    .rs-card-grid {
        grid-template-columns: 1fr;
    }
    .rs-card {
        padding: 28px;
        margin-bottom: 24px;
    }
    .rs-two-col,
    .rs-two-col--reverse,
    .rs-two-col--30-70 {
        grid-template-columns: 1fr;
    }
    .rs-two-col img {
        max-width: 70%;
        margin: 0 auto;
    }
    .rs-icon-grid {
        grid-template-columns: 1fr;
    }
    .rs-stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    .rs-dimensions {
        grid-template-columns: 1fr;
    }
    .rs-alt-section {
        grid-template-columns: 1fr;
    }
    .rs-alt-section:nth-child(even) .rs-alt-section__text {
        order: unset;
    }
}
