/* ===== subterra penitus farming — STYLES ===== */
/* Colors: Earthy palette with gold/teal accents matching TSF branding */

:root {
    --bg: #0d1117;
    --bg-dark: #06090d;
    --bg-card: #131922;
    --bg-card-hover: #1a2230;
    --text: #e6edf3;
    --text-muted: #8b96a5;
    --text-dim: #5d6671;
    --gold: #d4a843;
    --gold-light: #e8c068;
    --teal: #2d9a8c;
    --teal-light: #4ec5b5;
    --sage: #7a9b6e;
    --sage-light: #9bc09a;
    --border: #1e2632;
    --border-light: #2a3543;
    --radius: 14px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1100px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-head: 'Inter', sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== NAVIGATION ===== */
#nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
#nav.scrolled { border-bottom-color: var(--border-light); }

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

.nav-logo { display: flex; align-items: center; gap: 10px; }

.nav-logo-circle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid var(--gold);
    font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
    color: var(--gold);
}

.nav-logo-name {
    font-size: 14px; font-weight: 700; letter-spacing: 2px;
    color: var(--text);
}

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }

.nav-cta {
    background: var(--gold); color: var(--bg-dark) !important;
    padding: 8px 18px; border-radius: var(--radius-sm);
    font-weight: 600 !important;
}
.nav-cta:hover { background: var(--gold-light); color: var(--bg-dark) !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span {
    display: block; width: 24px; height: 2px; margin: 5px 0;
    background: var(--text); transition: var(--transition);
}

/* ===== HERO ===== */
#hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(45, 154, 140, 0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(212, 168, 67, 0.08) 0%, transparent 50%),
                linear-gradient(180deg, var(--bg-dark) 0%, var(--bg) 100%);
}

.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(45, 154, 140, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 154, 140, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask: linear-gradient(180deg, transparent 0%, black 40%, black 60%, transparent 100%);
}

.hero-content {
    position: relative; z-index: 1; text-align: center;
    max-width: 760px; padding: 120px 24px 80px;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(45, 154, 140, 0.1); border: 1px solid rgba(45, 154, 140, 0.3);
    padding: 6px 16px; border-radius: 100px;
    font-size: 13px; font-weight: 500; color: var(--teal-light);
    margin-bottom: 28px;
}

.hero-badge-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--teal-light); box-shadow: 0 0 12px var(--teal-light);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

.hero-content h1 {
    font-size: clamp(28px, 5vw, 52px); font-weight: 800;
    line-height: 1.15; letter-spacing: -1px; margin-bottom: 24px;
}

.hero-sub {
    font-size: 17px; color: var(--text-muted);
    line-height: 1.7; margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 64px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 28px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: var(--transition); border: none;
}
.btn-primary { background: var(--gold); color: var(--bg-dark); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212, 168, 67, 0.25); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn-ghost:hover { border-color: var(--text-muted); background: rgba(255,255,255,0.04); }
.btn-full { width: 100%; }

.hero-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    padding-top: 40px; border-top: 1px solid var(--border);
}

.hero-stat { display: flex; flex-direction: column; gap: 4px; }
.hero-stat-num { font-size: 28px; font-weight: 800; color: var(--gold); }
.hero-stat-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; }

/* ===== SECTIONS ===== */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-dark); }

.section-label {
    display: inline-block; font-size: 12px; font-weight: 700;
    letter-spacing: 2px; color: var(--teal-light);
    margin-bottom: 12px; text-transform: uppercase;
}

.section h2 {
    font-size: clamp(24px, 3.5vw, 38px); font-weight: 700;
    line-height: 1.25; letter-spacing: -0.5px; margin-bottom: 16px;
}

.section-sub {
    font-size: 16px; color: var(--text-muted);
    margin-bottom: 48px; max-width: 600px;
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
    align-items: center; margin-top: 40px;
}
.about-text p { margin-bottom: 20px; color: var(--text-muted); font-size: 16px; }
.about-text p:first-child { color: var(--text); font-size: 18px; }

.about-image-placeholder {
    aspect-ratio: 4/3; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--bg-card) 0%, #1a1e28 100%);
    border: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
}
.about-icon { font-size: 48px; opacity: 0.6; }
.about-image-placeholder > span:nth-child(2) { font-size: 18px; font-weight: 600; }
.about-image-sub { font-size: 13px; color: var(--text-dim); }

