/*
 * Imperial Restitution Press
 * A design system for the ages
 *
 * Color Philosophy:
 * - Deep obsidian blacks evoke the void, gravitas, authority
 * - Warm antiquarian golds speak to wealth, wisdom, empire
 * - Ivory and cream echo parchment, classical texts
 * - Burgundy accents: power, sacrifice, the blood of civilization
 */

/* ═══════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES - THE IMPERIAL PALETTE
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Primary Colors */
    --obsidian: #0a0a0a;
    --obsidian-light: #141414;
    --obsidian-lighter: #1a1a1a;
    --charcoal: #262626;
    --slate: #3d3d3d;
    --pewter: #6b6b6b;

    /* Accent Colors - The Imperial Gold */
    --gold: #c9a227;
    --gold-light: #d4b84a;
    --gold-pale: #e8d9a0;
    --gold-muted: #8b7355;

    /* Warm Neutrals */
    --ivory: #f5f2e8;
    --cream: #ebe6d6;
    --parchment: #d9d2c0;
    --sand: #c4bba8;

    /* Accent - Burgundy */
    --burgundy: #6b2d3a;
    --burgundy-light: #8b3d4a;

    /* Typography Scale - Perfect Fourth (1.333) */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.333rem;
    --text-2xl: 1.777rem;
    --text-3xl: 2.369rem;
    --text-4xl: 3.157rem;
    --text-5xl: 4.209rem;
    --text-6xl: 5.61rem;
    --text-7xl: 7.478rem;

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    --space-6xl: 12rem;

    /* Typography */
    --font-display: 'Cinzel', 'Times New Roman', serif;
    --font-heading: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Spectral', 'Georgia', serif;

    /* Shadows */
    --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(201, 162, 39, 0.15);

    /* Transitions */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;

    /* Layout */
    --max-width: 1400px;
    --content-width: 900px;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--ivory);
    background-color: var(--obsidian);
    overflow-x: hidden;
}

::selection {
    background-color: var(--gold);
    color: var(--obsidian);
}

/* Custom Scrollbar - Imperial Theme */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--obsidian);
    border-left: 1px solid var(--charcoal);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--charcoal) 0%, var(--slate) 50%, var(--charcoal) 100%);
    border: 2px solid var(--obsidian);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-muted) 0%, var(--gold) 50%, var(--gold-muted) 100%);
}

::-webkit-scrollbar-corner {
    background: var(--obsidian);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--slate) var(--obsidian);
}

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

/* Fallback for missing images */
img[src$=".jpg"]:not([src*="placeholder"]),
img[src$=".png"]:not([src*="placeholder"]) {
    background: var(--charcoal);
    min-height: 200px;
}

.book-cover img,
.related-cover img,
.portrait-frame img {
    background:
        linear-gradient(135deg, var(--obsidian-lighter) 0%, var(--charcoal) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section-number {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--gold);
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--ivory);
    margin-bottom: var(--space-xl);
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-lg) 0;
    transition: background-color var(--duration-normal) var(--ease-out),
                padding var(--duration-normal) var(--ease-out);
}

.nav.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.1);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-logo-mark {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--gold);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gold);
    transition: all var(--duration-normal) var(--ease-out);
}

.nav-logo:hover .nav-logo-mark {
    background-color: var(--gold);
    color: var(--obsidian);
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ivory);
}

.nav-links {
    display: flex;
    gap: var(--space-2xl);
}

.nav-link {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--parchment);
    position: relative;
    transition: color var(--duration-fast) var(--ease-out);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--gold);
    transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover {
    color: var(--ivory);
}

.nav-link:hover::after {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-5xl) var(--space-xl);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201, 162, 39, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(107, 45, 58, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--obsidian) 0%, var(--obsidian-light) 100%);
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
}

.hero-overline {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.5em;
    color: var(--gold-muted);
    margin-bottom: var(--space-2xl);
}

.hero-title {
    margin-bottom: var(--space-lg);
}

.hero-title-line {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(var(--text-4xl), 10vw, var(--text-7xl));
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1.1;
    color: var(--ivory);
}

.hero-title-accent {
    color: var(--gold);
    font-weight: 500;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.15em;
    color: var(--parchment);
    margin-bottom: var(--space-2xl);
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.hero-divider-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-muted), transparent);
}

.hero-divider-symbol {
    color: var(--gold);
    font-size: var(--text-sm);
}

.hero-description {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 300;
    line-height: 1.8;
    color: var(--sand);
    max-width: 600px;
    margin: 0 auto var(--space-3xl);
}

