/* 
  Subterranean Elegance - Architecture Portfolio Styles
  Palette: Forest Green, Brass, Parchment
  Strictly No Blue Allowed
*/

:root {
    --forest-green: #13261d;
    --brass: #b8923a;
    --parchment: #efe6d2;
    --bg-surface: rgba(19, 38, 29, 0.95);
    
    --text-primary: var(--parchment);
    --text-muted: rgba(239, 230, 210, 0.75);
    
    --border-radius: 20px;
    --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.5);
    
    --font-serif: Charter, Cambria, Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--forest-green);
    color: var(--text-primary);
    font-family: var(--font-serif);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* Grid Background Pattern */
.grid-bg {
    position: relative;
}

.grid-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(239, 230, 210, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(239, 230, 210, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-weight: normal;
    line-height: 1.2;
    color: var(--brass);
    margin-bottom: 1rem;
}

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

p {
    margin-bottom: 1.5rem;
    max-width: 72ch;
}

.ui-label {
    text-transform: uppercase;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    font-family: var(--font-serif);
}

a { color: var(--brass); }

/* Layout Wrappers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

/* Header */
header {
    padding: 2rem 0;
    position: relative;
    z-index: 100;
}

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

.brand {
    color: var(--brass);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

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

nav a {
    color: var(--parchment);
    text-decoration: none;
    font-variant: small-caps;
    transition: color 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--brass);
}

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

/* Hero Narrow Banner */
.hero {
    padding: 4rem 2rem 6rem;
    text-align: center;
}

.hero h1 {
    max-width: 900px;
    margin: 0 auto;
}

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

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--brass);
    color: var(--forest-green);
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-variant: small-caps;
    border: none;
    cursor: pointer;
    transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevation);
}

.btn-secondary {
    display: inline-block;
    color: var(--brass);
    text-decoration: none;
    font-variant: small-caps;
    position: relative;
    padding-bottom: 2px;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 1px;
    background: var(--brass);
    transition: width 0.3s var(--ease-kinetic);
}

.btn-secondary:hover::after {
    width: 100%;
}

/* Vertical Sequence Layout */
.sequence-container {
    position: relative;
    padding-left: 60px;
    margin: 4rem 0;
}

.sequence-container::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(184, 146, 58, 0.3); /* muted brass */
}

.sequence-item {
    position: relative;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-kinetic);
}

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

.sequence-number {
    position: absolute;
    left: -60px;
    top: 0;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--forest-green);
    border: 2px solid var(--brass);
    color: var(--brass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 2;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: relative;
    transition: transform 0.4s var(--ease-kinetic);
    border: 1px solid rgba(239, 230, 210, 0.1);
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    margin-bottom: 2rem;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-kinetic);
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.brass-badge {
    position: absolute;
    bottom: -15px;
    left: 20px;
    background: var(--brass);
    color: var(--forest-green);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-variant: small-caps;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 3;
}

/* Tabbed Interface */
.tabs-container {
    margin: 4rem 0;
}

.tab-nav {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid rgba(184, 146, 58, 0.3);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 1rem 2rem;
    font-family: var(--font-serif);
    font-variant: small-caps;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
}

.tab-btn.active {
    color: var(--brass);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 0; height: 2px;
    background: var(--brass);
    transition: width 0.3s ease;
}

.tab-btn.active::after {
    width: 100%;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

/* Timeline Component */
.timeline {
    margin: 4rem 0;
    position: relative;
    padding-left: 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: rgba(239, 230, 210, 0.2);
}
.timeline-event {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 3rem;
}
.timeline-event::before {
    content: '';
    position: absolute;
    left: -5px; top: 5px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--brass);
}

/* Contact Tool Form */
.tool-form {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    padding: 3rem;
    border: 1px solid rgba(184, 146, 58, 0.2);
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--brass);
    font-variant: small-caps;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(239, 230, 210, 0.3);
    color: var(--parchment);
    padding: 1rem;
    border-radius: 4px;
    font-family: var(--font-serif);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--brass);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Footer */
footer {
    border-top: 1px solid rgba(184, 146, 58, 0.3);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

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

.footer-col h4 {
    font-variant: small-caps;
    color: var(--parchment);
    margin-bottom: 1.5rem;
}

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

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

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(239, 230, 210, 0.1);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Utility Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(239, 230, 210, 0.2);
}

th {
    color: var(--brass);
    font-variant: small-caps;
}

/* Media Queries */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--forest-green);
        padding: 2rem;
        border-bottom: 1px solid rgba(184, 146, 58, 0.3);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    
    nav ul.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .sequence-container {
        padding-left: 40px;
    }
    .sequence-container::before {
        left: 10px;
    }
    .sequence-number {
        left: -40px;
        width: 32px; height: 32px;
        font-size: 1rem;
    }
    
    .tool-form {
        padding: 1.5rem;
    }
}

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