:root {
    --bg-canvas: #160f2e;
    --bg-surface: #2e1065;
    --text-primary: #ffffff;
    --text-muted: #e5d9f2;
    --accent-primary: #e0409b;
    --accent-secondary: #f59e0b;
    
    --font-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: system-ui, -apple-system, sans-serif;
    
    --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.5);
    --glow-accent: 0 0 24px -4px var(--accent-primary);
    --glass-backdrop: blur(12px);
}

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

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0;
    padding: 2rem;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.3s var(--ease-kinetic);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0;
}

/* Page Frame */
.page-frame {
    border: 1px solid var(--accent-primary);
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, rgba(46, 16, 101, 0.1) 0%, rgba(22, 15, 46, 0.5) 100%);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    position: relative; 
    z-index: 50;
    border-bottom: 1px solid rgba(224, 64, 155, 0.2);
}

.brand {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

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

.desktop-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-nav a {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-transform: uppercase;
}

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

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

.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--accent-primary);
    padding: 1rem 2rem;
    z-index: 40;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

/* Main Content Wrapper */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-color: var(--bg-canvas);
    background-image: 
        linear-gradient(rgba(224, 64, 155, 0.7), rgba(22, 15, 46, 0.9)),
        url('images/hero-irrigation-twilight.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.8;
}

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

.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--text-primary);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-secondary);
    border: 1px solid var(--accent-secondary);
    background: transparent;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.3s var(--ease-kinetic);
}

.btn:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 16px -4px var(--accent-secondary);
}

.btn-primary {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background: rgba(224, 64, 155, 0.1);
    box-shadow: 0 0 16px -4px var(--accent-primary);
}

/* Layouts & Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
}

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

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* Glassmorphic Cards (Tech Panels) */
.tech-panel {
    background: rgba(46, 16, 101, 0.6);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    padding: 2.5rem;
    transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
    position: relative;
    overflow: hidden;
}

.tech-panel:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-elevation), var(--glow-accent);
    border-color: rgba(224, 64, 155, 0.3);
}

.tech-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--accent-secondary);
}

.tech-panel.magenta-edge::before {
    background: var(--accent-primary);
}

.tech-panel img {
    margin-bottom: 1.5rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Round Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-canvas);
    border: 2px solid var(--accent-secondary);
    color: var(--accent-secondary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.badge.magenta {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Numeric Stat Strips */
.stat-strip {
    display: flex;
    gap: 2rem;
    background: rgba(22, 15, 46, 0.8);
    padding: 1.5rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Accordions */
.accordion {
    margin-top: 2rem;
}

.accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-header {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 1.5rem 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
}

.accordion-header:hover {
    color: var(--accent-primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-kinetic);
    color: var(--text-muted);
}

.accordion-content p {
    padding-bottom: 1.5rem;
    margin: 0;
}

/* Forms & Tools */
.tech-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tech-input {
    background: rgba(22, 15, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 0;
    transition: border-color 0.3s ease;
}

.tech-input:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

textarea.tech-input {
    min-height: 150px;
    resize: vertical;
}

.tool-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(46, 16, 101, 0.4);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
}

/* Footer */
footer {
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    padding: 3rem 2rem 1rem;
    margin-top: auto;
    background: var(--bg-canvas);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

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

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

.footer-legal {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-legal p {
    margin: 0.5rem 0;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s var(--ease-kinetic);
}

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

/* Responsive Overrides */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    .page-frame {
        min-height: calc(100vh - 2rem);
    }
    .desktop-nav {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    header {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