.hero-cta {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    transition: color var(--duration-normal) var(--ease-out);
}

.hero-cta:hover {
    color: var(--gold-light);
}

.hero-cta-arrow {
    width: 24px;
    height: 24px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
}

.hero-scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--gold-muted), transparent);
}

/* ═══════════════════════════════════════════════════════════════
   PHILOSOPHY SECTION
   ═══════════════════════════════════════════════════════════════ */

.philosophy {
    padding: var(--space-6xl) 0;
    background: linear-gradient(180deg, var(--obsidian-light) 0%, var(--obsidian) 100%);
    position: relative;
}

.philosophy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--charcoal), transparent);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-4xl);
}

.philosophy-heading {
    position: sticky;
    top: 120px;
    align-self: start;
}

.philosophy-quote {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 300;
    font-style: italic;
    line-height: 1.6;
    color: var(--parchment);
    padding-left: var(--space-xl);
    border-left: 2px solid var(--gold-muted);
    margin-bottom: var(--space-3xl);
}

.philosophy-text {
    margin-bottom: var(--space-3xl);
}

.philosophy-text p {
    font-size: var(--text-lg);
    color: var(--sand);
    margin-bottom: var(--space-lg);
}

.philosophy-text p:last-child {
    margin-bottom: 0;
}

.philosophy-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
}

.pillar {
    padding: var(--space-xl);
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid var(--charcoal);
    transition: all var(--duration-normal) var(--ease-out);
}

.pillar:hover {
    border-color: var(--gold-muted);
    background: rgba(201, 162, 39, 0.03);
}

.pillar-numeral {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--gold);
    margin-bottom: var(--space-md);
}

.pillar-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--ivory);
    margin-bottom: var(--space-sm);
}

.pillar-text {
    font-size: var(--text-sm);
    color: var(--pewter);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   CATALOG SECTION
   ═══════════════════════════════════════════════════════════════ */

.catalog {
    padding: var(--space-6xl) 0;
    background-color: var(--obsidian);
}

.catalog-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.catalog-intro {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 300;
    font-style: italic;
    color: var(--sand);
    max-width: 600px;
    margin: 0 auto;
}

.catalog-category {
    margin-bottom: var(--space-5xl);
}

.catalog-category:last-child {
    margin-bottom: 0;
}

.category-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-muted);
    margin-bottom: var(--space-3xl);
}

.category-line {
    flex: 1;
    max-width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--charcoal));
}

.category-title span:not(.category-line) {
    white-space: nowrap;
}

.category-line:last-child {
    background: linear-gradient(90deg, var(--charcoal), transparent);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-2xl);
}

.books-grid .book-card {
    max-width: 450px;
}

/* ═══════════════════════════════════════════════════════════════
   BOOK CARDS
   ═══════════════════════════════════════════════════════════════ */

.book-card {
    background: var(--obsidian-lighter);
    border: 1px solid var(--charcoal);
    transition: all var(--duration-slow) var(--ease-out);
}

.book-card:hover {
    border-color: var(--gold-muted);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.book-card-inner {
    display: flex;
    flex-direction: column;
}

.book-cover {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--charcoal);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}

.book-card:hover .book-cover img {
    transform: scale(1.03);
}

.book-cover-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 60%
    );
    pointer-events: none;
}

.book-info {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-category {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-muted);
    margin-bottom: var(--space-sm);
}

.book-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ivory);
    margin-bottom: var(--space-xs);
}

.book-author {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 400;
    color: var(--parchment);
    margin-bottom: var(--space-md);
}

.book-author-role {
    color: var(--pewter);
    font-style: italic;
}

.book-description {
    font-size: var(--text-sm);
    color: var(--sand);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    flex: 1;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: var(--pewter);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--charcoal);
    margin-bottom: var(--space-md);
}

.book-rating {
    color: var(--gold);
    letter-spacing: 2px;
}

.book-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.book-price {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--ivory);
}

.book-btn {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--gold);
    transition: all var(--duration-fast) var(--ease-out);
}

.book-btn:hover {
    background-color: var(--gold);
    color: var(--obsidian);
}

/* ═══════════════════════════════════════════════════════════════
   FEATURED QUOTE
   ═══════════════════════════════════════════════════════════════ */

.featured-quote {
    padding: var(--space-6xl) 0;
    background: linear-gradient(180deg, var(--obsidian) 0%, var(--obsidian-light) 50%, var(--obsidian) 100%);
    position: relative;
}

