:root {
    --base: #3b0d1a;
    --surface: #4e1424;
    --text: #fdfbf7;
    --text-muted: #d9cbb2;
    --accent: #e8d5a8;
    
    --font-head: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
    
    --ease-kinetic: cubic-bezier(0.22, 0.61, 0.36, 1);
    --duration: 400ms;
}

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--base);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }

p { margin-bottom: 1.5rem; }
a { color: var(--accent); text-decoration: none; }

/* Interactive States */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.long-form {
    max-width: 68ch;
    margin: 0 auto;
}

.section-pad {
    padding: 6rem 0;
}

/* Header */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    background: transparent;
    transition: background-color var(--duration) var(--ease-kinetic);
}

.site-header.scrolled {
    background-color: var(--base);
    border-bottom: 1px solid var(--surface);
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand svg {
    width: 24px;
    height: 24px;
    fill: var(--accent);
}

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

.desktop-nav a {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width var(--duration) var(--ease-kinetic);
}

.desktop-nav a:hover::after,
.desktop-nav a[aria-current="page"]::after {
    width: 100%;
}

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

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--surface);
    border-bottom: 1px solid var(--accent);
    padding: 1rem 0;
}

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

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li {
    padding: 0.5rem 5%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--base);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent);
}

.btn-link {
    color: var(--accent);
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    padding: 0;
    text-transform: none;
    font-weight: 600;
    font-size: 1rem;
}

.btn-link:hover {
    border-bottom-color: var(--accent);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 12rem 0 8rem;
    background-color: var(--base);
    overflow: hidden;
}

.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    opacity: 0.4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 60%;
}

.hero-metrics {
    position: relative;
    z-index: 5;
    margin-top: -4rem;
    background: var(--surface);
    border: 1px solid var(--accent);
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.metric {
    border-left: 1px solid var(--accent);
    padding-left: 1rem;
}

.metric strong {
    display: block;
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 800;
}

.metric span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Diagonal Sections */
.sect-diagonal {
    position: relative;
    z-index: 1;
    padding: 8rem 0;
    margin: -4rem 0;
    background-color: var(--surface);
    clip-path: polygon(0 4rem, 100% 0, 100% calc(100% - 4rem), 0 100%);
}

.sect-straight {
    padding: 6rem 0;
    background-color: var(--base);
    position: relative;
    z-index: 2;
}

/* Cards */
.card-flat {
    background-color: var(--surface);
    border: 1px solid var(--accent);
    padding: 2rem;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-flat img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 1px solid var(--accent);
    background-color: var(--base);
}

.card-flat h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* Tabs */
.tabs-container {
    border: 1px solid var(--accent);
    background: var(--surface);
}

.tab-list {
    display: flex;
    border-bottom: 1px solid var(--accent);
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    border-right: 1px solid var(--accent);
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    font-family: var(--font-head);
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.tab-btn[aria-selected="true"] {
    background: var(--accent);
    color: var(--base);
}

.tab-panel {
    padding: 2rem;
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Accordion */
.accordion {
    border: 1px solid var(--accent);
    border-bottom: none;
}

.accordion-item {
    border-bottom: 1px solid var(--accent);
}

.accordion-btn {
    width: 100%;
    text-align: left;
    background: var(--surface);
    border: none;
    color: var(--text);
    padding: 1.25rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-btn::after {
    content: '+';
    color: var(--accent);
    font-size: 1.5rem;
}

.accordion-btn[aria-expanded="true"]::after {
    content: '−';
}

.accordion-content {
    padding: 0 1.25rem 1.25rem;
    background: var(--surface);
    display: none;
    color: var(--text-muted);
}

.accordion-content.open {
    display: block;
}

/* Forms / Contact Tool */
.contact-tool {
    border: 1px solid var(--accent);
    padding: 2rem;
    background: var(--surface);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--accent);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--base);
    border: 1px solid var(--accent);
    color: var(--text);
    font-family: var(--font-body);
}

/* Data Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border: 1px solid var(--accent);
}

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

th {
    font-family: var(--font-head);
    background-color: var(--surface);
    color: var(--accent);
}

/* Profiles */
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--base);
    border: 1px solid var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--duration) var(--ease-kinetic), transform var(--duration) var(--ease-kinetic);
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--accent);
    background-color: var(--surface);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.875rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

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

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

.footer-bottom {
    border-top: 1px solid var(--accent);
    padding-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Media Queries */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-toggle { display: block; }
    .hero-content { max-width: 100%; }
    .hero-metrics { grid-template-columns: 1fr; margin-top: 2rem; }
    .sect-diagonal { clip-path: polygon(0 2rem, 100% 0, 100% calc(100% - 2rem), 0 100%); padding: 6rem 0; margin: -2rem 0; }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
}