/* Design System */
:root {
  /* Colors - Earthy, Trustworthy, Organic */
  --color-bg: #ece7de;
  --color-bg-alt: #e3ded5;
  --color-text: #444545;
  --color-text-light: #5C5C54;
  --color-primary: #2E4634; /* Deep Forest Green */
  --color-secondary: #8C7B64; /* Earthy Brown */
  --color-accent: #C45A33; /* Rust/Harvest Orange */
  --color-border: #DCD6CD;
  
  /* Typography */
  --font-heading: 'IBM Plex Serif', serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --duration-normal: 0.6s;
}

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

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  color: var(--color-text-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* Utilities */
.overline {
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-weight: 600;
  display: block;
  margin-bottom: var(--space-sm);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 7rem;
  padding: 1rem 0;
  z-index: 1000;
  transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(236, 231, 222, 0.95); /* #ece7de */
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: block;
  position: relative;
  height: 40px;
  width: 60px; /* Maintains layout footprint */
  z-index: 100;
  align-self: flex-start;
}

.nav-logo-img {
  height: 80px;
  width: auto;
  position: absolute;
  top: 0;
  left: 0;
  transition: filter 0.3s ease;
}

/* Logo filter removed as requested */

.nav-links {
  display: flex;
  gap: 2rem;
  align-self: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  color: #444545; /* Constant dark color */
  transition: color 0.3s ease;
}

/* .navbar.scrolled .nav-links a rule removed */

/* Mobile menu button color transition */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ece7de;
  position: absolute;
  transition: all 0.3s ease;
}

.navbar.scrolled .mobile-menu-btn span {
  background-color: #444545;
}

.mobile-menu-btn span:nth-child(1) { top: 0; }
.mobile-menu-btn span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-menu-btn span:nth-child(3) { bottom: 0; }

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  /* display: flex;  <-- Remove flex, let it be block so flow works normally */
  overflow: hidden;
  color: #ece7de;
  z-index: 1;
}

.hero-parallax {
  position: relative; /* Changed from absolute to relative so it takes up space in the DOM */
  width: 100%;
  /* height is defined by the spacer image inside */
  z-index: 0;
}

/* Spacer image to force aspect ratio */
.parallax-spacer {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0; 
  pointer-events: none;
  visibility: hidden; /* Ensure it takes layout space but isn't painted */
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% auto; /* Force full width, maintain aspect ratio */
  background-position: top center; /* Anchor to top */
  background-repeat: no-repeat;
  will-change: transform;
}

/* Layer Images */
.layer-01 { background-image: url('images/hero-02.webp'); z-index: 1; }
/* .layer-02 replaced by cloud layers */
.layer-03 { background-image: url('images/hero-03.webp'); z-index: 3; }
.layer-04 { background-image: url('images/hero-04.webp'); z-index: 4; }
.layer-05 { background-image: url('images/hero-05.webp'); z-index: 5; }
.layer-06 { background-image: url('images/hero-06.webp'); z-index: 6; }
.layer-07 { background-image: url('images/hero-07.webp'); z-index: 7; }
.layer-08 { background-image: url('images/hero-08.webp'); z-index: 8; }
.layer-09 { 
  background-image: url('images/hero-09.webp'); 
  z-index: 9; 
  transform-origin: bottom; /* Anchor scaling to bottom */
}

/* Cloud Layers */
.layer-cloud-wrapper {
  z-index: 2;
  /* Inherits size and position from .parallax-layer */
  /* Remove background properties from wrapper since inner div handles it */
  background-image: none !important; 
}

.cloud-inner {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  will-change: background-position;
}

.layer-02-a {
  background-image: url('images/hero-01a.webp');
  background-size: 218px 45px;
  background-position-y: 60px;
  animation: drift-cloud 60s linear infinite;
  animation-delay: -25s; /* Start mid-screen */
}

.layer-02-b {
  background-image: url('images/hero-01b.webp');
  background-size: 315px 83px;
  background-position-y: 38px;
  animation: drift-cloud 85s linear infinite;
  animation-delay: -50s; /* Start mid-screen */
}

.layer-02-c {
  background-image: url('images/hero-01c.webp');
  background-size: 188px 35px;
  background-position-y: 156px;
  animation: drift-cloud 70s linear infinite;
  animation-delay: -10s; /* Start mid-screen */
}

@keyframes drift-cloud {
  from { background-position-x: -700px; }
  to { background-position-x: 100vw; }
}