.grand-quote {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.grand-quote-mark {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 120px;
    font-weight: 300;
    color: var(--gold);
    opacity: 0.15;
    line-height: 1;
}

.grand-quote p {
    font-family: var(--font-heading);
    font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
    font-weight: 300;
    font-style: italic;
    line-height: 1.5;
    color: var(--ivory);
    margin-bottom: var(--space-2xl);
}

.grand-quote footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.grand-quote cite {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 500;
    font-style: normal;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.quote-source {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--pewter);
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════════ */

.about {
    padding: var(--space-6xl) 0;
    background-color: var(--obsidian);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-4xl);
}

.about-heading {
    position: sticky;
    top: 120px;
    align-self: start;
}

.about-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-3xl);
}

.about-portrait {
    position: sticky;
    top: 120px;
    align-self: start;
}

.portrait-frame {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border: 1px solid var(--charcoal);
}

.portrait-frame::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid var(--gold-muted);
    pointer-events: none;
    z-index: 1;
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) contrast(1.05);
}

.about-name {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--ivory);
    margin-bottom: var(--space-xs);
}

.about-role {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-style: italic;
    color: var(--gold);
    margin-bottom: var(--space-xl);
}

.about-bio p {
    font-size: var(--text-base);
    color: var(--sand);
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

.about-bio p:last-child {
    margin-bottom: var(--space-2xl);
}

.about-credentials {
    display: flex;
    gap: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--charcoal);
}

.credential {
    display: flex;
    flex-direction: column;
}

.credential-number {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 500;
    color: var(--gold);
    line-height: 1;
}

.credential-label {
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pewter);
    margin-top: var(--space-xs);
}

/* ═══════════════════════════════════════════════════════════════
   NEWSLETTER
   ═══════════════════════════════════════════════════════════════ */

.newsletter {
    padding: var(--space-5xl) 0;
    background: var(--obsidian-light);
    border-top: 1px solid var(--charcoal);
    border-bottom: 1px solid var(--charcoal);
}

.newsletter-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--ivory);
    margin-bottom: var(--space-md);
}

.newsletter-text {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--sand);
    margin-bottom: var(--space-2xl);
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: var(--space-md);
}

.newsletter-input {
    flex: 1;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--ivory);
    background: var(--obsidian);
    border: 1px solid var(--charcoal);
    padding: var(--space-md) var(--space-lg);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.newsletter-input::placeholder {
    color: var(--pewter);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--gold-muted);
}

.newsletter-btn {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--obsidian);
    background: var(--gold);
    padding: var(--space-md) var(--space-xl);
    transition: all var(--duration-fast) var(--ease-out);
}

.newsletter-btn:hover {
    background: var(--gold-light);
}

.newsletter-disclaimer {
    font-size: var(--text-xs);
    color: var(--pewter);
    margin-top: var(--space-md);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.footer {
    padding: var(--space-5xl) 0 var(--space-3xl);
    background: var(--obsidian);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-4xl);
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid var(--charcoal);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.footer-logo-mark {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gold);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gold-muted);
}

.footer-logo-text {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--ivory);
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--pewter);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
}

.footer-heading {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-muted);
    margin-bottom: var(--space-lg);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: var(--space-sm);
}

.footer-col a {
    font-size: var(--text-sm);
    color: var(--sand);
    transition: color var(--duration-fast) var(--ease-out);
}

.footer-col a:hover {
    color: var(--ivory);
}

.footer-bottom {
    padding-top: var(--space-2xl);
    text-align: center;
}

.footer-copyright {
    font-size: var(--text-xs);
    color: var(--pewter);
    margin-bottom: var(--space-sm);
}

.footer-latin {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--slate);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .philosophy-grid,
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .philosophy-heading,
    .about-heading {
        position: relative;
        top: 0;
    }
}

@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-portrait {
        position: relative;
        top: 0;
        max-width: 280px;
    }

    .philosophy-pillars {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-6xl: 6rem;
        --space-5xl: 5rem;
        --space-4xl: 4rem;
    }

    .nav-logo-text {
        display: none;
    }

    .nav-links {
        gap: var(--space-lg);
    }

    .hero {
        padding: var(--space-4xl) var(--space-lg);
    }

    .section-title {
        font-size: var(--text-3xl);
    }

    .books-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .form-group {
        flex-direction: column;
    }

    .about-credentials {
        flex-wrap: wrap;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-lg);
    }

    .hero-title-line {
        font-size: var(--text-4xl);
    }

    .grand-quote p {
        font-size: var(--text-xl);
    }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

/* Intersection Observer animations will be handled by JS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
