/* =========================================================
   BRAND PALETTE (from your image)
   - Dark green base: #1F3431
   - Greys: #435452, #5C6B69, #8E9997, #C3C9C8, #FFFFFF
   - Yellows: #FFD700, #FFE246, #FFEA7E, #FFF5BB
   ========================================================= */

/* ---------------------------------------------------------
   CSS Variables (easy to tweak later)
   --------------------------------------------------------- */
:root {
  --bg-dark: #1F3431;
  --text-light: #FFFFFF;

  --grey-1: #C3C9C8;
  --grey-2: #8E9997;
  --grey-3: #5C6B69;
  --grey-4: #435452;

  --accent-yellow: #FFD700;
  --accent-yellow-2: #FFE246; /* hover */
  --accent-yellow-soft: #FFEA7E;
  --accent-yellow-pale: #FFF5BB;

  --max-width: 1100px;
}

/* ---------------------------------------------------------
   Base / Reset-ish
   --------------------------------------------------------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth; /* makes the Contact anchor scroll feel polished */
}

body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #FFFFFF;
  color: #111; /* default body text; sections can override */
  line-height: 1.5;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin-inline: auto;
}

.section-divider {
  border: none;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
  margin: 3rem 0;
}


/* ---------------------------------------------------------
   Header
   - Dark base bar
   - One Contact link
   --------------------------------------------------------- */
.site-header {
  background: var(--bg-dark);
  color: var(--text-light);
  position: sticky;  /* keeps header visible while scrolling */
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

/* A subtle hover so it feels interactive but not flashy */
.nav-link:hover {
  background: rgba(255, 255, 255, 0.10);
}

/* ---------------------------------------------------------
   Header Contact Button – Match Primary CTA Behavior
   --------------------------------------------------------- */
.header-nav .nav-link {
  background: var(--accent-yellow);
  color: var(--bg-dark);
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.header-nav .nav-link:hover,
.header-nav .nav-link:focus {
  background: var(--accent-yellow-2);
  transform: translateY(-1px);
}

/* =========================
   HERO (clean + predictable)
   Keep HTML: <div class="container hero-content">
   ========================= */

.hero {
  background-image: url("images/train-bridge.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 72vh;
  position: relative;
  color: var(--text-light);

  display: flex;
  align-items: flex-end;
}

/* Overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    to bottom,
    rgba(31, 52, 49, 0.05) 0%,
    rgba(31, 52, 49, 0.30) 55%,
    rgba(31, 52, 49, 0.55) 100%
  );
}

/* The container is already providing left/right gutters.
   This just ensures hero text sits above overlay and has vertical padding. */
.hero > .container.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3rem 0;
}

/* Optional: control line length without messing with container width */
.hero .hero-title,
.hero .hero-subtitle,
.hero .hero-logo,
.hero .hero-actions {
  max-width: 720px;
}

.hero-title {
  margin: 0 0 0.75rem 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
}

.hero-subtitle {
  margin: 0 0 1.25rem 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
}

/* Logo */
.hero-logo {
  margin-bottom: 1rem;
}

.hero-logo img {
  width: 220px;
  max-width: 100%;
  height: auto;
  opacity: 0.95;
}



/* ---------------------------------------------------------
   Buttons
   - Use palette-based combos
   --------------------------------------------------------- */
.btn {
  font: inherit;
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.8rem 1.05rem;
  border: 2px solid transparent;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

/* PRIMARY BUTTON (Recommended)
   Yellow fill + dark text.
   - Strong contrast
   - Reads well on dark hero overlay */
.btn-primary {
  background: var(--accent-yellow);
  color: var(--bg-dark);
  border-color: var(--accent-yellow);
}

.btn-primary:hover {
  background: var(--accent-yellow-2); /* slightly lighter */
  border-color: var(--accent-yellow-2);
  transform: translateY(-1px);
}

/* GHOST BUTTON (Optional)
   Transparent + yellow outline + white text
   - Very “premium” look on dark hero */
.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border-color: rgba(255, 215, 0, 0.85);
}

.btn-ghost:hover {
  background: rgba(255, 215, 0, 0.12);
  transform: translateY(-1px);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}



/* =========================================================
   Problem Section
   ========================================================= */
.section-problem .container {
  max-width: 1100px;        /* overall section width */
}

/* Keep text tighter than cards */
.section-problem .section-title,
.section-problem .section-lede,
.section-problem .section-body,
.section-problem .section-bridge {
  max-width: 1100px;
}

.section-body {
  margin: 0 0 1rem 0;
  max-width: 72ch;
  color: var(--grey-4);
  font-size: 1rem;
  line-height: 1.65;
}

/* Points: clean cards, less "marketing grid" */
.problem-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.25rem 0 1.25rem 0;
}

/* A restrained card that feels technical, not flashy */
.problem-point {
  border: 1px solid rgba(67, 84, 82, 0.18);
  border-radius: 14px;
  padding: 1rem 1rem;
  background: #ffffff;
}

.problem-point h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bg-dark);
}