.hero-content {
  position: absolute; /* Changed to absolute to sit on top of the spacer-sized container */
  top: calc(33% - 18px); /* Moved down 2rem (32px) from -50px to -18px approx */
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2; /* Now inside parallax-layer context, relative to siblings */
  width: 90%;
  max-width: 1000px;
  text-align: center;
}

.hero-subheader-container {
  position: relative;
  margin-bottom: 4rem;
  display: flex;
  justify-content: center;
  z-index: 20;
}

.hero-subheader-group {
  position: relative;
  will-change: transform;
  padding: 1.5rem 2.5rem;
  text-align: center;
}

.hero-subheader-bg {
  position: absolute;
  top: -3%;
  left: -11%;
  width: 120%;
  height: 129%;
  background-image: url('images/farmers-lockup.svg');
  background-size: contain;
  background-position: top center; /* Anchor top */
  background-repeat: no-repeat;
  z-index: -1;
}

.hero-subheader-text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #444545;
  font-weight: 600;
  opacity: 0.9;
  white-space: nowrap;
  margin: 0;
}

.hero-content h1 {
  color: #ece7de;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
  margin-bottom: 2rem;
}

/* .hero-logo removed as it was moved to header */

/* Scroll indicator removed */

@keyframes scrollLine {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Intro Section */
.intro-section {
  padding: 12rem 0 0 0; /* Removed bottom padding */
  text-align: left;
}

.intro-grid-centered {
  max-width: 800px;
  margin: 0 auto;
}

.intro-text .lead {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  color: #444545;
  margin-bottom: 2rem;
  line-height: 4rem;
}

.intro-text {
  margin-top: 5rem;
}

.intro-grid-centered .divider.centered {
  margin: 4rem auto 0;
  width: 100px;
  height: 2px;
  background-color: #e7a550;
}

/* Quote Section */
.quote-section {
  position: relative;
  width: 100%;
  padding: 8rem 0;
  background-color: var(--color-bg); /* Match Intro/Body background */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444545; /* Dark Text */
}

.quote-box-large {
  position: relative;
  z-index: 2;
  max-width: 1000px; /* Slightly wider for side-by-side */
  margin: 0 auto;
  text-align: left; /* Left align for desktop */
  padding: 0 2rem;
  display: flex;
  flex-direction: row; /* Side-by-side on desktop */
  align-items: center;
  justify-content: center;
  gap: 4rem;
}

.quote-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 0; /* No margin needed in flex row */
  border-radius: 50%;
  border: 2px solid #FFF; /* Changed border color to be visible on light bg */
  flex-shrink: 0; /* Prevent shrinking */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quote-text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.quote-box-large blockquote {
  font-family: var(--font-heading);
  font-size: 2rem; /* Reduced from 3rem */
  font-style: italic;
  color: var(--color-primary); /* Use primary color for quote text */
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.quote-box-large cite {
  font-size: 1.125rem;
  font-weight: 600;
  color: #a06338;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
}

/* Removed old .quote-box styles */

/* Operate Section */
.operate-section {
  background-color: #a8732d;
  color: #ece7de;
  padding: var(--space-xl) 0;
}

.operate-section .divider {
  margin-top: 1rem;
  margin-bottom: 3rem;
  background-color: #e7a550;
  opacity: 1;
  display: block; /* Ensure it takes up space */
  min-height: 2px; /* Force height */
  width: 100px; /* Explicit width to match Ethos divider */
}

.operate-section .section-header h2 {
  color: #ece7de;
  font-size: 4rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.operate-section .subheader {
  font-size: 1.5rem;
  opacity: 1;
  margin-bottom: 0.5rem;
  color: #e7a550;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.operate-section .description {
  max-width: 700px;
  color: rgba(236, 231, 222, 0.8);
  margin-bottom: var(--space-lg);
}

.grid-quadrant {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: rgba(236, 231, 222, 0.1); /* Grid lines */
  border: 1px solid rgba(236, 231, 222, 0.1);
}

.tile {
  background-color: #d69645;
  padding: 4rem;
  transition: background-color 0.3s ease;
}

.tile:hover {
  background-color: #e7a550;
}

/* Removed .tile-icon styles */

.tile h3 {
  color: #444545;
  margin-bottom: 1rem;
}

.tile p {
  color: #5C5C54;
  font-size: 1rem;
  margin-bottom: 0;
}

/* Ethos Section */
.ethos-section {
  padding: 0 0 var(--space-xl) 0;
}

.ethos-hero-container {
  position: relative;
  width: 100%;
  margin-bottom: 4rem;
  /* Ensure no overflow hidden clipping */
  overflow: visible;
}

.ethos-hero-bg {
  width: 100%;
  height: auto;
  display: block;
  /* Make sure aspect ratio is respected */
  object-fit: contain; 
}

.ethos-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  /* Allow content to determine flow if needed, but absolute positioning limits this.
     With width 100% height auto on image, overlay matches image size.
  */
}

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

.ethos-text-hero h2 {
  font-size: 4rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  color: #ece7de; /* Override default heading color */
  margin-top: 2rem; /* Adjusted margin as requested */
}

.ethos-text-hero .subheader {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #e7a550;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-family: var(--font-body);
}

.ethos-intro {
  font-family: var(--font-heading); /* IBM Plex Serif */
  font-size: 2.5rem;
  line-height: 4rem;
  margin-bottom: 0;
  color: #ece7de;
  margin-top: 0; /* Spacing handled by divider margin-bottom */
}

.ethos-intro .highlight-word {
  color: #e7a550;
  font-weight: 600;
}

.ethos-content {
  display: block;
  max-width: 900px;
  margin: 0 auto;
}

.ethos-text-body {
  margin-top: 8rem;
}

.ethos-text-body p {
  line-height: 1.8; /* Slightly increased from 1.6 to accommodate larger lead-in */
  color: #444545;
}

.ethos-lead-in {
  font-family: var(--font-heading);
  color: #C95930;
  font-size: 2rem;
  line-height: 0.8; /* Reduced to prevent expanding the line box significantly */
  display: inline-block; /* Allows better control of height/transform if needed */
  vertical-align: baseline;
  margin-right: 0.3rem;
}

/* Ensure divider is visible and styled correctly in hero context */
.ethos-hero-overlay .divider {
  width: 100px;
  height: 2px;
  background-color: #e7a550;
  margin-top: 1rem;
  margin-bottom: 3rem;
  opacity: 1;
}

/* Removed old .ethos-text, .ethos-highlight-box classes */

/* Removed operate-divider class */

.highlight-text {
  font-size: 1.25rem;
  color: var(--color-primary);
  font-weight: 500;
  border-left: 2px solid var(--color-border);
  padding-left: 1.5rem;
  margin-top: 2rem;
}

.ethos-image {
  position: relative;
  height: 600px;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background-image: url('images/close_up_of_farmer_hands_with_soil.png');
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  box-shadow: 20px 20px 0px var(--color-bg-alt);
}

/* Team Section */
.team-section {
  padding: var(--space-xl) 0;
  background-color: var(--color-bg-alt);
}

/* Partners Section */
.partners-section {
  padding: var(--space-xl) 0;
  text-align: left; /* Changed from center to left */
  overflow: hidden; /* Hide overflow for infinite scroll */
}

/* New container for header alignment to match Ethos */
.partners-header-container {
  max-width: 900px;
  margin: 0;
}

.section-title {
  text-align: left; /* Changed from center to left */
  margin-bottom: var(--space-lg);
  font-size: 4rem; /* Match Ethos h2 */
  letter-spacing: -0.02em; /* Match Ethos h2 */
  color: #A06338; /* Keep visible on light bg */
}

.partners-description {
  margin-top: 3rem;
  max-width: 700px;
  font-size: 1.125rem;
  color: #5C5C54;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.team-member {
  text-align: center;
}

.member-avatar {
  width: 200px;
  height: 200px;
  background-color: #dcd6cd;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  /* If we had team photos */
  background-size: cover;
  background-position: center;
}

.team-member h4 {
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.team-member p {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
}

.partners-slider {
  margin-top: 3rem;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.partners-slider::before,
.partners-slider::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.partners-slider::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg), transparent);
}

.partners-slider::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg), transparent);
}

