/* ============================================
   3 Simple Rules to Success
   Clean reading-focused design
   ============================================ */

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

:root {
    --blue: #2271b1;
    --blue-dark: #1a5a8e;
    --blue-bg: #f0f6fb;
    --navy: #1b2d45;
    --text: #2c2c2c;
    --text-light: #555;
    --bg: #ffffff;
    --border: #e0e0e0;
    --max-width: 740px;
    --nav-height: 64px;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--navy);
    line-height: 1.25;
    font-weight: 700;
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }

p { margin-bottom: 1.25rem; }

strong { color: var(--navy); }

blockquote {
    border-left: 4px solid var(--blue);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--blue-bg);
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

blockquote p:last-child { margin-bottom: 0; }

/* --- Links --- */
a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blue-dark); }

/* --- Navigation --- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    border-bottom: 3px solid var(--blue);
    height: var(--nav-height);
}

.nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo img {
    height: 36px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* --- Hero (Homepage) --- */
.hero {
    position: relative;
    color: #fff;
    padding: 6rem 1.5rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(27, 45, 69, 0.7), rgba(27, 45, 69, 0.85));
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-bottom: 0;
}

/* --- Page Hero (Rule pages) --- */
.page-hero {
    position: relative;
    color: #fff;
    padding: 4rem 1.5rem;
    text-align: center;
    overflow: hidden;
}

.page-hero .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-hero .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(27, 45, 69, 0.65), rgba(27, 45, 69, 0.8));
}

.page-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-hero .rule-number {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    padding: 0.35rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-hero h1 {
    color: #fff;
    font-size: 2.4rem;
    margin-bottom: 0;
}

/* --- Article Content --- */
.article {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.article-lead {
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
}

/* --- Image in content --- */
.content-image {
    margin: 2rem 0;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.content-image.float-right {
    float: right;
    margin: 0.5rem 0 1.5rem 2rem;
    max-width: 280px;
}

.content-image.float-right img {
    width: 100%;
}

/* --- Pullquote --- */
.pullquote {
    text-align: center;
    padding: 2rem 1.5rem;
    margin: 2.5rem 0;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.pullquote p {
    font-size: 1.35rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--navy);
    line-height: 1.5;
    margin-bottom: 0;
}

/* --- Rules Summary List --- */
.rules-list {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.rules-list li {
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    background: var(--blue-bg);
    border-left: 4px solid var(--blue);
    border-radius: 0 6px 6px 0;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--navy);
}

.rules-list li span {
    color: var(--blue);
    margin-right: 0.5rem;
}

/* --- Navigation between rules --- */
.rule-nav {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.rule-nav a {
    flex: 1;
    display: block;
    padding: 1rem 1.25rem;
    background: var(--blue-bg);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-align: center;
}

.rule-nav a:hover {
    background: var(--blue);
    color: #fff;
}

/* --- Download CTA --- */
.download-cta {
    background: var(--blue-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.download-cta img {
    width: 120px;
    height: auto;
    flex-shrink: 0;
}

.download-cta-text h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.download-cta-text p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.btn {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.5rem;
    border-radius: 5px;
    transition: background 0.2s;
}

.btn:hover { background: var(--blue-dark); color: #fff; }

/* --- Author Box --- */
.author-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    margin-top: 3rem;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.author-box img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-box .author-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.author-box .author-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.5;
}

/* --- Footer --- */
.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 2rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    line-height: 1.8;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}

.site-footer a:hover { color: #fff; }

.footer-logo {
    height: 28px;
    width: auto;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    html { font-size: 16px; }

    .hero { padding: 4rem 1.5rem; }
    .hero h1 { font-size: 2.2rem; }
    .page-hero { padding: 3rem 1.5rem; }
    .page-hero h1 { font-size: 1.8rem; }

    .nav-toggle { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links.open { display: flex; }

    .nav-links a { padding: 0.75rem 1rem; }

    .content-image.float-right {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }

    .download-cta {
        flex-direction: column;
        text-align: center;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .rule-nav {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .page-hero h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
}

/* --- Clearfix --- */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