.problem-point p {
  margin: 0;
  color: var(--grey-4);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* Bridge line: slightly emphasized */
.section-bridge {
  margin: 1.25rem 0 0 0;
  max-width: 72ch;
  color: var(--grey-3);
  font-weight: 700;
}

/* Mobile stacking */
@media (max-width: 900px) {
  .problem-points {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------
   WHO THIS IS FOR (Text + Image with left fade)
   --------------------------------------------------------- */

/* Easy tweak knobs */
:root {
  --who-gap: 1.5rem;             /* space between text and image column */
  --who-image-width: 33%;         /* desktop image column width */
  --who-image-min-h: 300px;       /* minimum visible height */
  --who-radius: 6px;             /* rounded corners */
  --who-fade-start: 0%;           /* where fade begins (left edge) */
  --who-fade-solid: 75%;          /* where image becomes fully visible */
  --who-image-opacity: 0.8;      /* subtle softening */
  --who-image-sat: 0.95;          /* slight desaturation */
  --who-image-contrast: 0.97;     /* slight contrast reduction */
}

/* Two-column layout */
.who-grid {
  display: grid;
  grid-template-columns: 1fr var(--who-image-width);
  gap: var(--who-gap);
  align-items: start;
  margin-top: 1.25rem;

  align-items: stretch;
}

/* Keep your text column behaving nicely */
.who-text {
  min-width: 0; /* prevents overflow in grid */
}

/* Image container */
.who-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--who-radius);

  /* This helps it "fit vertically" and feel like a sidebar panel */
  min-height: 320px;

  /* optional: subtle border to match your card styling language */
  border: 1px solid rgba(0, 0, 0, 0.08);

  /* keeps it visually aligned and calm */
  background: rgba(31, 52, 49, 0.02);
}

/* The image itself */
.who-media img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;

  /* The key: crop vertically without distortion */
  object-fit: cover;

  /* Anchor the subject (adjust this!) */
  object-position: 55% 55%; /* X% Y% — tweak until the main group is framed */

  display: block;

  /* Gentle editorial feel */
  opacity: var(--who-image-opacity);
  filter: saturate(var(--who-image-sat)) contrast(var(--who-image-contrast));
  

}

/* ---------------------------------------------------------
   Preferred fade: mask-image (cleanest)
   - Fades the image away to the LEFT
   --------------------------------------------------------- */
.who-media {
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0) var(--who-fade-start),
    rgba(0,0,0,0.4) 50%,
    rgba(0,0,0,1) var(--who-fade-solid)
  );
  mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0) var(--who-fade-start),
    rgba(0,0,0,0.4) 50%,
    rgba(0,0,0,1) var(--who-fade-solid)
  );
}

/* ---------------------------------------------------------
   Fallback fade: overlay gradient (for older browsers)
   - Only applies if mask-image isn't supported
   --------------------------------------------------------- */
@supports not (mask-image: linear-gradient(to right, #000, transparent)) {
  .who-media::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
      to right,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,0) 38%
    );
  }
}


/* ---------------------------------------------------------
   FEATURED PROJECT (Playlist + Map Preview)
   - Left: YouTube playlist embed
   - Right: Map preview image that links to full map
   --------------------------------------------------------- */

/* Section header text width (matches your reading measure) */
.featured .section-header p {
  max-width: 58rem;
}

/* Two-column layout */
.featured-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
  align-items: start;
}

.featured-panel {
  min-width: 0; /* prevents overflow in grid */
}

/* Shared card look */
.embed-card {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* Responsive ratio wrapper (for iframe) */
.embed-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}

