/* ===== Tre Fjell Holdings, LLC — Architecture C Metrics-First Design ===== */

:root {
  --slate: #2c3e50;
  --slate-dark: #1a252f;
  --slate-light: #3d566e;
  --ice: #ecf0f1;
  --ice-dark: #dfe4e6;
  --coral: #e74c3c;
  --coral-dark: #c0392b;
  --coral-light: #f1948a;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --gray-100: #f0f2f4;
  --gray-200: #dde1e4;
  --gray-300: #b0b9c2;
  --gray-400: #83929e;
  --gray-500: #5a6b7a;
  --shadow-sm: 0 1px 3px rgba(44,62,80,0.12);
  --shadow-md: 0 4px 12px rgba(44,62,80,0.15);
  --shadow-lg: 0 8px 30px rgba(44,62,80,0.18);
  --shadow-xl: 0 16px 48px rgba(44,62,80,0.22);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 72px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--off-white);
  color: var(--slate);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--coral);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--coral-dark);
}

img {
  max-width: 100%;
  display: block;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: all var(--transition);
  background: transparent;
  padding: 0 24px;
}

.navbar.scrolled {
  background: var(--slate-dark);
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--coral);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.navbar-brand span {
  color: var(--ice);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links > li {
  position: relative;
}

.nav-links > li > a {
  display: block;
  padding: 8px 18px;
  color: var(--ice);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  padding: 8px 0;
  z-index: 100;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}

.dropdown-menu a:hover {
  background: var(--ice);
  color: var(--coral);
}

.dropdown-menu a.active {
  color: var(--coral);
  font-weight: 600;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--white);
  font-size: 1.5rem;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--slate-dark) 0%, var(--slate) 50%, var(--slate-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(231,76,60,0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 30%, rgba(44,62,80,0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: var(--max-width);
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero h1 .highlight {
  color: var(--coral);
}

.hero p {
  font-size: 1.15rem;
  color: var(--gray-200);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.metric-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
}

.metric-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-3px);
  border-color: var(--coral);
}

.metric-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--coral);
  display: block;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--gray-300);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}

.btn-primary:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--ice);
}

.btn-secondary:hover {
  background: var(--ice);
  color: var(--slate-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--slate);
  border-color: var(--slate);
}

.btn-outline:hover {
  background: var(--slate);
  color: var(--white);
}

/* ===== Sections ===== */
.section {
  padding: 90px 24px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--slate-dark);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-header .subtitle {
  font-size: 1.05rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
}

.section-header .accent-line {
  width: 60px;
  height: 4px;
  background: var(--coral);
  margin: 16px auto;
  border-radius: 2px;
}

.section-alt {
  background: var(--white);
}

/* ===== Capability Matrix ===== */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.capability-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.capability-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.capability-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--coral);
}

.capability-card:hover::before {
  transform: scaleX(1);
}

.capability-icon {
  width: 48px;
  height: 48px;
  background: var(--ice);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--coral);
}

.capability-card h3 {
  font-size: 1.15rem;
  color: var(--slate-dark);
  margin-bottom: 10px;
}

.capability-card p {
  font-size: 0.92rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ===== Process Flowchart ===== */
.process-flow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  padding: 20px 0;
  position: relative;
}

.process-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 12px;
}

.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 32px;
  left: 60%;
  right: -40%;
  height: 2px;
  background: var(--gray-300);
  z-index: 0;
}

.process-step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ice);
  border: 3px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--slate);
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.process-step.active .process-step-number {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
  box-shadow: 0 0 0 8px rgba(231,76,60,0.15);
}

.process-step h4 {
  font-size: 0.95rem;
  color: var(--slate-dark);
  margin-bottom: 4px;
}

.process-step p {
  font-size: 0.82rem;
  color: var(--gray-500);
}

/* ===== Testimonials ===== */
.testimonial-strip {
  overflow: hidden;
  position: relative;
  padding: 60px 0;
}

.testimonial-track {
  display: flex;
  gap: 24px;
  animation: scroll-testimonials 30s linear infinite;
  width: max-content;
}

