/* ========================================
   transactology.dev — Styles
   Pastoral romantic developer philosophy
   ======================================== */

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

:root {
    --deep-base: #1a1a2e;
    --primary-blue: #4a90d9;
    --warm-off-white: #f5f0e8;
    --accent-gold: #e8b84b;
    --muted-gray: #6c757d;
    --font-handwritten: 'Caveat', cursive;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--deep-base);
    background-color: var(--warm-off-white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Handwritten Class --- */
.handwritten {
    font-family: var(--font-handwritten);
}

/* --- Lens Flare Overlay --- */
.lens-flare {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(circle at var(--flare-x, 50%) var(--flare-y, 30%),
        rgba(232, 184, 75, 0.15) 0%,
        rgba(232, 184, 75, 0.05) 30%,
        transparent 60%);
}

.lens-flare.active {
    opacity: 1;
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#main-nav.scrolled {
    background-color: rgba(245, 240, 232, 0.95);
    box-shadow: 0 2px 20px rgba(26, 26, 46, 0.08);
    padding: 0.8rem 0;
    backdrop-filter: blur(10px);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-handwritten);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--deep-base);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--deep-base);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

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

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

/* --- Sections --- */
.section {
    position: relative;
    overflow: hidden;
}

.curve-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    display: block;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--deep-base) 0%, #16213e 40%, #0f3460 100%);
    padding: 8rem 2rem 10rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-kicker {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    color: var(--warm-off-white);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(245, 240, 232, 0.75);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.hero-cta {
    display: inline-block;
    font-family: var(--font-handwritten);
    font-size: 1.3rem;
    color: var(--accent-gold);
    text-decoration: none;
    border: 2px solid var(--accent-gold);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 1.1s forwards;
}

.hero-cta:hover {
    background-color: var(--accent-gold);
    color: var(--deep-base);
    transform: translateY(-2px);
}

.hero-glow {
    position: absolute;
    top: 15%;
    right: 10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 184, 75, 0.12) 0%, transparent 70%);
    pointer-events: none;
    animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

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

/* --- Philosophy Section --- */
.philosophy-section {
    background-color: var(--warm-off-white);
    padding: 8rem 2rem 10rem;
}

.editorial-container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.section-label.light {
    color: rgba(232, 184, 75, 0.8);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--deep-base);
    margin-bottom: 3rem;
    line-height: 1.1;
}

.section-title.light {
    color: var(--warm-off-white);
}

.editorial-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.editorial-main p {
    font-size: 1.1rem;
    color: #3a3a4e;
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.editorial-drop-cap::first-letter {
    font-family: var(--font-handwritten);
    font-size: 4rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
    color: var(--accent-gold);
}

.editorial-aside {
    padding-top: 1rem;
}

.handwritten-note {
    font-family: var(--font-handwritten);
    font-size: 1.8rem;
    color: var(--primary-blue);
    line-height: 1.4;
    border-left: 3px solid var(--accent-gold);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.aside-attribution {
    font-size: 0.85rem;
    color: var(--muted-gray);
    font-style: italic;
    padding-left: 1.5rem;
}

/* --- Craft Section --- */
.craft-section {
    background-color: var(--deep-base);
    padding: 8rem 2rem 10rem;
}

.craft-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.craft-card {
    background: rgba(245, 240, 232, 0.05);
    border: 1px solid rgba(245, 240, 232, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                background-color 0.5s ease,
                border-color 0.5s ease;
    cursor: default;
}

.craft-card:hover {
    transform: translateY(-6px);
    background: rgba(245, 240, 232, 0.08);
    border-color: rgba(232, 184, 75, 0.3);
}

.craft-card[data-morph="active"] {
    background: rgba(232, 184, 75, 0.08);
    border-color: rgba(232, 184, 75, 0.4);
}

.craft-icon {
    margin-bottom: 1.5rem;
}

.craft-card-title {
    font-family: var(--font-handwritten);
    font-size: 1.8rem;
    color: var(--warm-off-white);
    margin-bottom: 0.75rem;
}

.craft-card-text {
    font-size: 0.95rem;
    color: rgba(245, 240, 232, 0.65);
    line-height: 1.7;
}

/* --- Principles Section --- */
.principles-section {
    background-color: var(--warm-off-white);
    padding: 8rem 2rem 10rem;
}

.principles-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.principle-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(26, 26, 46, 0.1);
    transition: transform 0.4s ease, background-color 0.4s ease;
    cursor: default;
}

.principle-item:first-child {
    border-top: 1px solid rgba(26, 26, 46, 0.1);
}

.principle-item:hover {
    transform: translateX(8px);
}

.principle-item[data-morph="active"] {
    background-color: rgba(232, 184, 75, 0.05);
}

.principle-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
    min-width: 80px;
    flex-shrink: 0;
}

.principle-heading {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--deep-base);
    margin-bottom: 0.5rem;
}

.principle-content p {
    font-size: 1rem;
    color: var(--muted-gray);
    line-height: 1.7;
}

/* --- Journal Section --- */
.journal-section {
    background-color: var(--deep-base);
    padding: 8rem 2rem 10rem;
}

.journal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.journal-entry {
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(245, 240, 232, 0.08);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.journal-entry:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 184, 75, 0.3);
}

.journal-date {
    font-size: 1rem;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 1rem;
}

.journal-entry-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--warm-off-white);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.journal-excerpt {
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.6);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.journal-read-more {
    font-family: var(--font-handwritten);
    font-size: 1.1rem;
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.journal-read-more:hover {
    color: var(--accent-gold);
}

/* --- Connect Section --- */
.connect-section {
    background-color: var(--warm-off-white);
    padding: 8rem 2rem;
    text-align: center;
}

.connect-text {
    font-size: 1.2rem;
    color: #3a3a4e;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

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

.connect-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.connect-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 2px solid rgba(26, 26, 46, 0.15);
    border-radius: 50px;
    background-color: white;
    color: var(--deep-base);
    outline: none;
    transition: border-color 0.3s ease;
}

.connect-input:focus {
    border-color: var(--primary-blue);
}

.connect-button {
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    background-color: var(--deep-base);
    color: var(--warm-off-white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.connect-button:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
}

.connect-note {
    font-size: 1.1rem;
    color: var(--muted-gray);
    margin-top: 0.5rem;
}

/* --- Footer --- */
#site-footer {
    background-color: var(--deep-base);
    padding: 4rem 2rem 2rem;
    color: rgba(245, 240, 232, 0.6);
}

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

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--warm-off-white);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.5);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: rgba(245, 240, 232, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(245, 240, 232, 0.3);
    padding-top: 2rem;
    border-top: 1px solid rgba(245, 240, 232, 0.08);
}

/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .editorial-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .craft-grid {
        grid-template-columns: 1fr;
    }

    .journal-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .principle-item {
        gap: 1.2rem;
    }

    .principle-number {
        font-size: 2rem;
        min-width: 50px;
    }
}

@media (max-width: 600px) {
    .hero-section {
        padding: 6rem 1.5rem 8rem;
    }

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

    .connect-button {
        width: 100%;
    }

    .philosophy-section,
    .craft-section,
    .principles-section,
    .journal-section,
    .connect-section {
        padding: 5rem 1.5rem 7rem;
    }
}