.embed-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.featured-map {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Bullets on the right side */
.featured-bullets {
  margin: 1rem 0 0 1rem;
  padding: 0;
  color: rgba(0,0,0,0.75);
}

.featured-bullets {
  margin-top: auto;     /* this is the key line */
  padding-left: 1.1rem; /* controlled indent */
}

.featured-bullets li {
  margin: 0 0 0.55rem 0;
  line-height: 1.2;
}

/* Buttons area */
.featured-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------
   Map Preview (Static image → Full interactive map)
   - Designed to visually match the YouTube player footprint
   --------------------------------------------------------- */

.map-preview-link {
  display: block;
  text-decoration: none;
}

.map-preview-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);

  /* Key: treat preview like an embed with a fixed ratio */
  aspect-ratio: 16 / 9; /* try 16/10 if you want more vertical room */
}

.map-preview-card img {
  width: 100%;
  height: 100%;
  display: block;

  /* Fill the box; crop as needed (ignores source pixel dims) */
  object-fit: cover;
  object-position: center;

  /* Subtle polish */
  filter: saturate(0.98) contrast(1.02);
}

/* Overlay gradient + CTA pill */
.map-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.45),
    rgba(0,0,0,0)
  );
}

.map-preview-pill {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;

  /* Uses your established palette variables */
  background: rgba(31, 52, 49, 0.92); /* dark green */
  color: var(--accent-yellow);        /* gold */
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.map-preview-pill:hover,
.map-preview-pill:focus-visible {
  background: var(--accent-yellow-2); /* slightly lighter / brighter */
  color: var(--bg-dark);
  transform: translateY(-1px);
}


/* Desktop hover polish */
@media (hover: hover) {
  .map-preview-card,
  .embed-card {
    transition: transform 150ms ease, box-shadow 150ms ease;
  }

  .map-preview-link:hover .map-preview-card {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.10);
  }
}

/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  /* Slightly tighter gaps on small screens */
  .featured-actions {
    gap: 0.6rem;
  }

  /* Optional: make map preview a touch taller on mobile */
  /* .map-preview-card { aspect-ratio: 16 / 10; } */
}



/* ---------------------------------------------------------
   From Fieldwork to Strategic Perspective
   - Clean copy block + credibility bullets
   - 3-image strip with polished photo styling
   --------------------------------------------------------- */

/* Easy tweak knobs */
:root{
  --fieldwork-copy-max: 58rem;     /* line length control for copy */
  --photo-gap: 1rem;              /* spacing between photos */
  --photo-radius: 14px;           /* rounded corners */
  --photo-min-h: 220px;           /* equal height target on desktop */
  --photo-shadow: 0 10px 28px rgba(0,0,0,0.10);
  --photo-border: 1px solid rgba(0,0,0,0.08);
  --caption-size: 0.9rem;
  --caption-color: rgba(0,0,0,0.62);
}

.fieldwork h2{
  margin-bottom: 1rem;
}

/* Keep your sentence-per-line rhythm, but prevent ultra-wide lines */
.fieldwork-intro,
.fieldwork-body{
  max-width: var(--fieldwork-copy-max);
}

.fieldwork-intro p,
.fieldwork-body p{
  margin: 0 0 0.65rem 0;
}

/* Slight separation between intro + body */
.fieldwork-intro{
  margin-bottom: 1rem;
}

/* Credibility bullets */
.credibility-bullets{
  max-width: var(--fieldwork-copy-max);
  margin: 1.25rem 0 1.5rem 1.1rem;
  padding: 0;
}

.credibility-bullets li{
  margin: 0 0 0.55rem 0;
  line-height: 1.45;
}

/* Photo strip */
.photo-strip{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--photo-gap);
  margin-top: 1.25rem;
}

/* Photo card */
.photo-card{
  margin: 0;
}

.photo-card img{
  width: 100%;
  height: var(--photo-min-h);   /* forces equal height */
  object-fit: cover;            /* crops as needed */
  object-position: center;      /* tweak per image if needed */

  display: block;
  border-radius: var(--photo-radius);
  box-shadow: var(--photo-shadow);
  border: var(--photo-border);

  /* Subtle polish */
  filter: saturate(0.98) contrast(1.02);
}

/* Understated captions */
.photo-card figcaption{
  margin-top: 0.55rem;
  font-size: var(--caption-size);
  color: var(--caption-color);
}

/* Optional: per-image framing tweaks (uncomment + adjust if needed)*/
.photo-card:nth-child(1) img{ object-position: 40% 45%; }
.photo-card:nth-child(2) img{ object-position: 50% 35%; }
.photo-card:nth-child(3) img{ object-position: 50% 38%; }