.partners-track {
  display: flex;
  width: calc(250px * 14); /* 7 slides * 2 sets * width estimate */
  animation: scroll 40s linear infinite;
}

.partner-slide {
  width: 250px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Opacity removed */
  transition: opacity 0.3s ease;
}

.partner-slide:hover {
  /* Opacity hover removed */
}

.partner-img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  /* Grayscale filter removed */
  transition: filter 0.3s ease;
}

.partner-slide:hover .partner-img {
  /* Grayscale hover removed */
}

.partner-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-light);
  white-space: nowrap;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-250px * 7)); /* Move by half the total width (one set of slides) */
  }
}

/* Footer */
footer {
  background-color: #a8732d;
  color: #ece7de;
  padding: 4rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.footer-logo {
  height: 80px;
  width: auto;
  display: block;
}

.footer-copyright {
  text-align: center;
  width: 100%;
  padding-top: 4rem;
  border-top: none;
}

.footer-copyright p {
  color: rgba(236, 231, 222, 0.5);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(236, 231, 222, 0.8);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ece7de;
}

/* Responsive */
@media (max-width: 1000px) {
  h1 { font-size: 3rem; }

  /* Hero Adjustments for Tablet */
  .hero-parallax {
    height: auto;
    min-height: 0;
  }

  .parallax-layer {
    background-size: cover;
    background-position: center top;
    background-attachment: scroll; /* Ensure no fixed attachment artifacts */
    height: 100%; /* Force height to match container */
  }

  .hero-content {
    top: 40%;
    z-index: 9; /* Ensure text is visible above layers on mobile */
  }

  /* Shift layers to place content between 05 and 06 */
  .layer-06 { z-index: 7; }
  .layer-07 { z-index: 8; }
  .layer-08 { z-index: 10; }
  .layer-09 { z-index: 11; }
  
  .intro-grid-centered,
  .ethos-content {
    grid-template-columns: 1fr;
  }
  
  .quote-section {
    height: auto;
    padding: 6rem 0;
  }

  .quote-box-large {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .quote-logo {
    margin-bottom: 0;
  }

  .quote-text-wrapper {
    align-items: center;
  }
  
  .grid-quadrant {
    grid-template-columns: 1fr;
  }
  
  .tile {
    padding: 2.5rem;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-bg);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    gap: 1.5rem;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .ethos-image {
    height: 400px;
    order: -1; /* Show image first on mobile? Maybe not. Let's keep text first */
    order: 0;
  }
  
  .image-placeholder {
    box-shadow: 10px 10px 0px var(--color-bg-alt);
  }
  
  .footer-top-row {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  /* Typography Adjustments */
  .intro-text .lead {
    font-size: 2rem;
    line-height: 3.4rem;
  }

  .quote-box-large blockquote {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  .subheader,
  .operate-section .subheader,
  .ethos-text-hero .subheader {
    font-size: 1.3rem;
  }

  .ethos-intro {
    font-size: 2rem;
    line-height: 3.4rem;
  }

  .ethos-hero-bg {
    height: 100vh;
    object-fit: cover;
    object-position: center;
  }
}

@media (max-width: 600px) {
  /* Mobile specific adjustments */
  h1 { 
    font-size: 2.25rem; /* Slightly larger than 2rem */
    padding: 0 1rem;
    line-height: 1.3;
  }

  h2 {
    font-size: 3rem !important; /* Force override of specific section styles */
  }

  .operate-section {
    padding: var(--space-lg) 0;
  }

  .ethos-hero-bg {
    height: 100vh;
    object-fit: cover;
    object-position: center;
  }

  .ethos-intro {
    font-size: 1.5rem;
    line-height: 2.5rem;
  }

  .subheader,
  .operate-section .subheader,
  .ethos-text-hero .subheader {
    font-size: 1.2rem;
  }

  .quote-box-large blockquote {
    font-size: 1.6rem;
  }

  /* Move H1 z-index up on mobile */
  .hero-content {
    width: 100%;
    padding: 0 1rem;
    top: 40%;
    z-index: 7; 
  }

  .intro-text .lead {
    font-size: 1.7rem;
    line-height: 2.8rem;
  }

  .hero-parallax {
    height: 80vh; /* Fallback for older browsers */
    height: 80lvh; /* Chrome/Modern mobile fix */
    min-height: 80vh; 
    min-height: 80lvh;
  }

  .parallax-layer {
    background-size: cover;
    background-position: center top;
    background-attachment: scroll;
    height: 100%;
  }

  /* Adjust specific layers if needed */
  .layer-01 { background-position: center top; } /* Keep sky at top */
  .layer-cloud-wrapper { background-size: cover; } 
  
  /* Adjust foreground scaling origin for mobile if needed */
  .layer-09 {
    background-position: center bottom;
  }
}

@media (min-width: 1600px) {
  /* Large desktop specific adjustments */
  h1 {
    font-size: 5.5rem;
  }
  
  .hero-content {
    top: 30%;
  }
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio-section {
  padding: 100px 0;
  background-color: var(--color-bg);
  position: relative;
}

.portfolio-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.portfolio-intro {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-secondary);
  margin-top: 20px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  background-color: #f5f0e6;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(46, 70, 52, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(46, 70, 52, 0.12);
  border-color: rgba(46, 70, 52, 0.2);
}

.portfolio-logo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #ece7de;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(46, 70, 52, 0.08);
  padding: 40px 32px;
}

.portfolio-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.portfolio-body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.portfolio-body h3 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--color-primary);
  margin: 0;
  line-height: 1.2;
}

.portfolio-tag {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin: 0 0 8px;
}

.portfolio-desc {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-secondary);
  margin: 0;
}

