/* ==========================================================================
   CSS VARIABLES & GLOBAL RESET 
   Ahrefs Brand Theme (Dark Blue & Orange) / 18px Base Font Size
   ========================================================================== */
:root {
    /* Main Backgrounds */
    --bg-main: #ffffff;
    --bg-muted: #f8f9fa; /* Slightly cooler muted tone */
    
    /* Ahrefs Brand Colors */
    --accent-orange: #f25b22; /* Ahrefs signature orange */
    --accent-orange-hover: #d94d1a;
    --accent-blue: #0d3151; /* Ahrefs deep navy blue */
    --accent-blue-hover: #082136;
    
    /* Typography */
    --text-main: #121c2d;
    --text-muted: #475569;
    
    /* Structural UI */
    --border-color: #e2e8f0;
    --border-radius: 2px; /* Strict 2px requirement */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    
    /* Layout */
    --container-width: 1100px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 18px; /* INCREASED BASE FONT SIZE BY 1px for desktop focus */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.65;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   TYPOGRAPHY & LINKS
   ========================================================================== */
h1, h2, h3, h4, h5 {
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-top: 2.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }

p { margin-bottom: 1.5rem; color: var(--text-muted); }

a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover { color: var(--accent-orange-hover); }

.text-orange { color: var(--accent-orange); }
.text-center { text-align: center; }

/* ==========================================================================
   LAYOUT CONTAINERS & UTILITIES
   ========================================================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
    scroll-margin-top: var(--header-height);
}

.bg-muted { 
    background-color: var(--bg-muted); 
    border-top: 1px solid var(--border-color); 
    border-bottom: 1px solid var(--border-color); 
}

.section-header { text-align: center; max-width: 750px; margin: 0 auto 3.5rem auto; }

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

.btn-primary {
    background-color: var(--accent-orange);
    color: #ffffff;
}
.btn-primary:hover { 
    background-color: var(--accent-orange-hover); 
    color: #ffffff; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(242, 91, 34, 0.3);
}

.btn-secondary {
    background-color: var(--accent-blue);
    color: #ffffff;
}
.btn-secondary:hover { 
    background-color: var(--accent-blue-hover); 
    color: #ffffff; 
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}
.btn-outline:hover {
    background-color: var(--bg-muted);
}

.full-width { width: 100%; }

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background-color: #ffe8e0;
    color: var(--accent-orange);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   HEADER & LOGO TEXT
   ========================================================================== */
.ahrefs-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Logo as Text */
.logo {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--accent-blue);
    letter-spacing: -0.5px;
}
.logo span {
    color: var(--accent-orange);
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a { 
    color: var(--text-main); 
    font-weight: 600; 
    font-size: 0.95rem; 
}
.nav-links a:hover { color: var(--accent-orange); }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding-top: calc(var(--header-height) + 7rem);
    padding-bottom: 7rem;
    text-align: center;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.hero-content { max-width: 850px; margin: 0 auto; }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 2.5rem; color: var(--text-main); }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   EXPERT TAKE (Human Touch)
   ========================================================================== */
.expert-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-orange);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    max-width: 900px;
    margin: 0 auto;
}

.expert-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.expert-avatar {
    width: 60px;
    height: 60px;
    background: var(--accent-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 50%;
}

.expert-header h3 { margin: 0; font-size: 1.4rem; }
.expert-title { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); }
.expert-body p:last-child { margin-bottom: 0; }

/* ==========================================================================
   ACTUAL DEAL BOX (Ahrefs Offer)
   ========================================================================== */
.ahrefs-deal-box {
    display: flex;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.deal-content {
    flex: 2;
    padding: 3rem;
}

.deal-content h3 { margin-top: 0; color: var(--accent-blue); }

.feature-list { list-style: none; margin-top: 1.5rem; padding-left: 0; }
.feature-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}
.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: bold;
    font-size: 1.1rem;
}

.deal-action {
    flex: 1;
    background: var(--bg-muted);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 1px solid var(--border-color);
    text-align: center;
}

.price-block { margin-bottom: 2rem; }
.save-text { display: block; font-size: 2.5rem; font-weight: 800; color: var(--accent-blue); line-height: 1; margin-bottom: 0.5rem; }
.duration { font-size: 1.1rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }

/* ==========================================================================
   DEALS GRID (Alternatives)
   ========================================================================== */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.deal-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.deal-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.featured-deal { border: 2px solid var(--accent-orange); }

.deal-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #ffe8e0;
    color: var(--accent-orange);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    width: max-content;
}

.deal-badge.budget { background: #e0f2fe; color: #0284c7; }
.deal-badge.agency { background: #f1f5f9; color: var(--accent-blue); }

.deal-desc { font-size: 1rem; flex-grow: 1; margin-bottom: 1.5rem; }

.feature-list-mini {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-muted);
    padding: 1.25rem;
    border-radius: var(--border-radius);
}

.deal-pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.old-price { text-decoration: line-through; color: #94a3b8; font-size: 1rem; }
.new-price { font-size: 1.75rem; font-weight: 800; }

/* ==========================================================================
   CONTENT HEAVY (Deep Dive)
   ========================================================================== */
.content-wrapper { max-width: 850px; margin: 0 auto; }
.content-heavy p { font-size: 1.1rem; }

/* ==========================================================================
   FAQ GRID
   ========================================================================== */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.faq-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.faq-card h4 { margin-bottom: 1rem; font-size: 1.2rem; }
.faq-card p { margin-bottom: 0; font-size: 1rem; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.compact-footer {
    background: var(--accent-blue);
    color: #f1f5f9;
    padding: 4rem 0 2rem 0;
}

.compact-footer h5 { color: #ffffff; }
.compact-footer p { color: #cbd5e1; font-size: 0.9rem; }
.compact-footer a { color: var(--accent-orange); }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    html { font-size: 16px; } /* Drop back down on mobile to prevent overflow */
    .nav-links { display: none; }
    .hero { padding-top: calc(var(--header-height) + 3rem); padding-bottom: 4rem; }
    .ahrefs-deal-box { flex-direction: column; }
    .deal-action { border-left: none; border-top: 1px solid var(--border-color); }
    .faq-grid { grid-template-columns: 1fr; }
}