@media (max-width: 768px) {

  /* Stack the photo cards */
  .credibility-photos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Let height be dictated by image ratio */
  .photo-card {
    height: auto;
  }

  .photo-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.2; 
    transform: scale(1.01);
	transform-origin: center;
	object-fit: cover;
    filter: saturate(0.95) contrast(0.98);
  }

  /* Fine-tune per image */
  .photo-field img {
    object-position: 50% 35%;
  }

  .photo-industry img {
    object-position: 50% 45%;
  }

  .photo-public img {
    /*transform: scale(1.0);*/
	object-position: 50% 30%;

  }

  /* Caption polish */
  .photo-card figcaption {
    font-size: 0.85rem;
    margin-top: 0.45rem;
    text-align: left;
  }
}




/* =========================================================
   CONTACT SECTION (Cards + CTAs)
   - Keep this block together. All contact tweaks live here.
   ========================================================= */

/* ---------- Adjustment knobs (change these first) ---------- */
:root{
  --contact-max: 1100px;         /* section content width (site max is 1100px) */
  --contact-gap: 1.5rem;        /* space between the two cards */
  --contact-radius: 14px;       /* card corner radius */
  --contact-pad: 1.25rem;       /* card inner padding */
  --contact-border: rgba(0,0,0,0.10);
  --contact-shadow: 0 10px 24px rgba(0,0,0,0.06);

  --contact-cta-max: 300px;     /* caps button width so it doesn’t feel stretched */
  --contact-lead-max: 80ch;     /* max width of intro paragraph */
}

/* ---------- Section spacing ---------- */
.section.contact{
  padding: 3rem 0;              /* adjust to tighten/loosen vertical spacing */
}

/* ---------- Narrower inner container (Option B) ---------- */
/* Wrap the contact content inside: <div class="contact-inner"> ... */
.contact-inner{
  max-width: var(--contact-max);
  margin: 0 auto;
}

/* ---------- Intro copy ---------- */
.section.contact .section-lead{
  margin: 0.5rem 0 1.25rem;
  max-width: var(--contact-lead-max);
  color: rgba(0,0,0,0.72);
}

/* ---------- 2-card layout ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: 0.8fr 0.8fr;  
  gap: var(--contact-gap);
  align-items: stretch;                  /* makes cards equal height */
}

/* ---------- Card styling ---------- */
.contact-card{
  background: #fff;
  border: 1px solid var(--contact-border);
  border-radius: var(--contact-radius);
  padding: var(--contact-pad);
  box-shadow: var(--contact-shadow);

  /* IMPORTANT: makes button positioning consistent across cards */
  display: flex;
  flex-direction: column;
}

.contact-card--alt{
  background: rgba(31,52,49,0.02);       /* subtle brand tint */
}

/* ---------- Text styles inside cards ---------- */
.contact-card-title{
  margin: 0 0 0.4rem;                    /* tighten title spacing */
  font-size: 1.05rem;
}

.contact-note{
  margin: 0.5rem 0 0.75rem;
  color: rgba(0,0,0,0.70);
}

.contact-note a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-micro{
  margin-top: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: rgba(0,0,0,0.62);
}

/* ---------- CTA alignment (makes both buttons same size/position) ---------- */
/* Key idea:
   - margin-top:auto pushes the button to the bottom of the card
   - max-width keeps the button from looking ridiculous on wide cards
   - align-self centers it within the card
*/
.contact-cta{
  width: 100%;
  max-width: var(--contact-cta-max);
  margin-top: auto;                      /* anchors CTA to bottom */
  align-self: center;                    /* centers the capped-width button */
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .contact-grid{
    grid-template-columns: 1fr;          /* stack cards */
  }

  .contact-card{
    padding: 1.1rem;                     /* slightly tighter on mobile */
  }

  .contact-cta{
    max-width: 100%;                     /* full-width button on small screens */
  }
}


/* =========================================================
   MODAL (Centered dialog)
   - Keep modal styles separate from the contact cards.
   ========================================================= */

.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.modal.is-open{
  display: block;
}

/* Backdrop */
.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