@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    gap: 24px;
  }
  .portfolio-section {
    padding: 72px 0;
  }
}

/* ============================================
   CREDENTIALS BAND (below hero)
   ============================================ */
.credentials-band {
  background-color: #ece7de;
  padding: 72px 0 56px;
  border-top: 1px solid rgba(46, 70, 52, 0.12);
  border-bottom: 1px solid rgba(46, 70, 52, 0.08);
  position: relative;
  z-index: 2;
}

.credentials-inner {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.credentials-eyebrow {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin: 0 0 20px;
}

.credentials-headline {
  font-family: 'IBM Plex Serif', serif;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 500;
  line-height: 1.28;
  color: var(--color-primary);
  margin: 0 auto 48px;
  max-width: 940px;
  letter-spacing: -0.01em;
}

.credentials-headline a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(196, 90, 51, 0.35);
  transition: border-color 0.2s ease;
}

.credentials-headline a:hover {
  border-bottom-color: var(--color-accent);
}

.credentials-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}

.credentials-pillar {
  padding: 0 4px;
  border-left: 2px solid rgba(46, 70, 52, 0.18);
  padding-left: 20px;
}

.pillar-label {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  margin-bottom: 10px;
}

.pillar-copy {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-primary);
  margin: 0;
}

.pillar-copy a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 90, 51, 0.35);
  transition: border-color 0.2s ease;
}

