@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Playfair+Display:wght@700&display=swap');

/* --- Global Styles & Variables --- */
:root {
    --bg-color: #1A1A1A;
    --text-color: #F5F5F5;
    --accent-color: #D4AF37;
    --border-color: #444444;
    --card-bg-color: #222222;
    --substack-orange: #FF6719;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-image: linear-gradient(rgba(26, 26, 26, 0.7), rgba(26, 26, 26, 0.90)), url('images/moat-background.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: #ccc;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

/* --- Header & Navigation --- */
.main-header {
    position: sticky;
    top: 0;
    background-color: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    width: 100%;
    z-index: 100;
    height: 80px;
}

.logo {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.logo a {
    display: block;
}

.logo img {
    height: 55px;
    width: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-color);
}

.main-nav a.nav-link-accent {
    color: var(--accent-color);
    font-weight: 700;
}
.main-nav a.nav-link-accent:hover {
    opacity: 0.8; /* Slightly fade on hover for feedback */
}

.nav-button-substack {
    background-color: var(--substack-orange);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: opacity 0.3s ease;
}

.nav-button-substack:hover {
    opacity: 0.9;
}

.super-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2.3rem;
    color: #7a7a7a;
    text-transform: uppercase;
    letter-spacing: 18px;
    margin-bottom: 5rem;
    opacity: 0.4;
}

/* --- Hero Section --- */
.hero {
    height: 90vh;
    display: flex;
    align-items: flex-start; /* This aligns content to the top */
    padding-top: 13vh; /* NEW: Pushes the content down from the top */
    justify-content: center;
    text-align: center;
    padding-left: 2rem;
    padding-right: 2rem;
    overflow: hidden;
}

.headline-white {
    color: #cccccc; 
}

.headline-gold {
    color: var(--accent-color);
}

.accent-text {
    color: var(--accent-color);
    font-weight: 700;
}

/* === NEW: Style for the final tagline in the hero === */
.tagline {
    display: block;
    margin-top: 5rem; /* Adds a little space above it */
    font-weight: 700;
    color: #aaa;
}
.hero-background-motif {
    position: absolute;
    top: 10%; /* === THIS IS THE ONLY LINE THAT WAS CHANGED === */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background-image: url('images/hated-moats-logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 4.2rem;
    margin-bottom: 5rem;
    text-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    max-width: 45ch;
    margin-left: auto;
    margin-right: auto;
    color: #ccc;
    line-height: 1.8;
}

.subscriber-count {
    display: block;
    margin-top: 0.5rem;
    font-weight: 700;
    color: #aaa;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center; /* Aligns buttons vertically */
    gap: 1rem;
    margin-top: 4rem;
}

.cta-button {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    border: 2px solid;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

/* === UPDATED: Primary button is now larger === */
.cta-button.primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0px 0px 20px rgba(212, 175, 55, 0.3);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0px 5px 25px rgba(212, 175, 55, 0.4);
}

/* === UPDATED: Secondary button is now more subtle === */
.cta-button.secondary {
    background-color: transparent;
    border-color: #444; /* More subtle border */
    color: #888; /* More subtle text */
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.cta-button.secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.cta-button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.accent-link {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.5);
    transition: text-decoration-color 0.3s ease;
}

.accent-link:hover {
    text-decoration-color: var(--accent-color);
}


/* --- "What You'll Get" Section --- */
.features-section {
    padding: 2rem 2rem;
    background-color: var(--card-bg-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-subtitle {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 3rem; /* Increased space */
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem; /* Increased space */
    max-width: 1100px;
    margin: 0 auto;
}

.feature-item {
    flex-basis: 330px; /* Base width for each card */
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.feature-item h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.feature-item p {
    font-size: 1rem;
    max-width: 35ch;
    color: #aaa;
}

/* Add this new rule */
.feature-item .accent-title {
    color: var(--accent-color);
}

/* --- General Content Layout --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.page-section {
    padding-top: 5rem;
    margin-bottom: 4rem;
    text-align: center;
}

.page-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.placeholder-text {
    font-size: 1.1rem;
    font-style: italic;
    color: #888;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid var(--border-color);
}

/* --- Utility Components --- */
.back-to-top-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top-button.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero .fade-in-element:nth-child(1) { transition-delay: 0.2s; }
.hero .fade-in-element:nth-child(2) { transition-delay: 0.4s; }
.hero .fade-in-element:nth-child(3) { transition-delay: 0.6s; }

/* === NEW: Dedicated CTA Section === */
.cta-section {
    padding: 4rem 2rem;
    background-color: var(--bg-color); /* Matches the main background for a seamless feel */
    text-align: center;
}

.cta-section h3 {
    font-size: 2.2rem;
    color: var(--text-color);
}

.cta-section p {
    color: #aaa;
    margin-bottom: 2rem;
}

.inline-form {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.inline-form input {
    background-color: #333;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
}

.inline-form button {
    padding: 0.75rem 1.5rem;
    box-shadow: none;
}

/* === NEW: Slide-in CTA Styles === */
.slide-in-cta {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 350px;
    z-index: 999;

    /* Hide by default */
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.8, 1);
}

.slide-in-cta.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.slide-in-cta h4 {
    color: var(--text-color);
    font-size: 1.2rem;
}

.slide-in-cta p {
    font-size: 0.9rem;
    color: #aaa;
}

.slide-in-cta .inline-form {
    flex-direction: column;
    align-items: stretch;
}

.slide-in-cta .inline-form button {
    padding: 0.7rem;
}

.close-button-slide-in {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
}