/* BASE PALETTE & VARIABLES */
:root {
    --base: #1e2530;
    --surface: #2c3646;
    --surface-hover: #354254;
    --text-primary: #ffffff;
    --text-muted: #b0b8c4;
    --accent: #a3e635;
    --border: #425066;

    --font-stack: Charter, Cambria, Georgia, serif;
    
    --radius-square: 0;
    --radius-round: 50%;
    
    --ease-kinetic: cubic-bezier(0.22, 0.61, 0.36, 1);
    --duration: 400ms;
}

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

html {
    lang: en;
    font-size: 100%;
    overflow-wrap: anywhere;
    hyphens: auto;
}

body {
    background-color: var(--base);
    color: var(--text-primary);
    font-family: var(--font-stack);
    line-height: 1.7;
    position: relative;
    /* Large, highly diffused radial gradient of the lime accent */
    background-image: radial-gradient(circle at 50% 10%, rgba(163, 230, 53, 0.04) 0%, transparent 60%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-top: 3rem; }
h3 { font-size: 1.5rem; margin-top: 2rem; }

p, ul, ol, table {
    margin-bottom: 1.5rem;
}

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

a:hover, a:focus {
    color: #bbf771;
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-square);
    background-color: var(--surface);
}

.label, .small-caps {
    font-variant: small-caps;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* HEADER & NAVIGATION */
header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    background-color: var(--base);
}

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

/* Strict left-aligned brand overriding style direction centered rule */
.brand {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border: none;
}
.brand:hover { text-decoration: none; color: var(--accent); }

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

.desktop-nav a {
    color: var(--text-muted);
    font-variant: small-caps;
    text-transform: lowercase;
    font-size: 1.2rem;
}

.desktop-nav a:hover, .desktop-nav a[aria-current="page"] {
    color: var(--accent);
    text-decoration: none;
}

.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;
    padding: 1rem 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.mobile-menu.open {
    display: flex;
}
.mobile-menu a {
    padding: 0.75rem 0;
    font-variant: small-caps;
    text-transform: lowercase;
    font-size: 1.2rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* LAYOUT ARCHITECTURE */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.content-wrapper {
    max-width: 72ch;
    margin: 0 auto;
}

.hero {
    text-align: left;
    margin-bottom: 5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.lead-block {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
}

/* 2-COLUMN GRID (Content Blocks) */
.two-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

/* CARDS */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-square);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-img-container {
    position: relative;
    border-bottom: 1px solid var(--border);
}

.card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius-square);
}

/* Round label badge overlapping bottom edge */
.card-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 40px;
    height: 40px;
    background-color: var(--accent);
    color: var(--base);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    border: 2px solid var(--base);
}

.card-content {
    padding: 2.5rem 1.5rem 1.5rem;
    flex-grow: 1;
}

/* BUTTONS */
.btn {
    display: inline-block;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    border-radius: var(--radius-square);
    cursor: pointer;
    text-align: center;
    transition: all var(--duration) var(--ease-kinetic);
}

.btn:hover, .btn:focus {
    background: var(--accent);
    color: var(--base);
    text-decoration: none;
}

/* TABLES (Small-caps list tables) */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-variant: small-caps;
    text-transform: lowercase;
}
th, td {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0.5rem;
    text-align: left;
}
th {
    color: var(--text-muted);
}

/* TOOLS (Spice Ratio Calculator) */
.tool-panel {
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    margin: 3rem 0;
}
.tool-group {
    margin-bottom: 1.5rem;
}
.tool-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-variant: small-caps;
    text-transform: lowercase;
    color: var(--accent);
}
.tool-group input {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--base);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-stack);
    border-radius: var(--radius-square);
}
.tool-group input:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}
.output-box {
    background-color: var(--base);
    border: 1px solid var(--border);
    padding: 1rem;
    min-height: 100px;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9rem;
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
    background-color: var(--base);
    margin-top: 4rem;
}

.footer-split {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.footer-left p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-right nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.footer-right nav a {
    font-variant: small-caps;
    text-transform: lowercase;
    color: var(--text-muted);
}
.footer-right nav a:hover {
    color: var(--accent);
}

/* UTILITIES & ANIMATIONS */
.reveal {
    opacity: 0;
    transition: opacity 600ms var(--ease-kinetic);
}
.reveal-visible {
    opacity: 1;
}

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-toggle { display: block; }
    .footer-split { grid-template-columns: 1fr; gap: 2rem; }
    .two-col-grid { grid-template-columns: 1fr; }
}

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