.pillar-copy a:hover {
  border-bottom-color: var(--color-accent);
}

.credentials-pillar {
  display: flex;
  flex-direction: column;
}

.credentials-pillar .pillar-copy {
  flex: 1;
}

.pillar-exit {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(46, 70, 52, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillar-exit-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-secondary);
  opacity: 0.85;
  flex-shrink: 0;
}

.pillar-exit-inline {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.35;
}

.pillar-exit-link {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s ease;
}

.pillar-exit-link:hover {
  opacity: 0.75;
}

.pillar-exit-logo {
  height: 22px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  display: block;
}

.pillar-exit-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.pillar-exit-logos {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pillar-exit-logo--round {
  height: 30px;
}

.pillar-exit-logo--tall {
  height: 18px;
}

@media (max-width: 800px) {
  .credentials-band {
    padding: 56px 0 40px;
  }
  .credentials-pillars {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 480px;
  }
  .credentials-headline {
    margin-bottom: 36px;
  }
}

/* -------- Password gate -------- */
html.gate-locked body {
  overflow: hidden;
}

#gt-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #ece7de 0%, #dfd7c6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gt-gate__card {
  width: 100%;
  max-width: 420px;
  background: #fbf8f2;
  border: 1px solid rgba(46, 70, 52, 0.12);
  border-radius: 14px;
  padding: 40px 36px 32px;
  box-shadow: 0 20px 60px rgba(46, 70, 52, 0.18);
  text-align: center;
}

.gt-gate__logo {
  width: 82px;
  height: auto;
  margin: 0 auto 20px;
  display: block;
}

.gt-gate__eyebrow {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-secondary);
  margin: 0 0 10px;
}

.gt-gate__title {
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-primary);
  margin: 0 0 24px;
  line-height: 1.25;
}

.gt-gate__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gt-gate__input {
  width: 100%;
  padding: 12px 14px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
  border: 1px solid rgba(46, 70, 52, 0.25);
  border-radius: 8px;
  background: #fff;
  color: var(--color-primary);
  box-sizing: border-box;
}

.gt-gate__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(46, 70, 52, 0.15);
}

.gt-gate__btn {
  width: 100%;
  padding: 12px 14px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fbf8f2;
  background: var(--color-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gt-gate__btn:hover {
  background: #223529;
}

.gt-gate__error {
  margin: 14px 0 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8125rem;
  color: #b23a2a;
}