.testimonial-card {
  min-width: 320px;
  max-width: 360px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.testimonial-card .quote {
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}

.testimonial-card .author {
  font-weight: 600;
  color: var(--slate-dark);
  font-size: 0.88rem;
}

.testimonial-card .author span {
  display: block;
  font-weight: 400;
  color: var(--gray-400);
  font-size: 0.82rem;
  margin-top: 2px;
}

@keyframes scroll-testimonials {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--slate-dark), var(--slate));
  padding: 80px 24px;
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--gray-300);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== About Page ===== */
.page-hero {
  padding: 140px 24px 60px;
  background: linear-gradient(135deg, var(--slate-dark), var(--slate));
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--gray-300);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-story .text h3 {
  font-size: 1.5rem;
  color: var(--slate-dark);
  margin-bottom: 16px;
}

.about-story .text p {
  color: var(--gray-500);
  margin-bottom: 16px;
  line-height: 1.8;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.value-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
}

.value-card h4 {
  color: var(--coral);
  font-size: 1rem;
  margin-bottom: 8px;
}

.value-card p {
  color: var(--gray-500);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== Services Page ===== */
.service-detail {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 24px;
  transition: all var(--transition);
}

.service-detail:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--coral);
}

.service-detail h3 {
  font-size: 1.2rem;
  color: var(--slate-dark);
  margin-bottom: 8px;
}

.service-detail .service-tag {
  display: inline-block;
  background: var(--ice);
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.service-detail p {
  color: var(--gray-500);
  font-size: 0.92rem;
  line-height: 1.7;
}

.service-detail ul {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.service-detail ul li {
  padding: 6px 0;
  color: var(--gray-500);
  font-size: 0.88rem;
}

.service-detail ul li::before {
  content: '▸';
  color: var(--coral);
  margin-right: 8px;
}

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--slate);
  background: var(--off-white);
  transition: border-color var(--transition);
  font-family: inherit;
}

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

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-info {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.contact-info h3 {
  font-size: 1.3rem;
  color: var(--slate-dark);
  margin-bottom: 24px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info-item .icon {
  width: 44px;
  height: 44px;
  background: var(--ice);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--coral);
  flex-shrink: 0;
}

.contact-info-item .info h4 {
  font-size: 0.92rem;
  color: var(--slate-dark);
  margin-bottom: 2px;
}

.contact-info-item .info p {
  font-size: 0.88rem;
  color: var(--gray-500);
}

/* ===== Legal Pages ===== */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 0;
}

.legal-content h2 {
  font-size: 1.45rem;
  color: var(--slate-dark);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ice);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--gray-500);
  margin-bottom: 16px;
  line-height: 1.85;
  font-size: 0.95rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px 24px;
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.8;
}

.legal-content ul li,
.legal-content ol li {
  margin-bottom: 6px;
}

.legal-content .last-updated {
  color: var(--gray-400);
  font-size: 0.85rem;
  margin-bottom: 32px;
  font-style: italic;
}

.legal-content .section-note {
  background: var(--ice);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 16px;
  border-left: 4px solid var(--coral);
}

/* ===== Footer ===== */
.footer {
  background: var(--slate-dark);
  color: var(--gray-300);
  padding: 60px 24px 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul li a {
  color: var(--gray-300);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer ul li a:hover {
  color: var(--coral);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--gray-400);
}

.footer-bottom a {
  color: var(--gray-400);
}

.footer-bottom a:hover {
  color: var(--coral);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--slate-dark);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links > li > a {
    padding: 12px 16px;
  }

  .dropdown-menu {
    position: static;
    background: rgba(255,255,255,0.05);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    padding: 0 0 0 16px;
  }

  .dropdown-menu.show {
    display: block;
  }

  .dropdown-menu a {
    color: var(--ice);
  }

  .dropdown-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .metric-value {
    font-size: 1.8rem;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }

  .process-flow {
    flex-direction: column;
    gap: 24px;
    padding: 0;
  }

  .process-step:not(:last-child)::after {
    display: none;
  }

  .process-step {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
  }

  .process-step-number {
    margin: 0;
    width: 48px;
    height: 48px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .about-story {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 16px;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .legal-content {
    padding: 20px 0;
  }
}

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

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    padding: 20px 16px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
    justify-content: center;
  }
}
