/* 
  Deep Earth Engineering | Tallyrocketfjell
  Style: Boring Mechanics
*/

:root {
  --base-sand: #f3e9d8;
  --base-sand-dark: #e5d8c3;
  --accent-terra: #c2410c;
  --accent-terra-hover: #9a330a;
  --text-charcoal: #262626;
  --text-light: #525252;
  --card-tint: rgba(194, 65, 12, 0.08);
  --border-subtle: rgba(38, 38, 38, 0.1);
  --radius-sm: 4px;
  --radius-pill: 9999px;
  --shadow-elevation: 0 12px 32px -4px rgba(38, 38, 38, 0.15);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  padding: 0;
  background-color: var(--base-sand);
  color: var(--text-charcoal);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Typography Overrides */
.text-mono, .data-label, .minor-heading, .nav-link, .stat-number {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.stat-number {
  font-size: 1.5rem;
  color: var(--accent-terra);
  font-weight: 700;
}

a { color: var(--accent-terra); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-terra-hover); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); object-fit: cover; }

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

.copy-container {
  max-width: 72ch;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Top Bar & Header */
.top-bar {
  background-color: var(--text-charcoal);
  color: var(--base-sand);
  padding: 0.5rem 0;
  text-align: right;
  font-size: 0.75rem;
}

.main-header {
  background-color: var(--base-sand);
  border-bottom: 1px solid var(--border-subtle);
  position: relative; /* Scrolls out of view per requirements */
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-charcoal);
  text-decoration: none;
}

.desktop-nav { display: flex; gap: 2rem; }
.desktop-nav a {
  color: var(--text-charcoal);
  font-weight: 600;
}
.desktop-nav a:hover { color: var(--accent-terra); }

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

.mobile-nav {
  display: none;
  background-color: var(--base-sand-dark);
  padding: 1rem 2rem;
  flex-direction: column;
  gap: 1rem;
}
.mobile-nav.is-open { display: flex; }

/* Hero Section */
.hero {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero h1 { font-size: 3.5rem; }
.hero-desc { font-size: 1.25rem; color: var(--text-light); margin-bottom: 2rem; }

/* Buttons */
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-terra);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-kinetic), background-color 0.2s, box-shadow 0.3s;
}
.btn:hover {
  background-color: var(--accent-terra-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-elevation);
  color: #fff;
}
.btn-secondary {
  background-color: var(--text-charcoal);
}
.btn-secondary:hover { background-color: #000; }

/* Alternating Split-Screen Sections */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  border-bottom: 1px solid var(--border-subtle);
}
.split-section:nth-child(even) { direction: rtl; }
.split-section:nth-child(even) > * { direction: ltr; }

.split-content {
  padding: 5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-image {
  background-color: var(--text-charcoal);
  position: relative;
  overflow: hidden;
}
.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* Cards (Frosted Glass) */
.glass-card {
  background: var(--card-tint);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(194, 65, 12, 0.15);
  border-radius: var(--radius-sm);
  padding: 2rem;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s;
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevation);
}

/* Grids */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}
.grid-dense {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}
.grid-dense img { aspect-ratio: 1/1; }

/* Accordions */
.accordion { margin: 2rem 0; }
.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}
.accordion-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  color: var(--text-charcoal);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-kinetic);
}
.accordion-inner { padding-bottom: 1.5rem; color: var(--text-light); }
.accordion-item.is-active .accordion-content { max-height: 500px; }

/* Forms & Inputs */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-charcoal);
}
.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background-color: rgba(255,255,255,0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-terra);
}

/* Footer */
.main-footer {
  background-color: var(--text-charcoal);
  color: var(--base-sand);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand { font-size: 1.25rem; font-weight: 800; color: var(--base-sand); display: block; margin-bottom: 1rem;}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.footer-nav a { color: var(--base-sand-dark); font-size: 0.85rem; }
.footer-nav a:hover { color: var(--accent-terra); }

.footer-legal { text-align: right; font-size: 0.75rem; color: #888; }
.footer-legal a { color: #888; margin-left: 1rem; }
.footer-legal a:hover { color: var(--accent-terra); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; display: flex; justify-content: space-between; font-size: 0.75rem; color: #888;}

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.7s var(--ease-kinetic); }
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }

/* Utilities */
.text-accent { color: var(--accent-terra); }
.mb-2 { margin-bottom: 2rem; }
.mt-4 { margin-top: 4rem; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .footer-legal { text-align: left; margin-top: 2rem; }
  .footer-legal a { margin-left: 0; margin-right: 1rem; }
}
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-toggle { display: block; }
  .split-section { grid-template-columns: 1fr; direction: ltr !important; }
  .split-section:nth-child(even) { direction: ltr; }
  .split-content { padding: 3rem 2rem; }
  .split-image { min-height: 300px; }
  .hero h1 { font-size: 2.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}}
