/* Hyptec Design System - Premium Editorial Lab */

:root {
    /* Color Palette - Elementor Light Gradient Style */
    --bg-primary: #fdfbfd;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.1);

    --text-primary: #121212;
    --text-secondary: #4a4a4a;
    --text-muted: #787878;

    /* The Gradient */
    --gradient-bg: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%), radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    --gradient-light: radial-gradient(at top left, #fceeff, #f5f5f7);

    --accent-color: #000000;
    --accent-glow: rgba(0, 0, 0, 0.1);

    --border-color: rgba(0, 0, 0, 0.05);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --radius-pill: 9999px;

    /* Typography */
    --font-heading: 'DM Serif Display', serif;
    /* The "Elementor" Headline font */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Merriweather', 'Georgia', serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 5rem;
    --space-xl: 10rem;

    /* Layout */
    --max-width: 1200px;
    --header-height: 90px;
}

[data-theme="dark"] {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-glass: rgba(10, 10, 10, 0.5);
    --gradient-light: none;
    /* or a dark gradient */

    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #525252;
    --border-color: #262626;
    --accent-color: #ffffff;
}

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

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

body {
    background: var(--bg-primary);
    background-image: var(--gradient-light);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-top: var(--header-height);
    /* Offset for fixed header */
}

[data-theme="dark"] body {
    background-image: none;
    /* Can add dark blob if wanted */
    background-color: var(--bg-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    /* Serif usually looks better regular */
    line-height: 1.1;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

h1 {
    font-size: clamp(3.5rem, 8vw, 6rem);
    /* Massive headlines */
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    max-width: 65ch;
    font-size: 1.1rem;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--text-primary);
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-color);
}

/* Remove last border if needed, or keep for structure */

.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Header & Nav - Floating Glass */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    padding: 1rem 0;
    transition: background 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    /* Clean header like image */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0 2rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
    border: none;
    /* Softer shadow for light mode */
}

[data-theme="dark"] header .container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
}

.logo {
    font-family: var(--font-sans);
    /* Usually bold sans logo */
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    text-transform: uppercase;
}

nav ul {
    display: flex;
    gap: 2.5rem;
}

nav a {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

nav a:hover {
    opacity: 0.6;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section - Centered */
.hero {
    padding: var(--space-xl) 0 var(--space-lg) 0;
    min-height: 90vh;
    /* Taller hero */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('images/hero-bg.svg');
    /* SVG BG */
    background-size: cover;
    background-position: center;
}

.hero h1 {
    max-width: 18ch;
    background: none;
    /* Remove gradient text for solid impact */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: initial;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.hero p.subtitle {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 60ch;
    margin: 0 auto var(--space-lg) auto;
    line-height: 1.6;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    border-radius: var(--radius-sm);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    background: var(--text-primary);
    /* Keep black/white */
    color: var(--bg-primary);
}

/* Intro Block */
.intro-block {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.4;
    color: var(--text-primary);
    padding: var(--space-lg) 0;
    border: none;
    max-width: 900px;
    margin: 0 auto;
}

/* Cards (Signals, Analysis, etc.) */
.card {
    background: var(--bg-secondary);
    /* Solid background */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    /* Remove padding for full-bleed image */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    align-items: flex-start;
    /* Left align card content */
    text-align: left;
}

.card-image {
    width: 100%;
    height: 200px;
    /* Fixed height for thumb */
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    border-color: transparent;
    background: var(--bg-secondary);
}

.card-tag {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-primary);
    background: transparent;
    padding: 0;
    margin-bottom: var(--space-sm);
    text-transform: none;
    /* Keep natural case */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Add an icon spacer to tag */
.card-tag::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: currentPage;
    background: var(--text-primary);
    border-radius: 50%;
}

.card h3 {
    font-family: var(--font-sans);
    /* Sans headings for cards often */
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.card-meta {
    margin-top: var(--space-md);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-xl);
}

footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-col h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-col a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.copyright {
    margin-top: var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
}

/* Manifesto Specific */
.manifesto-content {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.manifesto-content p {
    margin-bottom: var(--space-md);
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-primary);
        /* Solid background to cover content */
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center items vertically */
        align-items: center;
        opacity: 0;
        pointer-events: none;
        /* Prevent clicks when closed */
    }

    nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    nav a {
        font-size: 1.25rem;
        font-weight: 600;
        display: block;
        padding: 0.25rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .card-image {
        height: auto;
        aspect-ratio: 16/9;
    }

    footer .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-col {
        width: 100%;
        margin-bottom: var(--space-md);
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .intro-block {
        font-size: 1.5rem;
    }
}

/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.form-input,
.form-textarea {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: var(--bg-secondary);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
    border-radius: var(--radius-lg);
}

.form-submit-btn {
    align-self: flex-start;
    padding: 1rem 2.5rem;
    background: var(--text-primary);
    border: 1px solid var(--text-primary);
    color: var(--bg-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    letter-spacing: 0.05em;
}

.form-submit-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.form-checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.form-checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    accent-color: var(--text-primary);
    width: 1.2rem;
    height: 1.2rem;
}

.form-checkbox-group label {
    margin-left: 0;
    font-size: 0.9rem;
    text-transform: none;
    font-weight: 400;
    cursor: pointer;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 90;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}