/* ===== HOW IT WORKS ===== */
.how-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
    margin-top: 48px;
}
.how-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px 24px;
    transition: var(--transition);
}
.how-card:hover { background: var(--bg-card-hover); border-color: var(--teal); transform: translateY(-4px); }
.how-num { font-size: 14px; font-weight: 800; color: var(--teal); margin-bottom: 16px; }
.how-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.how-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ===== PRODUCTS ===== */
.product-tabs {
    display: flex; gap: 8px; margin-bottom: 32px;
}
.product-tab {
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted); padding: 10px 24px; border-radius: 100px;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.product-tab.active { background: var(--gold); color: var(--bg-dark); border-color: var(--gold); }
.product-tab:hover:not(.active) { border-color: var(--border-light); color: var(--text); }

.product-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

.product-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 24px;
    transition: var(--transition);
}
.product-card:hover { background: var(--bg-card-hover); border-color: var(--sage); }
.product-card-icon { font-size: 32px; margin-bottom: 16px; }
.product-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.product-card p { font-size: 14px; color: var(--text-muted); }
.product-card .product-tag {
    display: inline-block; font-size: 11px; font-weight: 700;
    letter-spacing: 1px; color: var(--sage-light);
    margin-top: 12px; padding: 4px 10px; border-radius: 4px;
    background: rgba(122, 155, 110, 0.12);
}

/* ===== ADVANTAGE ===== */
.advantage-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    margin-top: 48px;
}
.advantage-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 24px;
    transition: var(--transition);
}
.advantage-card:hover { background: var(--bg-card-hover); border-color: var(--gold); transform: translateY(-4px); }
.advantage-icon { font-size: 28px; margin-bottom: 14px; }
.advantage-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.advantage-card p { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* ===== WE BEAT ===== */
#we-beat h2 { margin-bottom: 48px; }
.rotate-text { color: var(--gold); transition: var(--transition); }

.beat-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.beat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 24px;
    text-align: center; transition: var(--transition);
}
.beat-card:hover { border-color: var(--gold); }
.beat-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.8px; }
.beat-value { display: block; font-size: 28px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.beat-vs { font-size: 12px; color: var(--text-dim); }

/* ===== CONTACT ===== */
.contact-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.contact-form { margin-top: 40px; text-align: left; }
.form-row { margin-bottom: 16px; }
.form-row:first-child { display: flex; gap: 12px; }
.form-row:first-child input { flex: 1; }

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%; padding: 13px 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-family: var(--font-body); font-size: 15px;
    transition: var(--transition);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-dim); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--teal);
}
.contact-form select { cursor: pointer; }
.contact-form select option { background: var(--bg-card); }

.form-note { font-size: 14px; color: var(--teal-light); margin-top: 12px; text-align: center; min-height: 20px; }

.contact-direct { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.contact-direct p { font-size: 14px; color: var(--text-dim); margin-bottom: 8px; }
.contact-direct a { color: var(--gold); font-weight: 600; }

/* ===== FOOTER ===== */
footer { background: var(--bg-dark); border-top: 1px solid var(--border); padding: 60px 0 30px; }
.footer-inner {
    display: flex; justify-content: space-between; gap: 64px;
    margin-bottom: 40px;
}
.footer-brand { max-width: 280px; }
.footer-brand p { font-size: 13px; color: var(--text-dim); margin-top: 16px; line-height: 1.6; }
.footer-links { display: flex; gap: 64px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.footer-col a:hover { color: var(--text); }

.footer-bottom { padding-top: 24px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 13px; color: var(--text-dim); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg-dark); padding: 20px; border-bottom: 1px solid var(--border); gap: 20px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }

    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }

    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .how-grid { grid-template-columns: repeat(2, 1fr); }
    .advantage-grid { grid-template-columns: repeat(2, 1fr); }
    .beat-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }

    .footer-inner { flex-direction: column; gap: 32px; }
    .footer-links { gap: 40px; }
}

@media (max-width: 600px) {
    .hero-actions { flex-direction: column; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .how-grid, .advantage-grid, .beat-grid, .product-grid { grid-template-columns: 1fr; }
    .form-row:first-child { flex-direction: column; }
    .section { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