/* Dialog */
.modal__dialog{
  position: relative;
  width: min(640px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  margin: 6vh auto 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  padding: 1.25rem;
}

/* Title */
.modal__title{
  margin: 0 2.5rem 0.75rem 0;
  font-size: 1.1rem;
}

/* Close button */
.modal__close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* Tighten on small screens */
@media (max-width: 520px){
  .modal__dialog{
    margin-top: 4vh;
    padding: 1rem;
  }
}


/* =========================================================
   FORM (FormSubmit) inside modal
   ========================================================= */

.modal form{
  margin-top: 0.5rem;
}

/* Inputs */
.modal input,
.modal textarea{
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  font-size: 1rem;
  color: rgba(0,0,0,0.85);
}

.modal textarea{
  min-height: 120px;
  resize: vertical;
  line-height: 1.35;
}

/* Focus */
.modal input:focus,
.modal textarea:focus{
  outline: none;
  border-color: rgba(31,52,49,0.55);
  box-shadow: 0 0 0 4px rgba(31,52,49,0.10);
}

/* Submit button (uses your site variables) */
.submit-btn{
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.85rem 1.05rem;
  border-radius: 999px;
  border: 2px solid var(--accent-yellow);
  background: var(--accent-yellow);
  color: var(--bg-dark);
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.submit-btn:hover{
  background: var(--accent-yellow-2);
  border-color: var(--accent-yellow-2);
  transform: translateY(-1px);
}


/* =========================================================
   FORM SUCCESS (Thank you state)
   ========================================================= */

.form-success{
  text-align: center;
  padding: 2rem 0;
}

.form-success h4{
  margin-bottom: 0.5rem;
}

.form-success p{
  color: rgba(0,0,0,0.72);
}


/* ---------------------------------------------------------
   Placeholder sections (we’ll replace these next)
   --------------------------------------------------------- */
.placeholder-section {
  padding: 2.5rem 0;
}

.placeholder-section h2 {
  margin: 0 0 0.6rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--bg-dark);
}

.placeholder-section p {
  margin: 0;
  color: var(--grey-4);
}

/* Contact anchor placeholder */
.contact-anchor {
  padding: 2.5rem 0;
  background: #f7f8f8;
  border-top: 1px solid rgba(67, 84, 82, 0.15);
}

.contact-anchor h2 {
  margin: 0 0 0.6rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--bg-dark);
}

.contact-anchor p {
  margin: 0;
  color: var(--grey-4);
}

/* --- Modal shell --- */
.modal {
  position: fixed;
  inset: 0;
  display: none;             /* toggle with JS */
  place-items: center;
  padding: 1.25rem;
  background: rgba(17, 24, 23, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
}

.modal[aria-hidden="false"] {
  display: grid;
}

.modal-content {
  width: min(640px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  padding: 1.25rem 1.25rem 1.1rem 1.25rem;
  position: relative;
  border: 1px solid rgba(0,0,0,0.08);
}

.modal-content h2 {
  margin: 0 0 0.85rem 0;
  font-size: 1.6rem;
  line-height: 1.2;
}

/* Close button */
.modal-content .close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.9);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* Inputs */
#contactForm {
  display: grid;
  gap: 0.75rem;
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  font: inherit;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(31,52,49,0.02);
  outline: none;
}

#contactForm textarea {
  resize: vertical;
  min-height: 140px;
}

/* Focus ring */
#contactForm input:focus,
#contactForm textarea:focus {
  border-color: rgba(255, 215, 0, 0.75);
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.22);
  background: #fff;
}

/* Submit button */
.submit-btn {
  display: inline-block;
  width: fit-content;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 2px solid var(--accent-yellow);
  background: var(--accent-yellow);
  color: var(--bg-dark);
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.submit-btn:hover {
  background: var(--accent-yellow-2);
  border-color: var(--accent-yellow-2);
  transform: translateY(-1px);
}

/* Mobile */
@media (max-width: 600px) {
  .modal-content {
    padding: 1rem;
    border-radius: 16px;
  }

  .submit-btn {
    width: 100%;
    text-align: center;
  }
}




/* =========================
   FOOTER (3-column)
   Left: copyright
   Center: stacked centered links (no bullets)
   Right: green logo
   ========================= */

.site-footer {
  background: var(--bg-dark);            /* your dark green theme */
  color: #ffd700;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* left / center / right */
  align-items: center;
  gap: 1.25rem;
}

/* -------------------------
   Left column
   ------------------------- */
.footer-col-left {
  justify-self: start;
}

.footer-copy {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.footer-rights {
  margin: 0.25rem 0 0 0;
  
  font-size: 0.95rem;
}

/* -------------------------
   Center links (stacked, centered)
   No bullets because we're not using <ul>
   ------------------------- */
.footer-col-center {
  justify-self: center;
  text-align: center;
}

.footer-links {
  display: grid;
  gap: 0.45rem;                          /* space between links */
  justify-items: center;                 /* keep each link centered */
}

.footer-links a {
  color: #ffd700;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.15px;
  transition: color 140ms ease, transform 120ms ease, text-decoration-color 140ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #c3aa23;
  transform: translateY(-1px);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #c3aa23;
}

/* -------------------------
   Right logo
   ------------------------- */
.footer-col-right {
  justify-self: end;
}

.footer-logo {
  width: 200px;                          /* tweak */
  max-width: 100%;
  height: auto;
  opacity: 0.95;
}

/* -------------------------
   Responsive: stack cleanly
   Order chosen for readability:
   links (utility) -> logo (brand) -> copyright (legal)
   ------------------------- */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }

  .footer-col-left,
  .footer-col-center,
  .footer-col-right {
    justify-self: center;
  }

  .footer-col-center { order: 1; }
  .footer-col-right  { order: 2; }
  .footer-col-left   { order: 3; }

  .footer-logo {
    width: 110px;
  }
}

/* =========================
   ABOUT MODAL (polish for long-form copy)
   - Works with your existing .modal / .modal-content / .close classes
   - Keeps layout consistent with site branding
   ========================= */

/* If you already have .modal overlay styles elsewhere, keep them.
   This block mainly refines the modal "card" and typography. */

#aboutModal.modal {
  /* If your existing .modal already sets overlay, you can omit these. */
  position: fixed;
  inset: 0;
  display: none;                 /* shown when aria-hidden="false" */
  place-items: center;
  padding: 1.25rem;
  background: rgba(17, 24, 23, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
}

#aboutModal.modal[aria-hidden="false"] {
  display: grid;
}

/* The white card */
#aboutModal .modal-content {
  width: min(760px, 100%);
  max-height: min(82vh, 900px);  /* keeps it usable on small screens */
  overflow: auto;                /* long copy scrolls inside the card */
  background: #fff;
  border-radius: 18px;
  padding: 1.6rem 2rem 1.4rem 2rem; /* more side breathing room */

  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
  position: relative;
}

/* Center the reading column, keep text left-aligned */
#aboutModal h2,
#aboutModal p {
  max-width: 100%;        /* readable measure */
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}


/* Close button */
#aboutModal .close {
  position: sticky;              /* stays visible while scrolling */
  top: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.92);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: rgba(0,0,0,0.60);
  z-index: 2;
}

#aboutModal .close:hover {
  color: rgba(0,0,0,0.85);
}

/* Title */
#aboutModal h2 {
  margin: -2.2rem 0 0.75rem 0;   /* pulls title up under sticky close */
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: 0.2px;
  color: rgba(0,0,0,0.86);
}

/* Copy rhythm */
#aboutModal p {
  margin: 0 0 0.9rem 0;
  line-height: 1.55;
  color: rgba(0,0,0,0.78);
  max-width: 66ch;               /* readable measure */
}

/* First bold line */
#aboutModal p strong {
  color: rgba(0,0,0,0.88);
}

/* Links */
#aboutModal a {
  color: rgba(31, 52, 49, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(31, 52, 49, 0.35);
}

#aboutModal a:hover,
#aboutModal a:focus-visible {
  color: var(--accent-yellow);
  text-decoration-color: rgba(255, 215, 0, 0.75);
}

/* Make scrolling feel nicer */
#aboutModal .modal-content::-webkit-scrollbar {
  width: 10px;
}
#aboutModal .modal-content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
}
#aboutModal .modal-content::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.06);
}

/* Mobile */
@media (max-width: 600px) {
  #aboutModal .modal-content {
    padding: 1.1rem 1rem 1rem 1rem;
    border-radius: 16px;
    max-height: 86vh;
  }

  #aboutModal h2 {
    font-size: 1.35rem;
    margin-top: -2.0rem;
  }

  #aboutModal p {
    max-width: 100%;
  }
}


/* ---------------------------------------------------------
   Mobile adjustments
   --------------------------------------------------------- */
@media (max-width: 600px) {
  .hero {
    min-height: 78vh; /* a touch taller on mobile for breathing room */
    background-position: 55% center; /* tweak if your train subject gets cropped */
  }

  .header-inner {
    padding: 0.75rem 0;
  }
}
