*{
  box-sizing: border-box;
}

@font-face {
  font-family: 'Crosstown';
  src: url('Crosstown.eot'); /* IE9 Compat Modes */
  src: url('Crosstown.eot?#iefix') format('embedded-opentype'), /* IE6–IE8 */
       url('Crosstown.woff2') format('woff2'), /* Super modern browsers */
       url('Crosstown.woff') format('woff'),   /* Modern browsers */
       url('Crosstown.ttf') format('truetype'), /* Legacy Safari, Android */
       url('Crosstown.svg#Crosstown') format('svg'); /* Legacy iOS */
  font-weight: normal;
  font-style: normal;
}

.story-text, .longform, p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.1rem;         /* Adjust size as needed */
  line-height: 1.1;          /* Improves readability */
  color: white;              /* Or another appropriate color */
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* Optional for contrast on backgrounds */
  text-align: left;

}

/* ==== Global Reset and Body Styles ==== */
/* ---- fixed full-screen background, scroll content ---- */

html, body{
  height: 100%;
  margin: 0;
}

body{
  /* remove any old background on body */
  background: transparent;
}

/* The magic: a fixed layer behind everything */
body::before{
  content: "";
  position: fixed;
  inset: 0;                     /* top:0 right:0 bottom:0 left:0 */
  background: url('calcamino.png') center center / cover no-repeat;
  z-index: -1;                  /* sit behind page content */
  will-change: transform;       /* helps Safari performance */
  transform: translateZ(0);
}

/* Your scrolling content wrapper */
.page-wrapper{
  min-height: 100%;
  position: relative;
}

/* ==== Header Container ==== */
.container-header {
  position: absolute;
  top: 0;
  left: 0;
  height: 20vh;
  width: 40vw;


  display: flex;
  align-items: center;
  justify-content: flex-start;

  font-family: 'Pacifico', cursive; /* Optional if you use a vintage web font */
  font-size: 6rem;
  color: white;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

/* ==== Subtitle Container ==== */
.container-subtitle {
  position: absolute;
  top: 0;
  right: 0;
  height: 20vh;
  width: 60vw;

  display: flex;
  align-items: center;
  text-align: left;
  justify-content: flex-start;

  font-size: 2.1rem;
  font-family: 'Crosstown', sans-serif;
  color: white;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

/* ==== Hero Text Container ==== */
.container-hero-text {
  position: absolute;
  top: 20vh;
  left: 0;
  width: 40vw;
  height: 40vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Crosstown', sans-serif;
  font-size: 2rem;
  color: white;
  letter-spacing: .027em;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

/* ==== Right Feature Box Container ==== */
.container-right-box {
  position: absolute;
  top: 20vh;
  right: 2rem;
  width: 58vw;
  height: 62vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  font-size: 2rem;
  line-height: 1;

  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.55);
  border-radius: 20px;
}

.right-page-border {
  position: absolute;
  width: 4vw;
  height: 100vh;
  border: none;
  background: transparent;
  right: 2rem; /* This offsets it inward from the edge */
}

/* ==== CTA Button ==== */
.cta {
  background-color: #ff6600;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  padding: 0.6rem;
  border-radius: 12px;
  margin-top: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cta:hover {
  background-color: #c2410c;
}

.flash-divider {
  width: 80%;
  border: none;
  height: 1px;
  background-color: #ffffff;              /* fallback for older browsers */
  background-color: rgba(255, 255, 255, 0.4); /* preferred modern value */
  margin-bottom: 1rem;
}

.divider-wrapper-low {
  position: absolute;
  top: 75vh;  /* Or wherever it needs to appear */
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

/* ==== Footer Navigation Container ==== */
.footer-nav-container {
  position: absolute;
  top: 84vh;
  left: 0;
  width: 100vw;
  height: 16vh;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: rgba(0, 0, 0, 0.7);
  font-family: 'Crosstown', sans-serif;
  font-size: 2.3rem;
  color: white;
}

.page-wrapper {
  position: relative;
  min-height: 100vh;
  padding-bottom: 80px; /* Prevent content from hiding behind footer */
  box-sizing: border-box;
}

.footer-nav-container a {
  color: white;
  text-decoration: none;
  font-weight: normal;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.footer-nav-container a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  body, html {
    background-image: url('/assets/calcamino.png');
    background-repeat: repeat-y; /* or repeat-x, or simply repeat */
    background-size: cover; /* or contain, depending on desired effect */
    background-position: center top;
    margin: 0;
    padding: 0;
    height: 100%;
  }
  
  .container-hero-text,
  .container-right-box {
    width: 100vw;
    height: auto;
    display: flex;
    flex-direction: column;
    position: static;
    padding: 1rem;
  }

  .container-right-box {
    align-items: center;
    text-align: center;
  }

  .divider-wrapper-high,
  .divider-wrapper-low {
    position: static;
  }

  .main-text-container {
    width: 90%;
    margin: auto;
    font-size: 1rem;
    padding: 1.5rem;
  }

  .feature-list {
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .background-section {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* ✅ Stack subtitle below header */
  
   .container-header {
    position: static;
    width: 100%;
    height: auto;
    background-color: rgba(0, 0, 0, 0.55);
    text-align: center;
    display: block;
    margin: 0 auto;
    padding: 1rem 0;
  }
  
  .container-subtitle {
    position: static;
    width: 80%;
    height: auto;
    text-align: center;
    display: block;
    margin: 0 auto;
    padding: 1rem 0;
  }
  
   .container-header {
    font-size: 4.5rem;
    line-height: 1.2;
  }

  .container-subtitle {
    font-size: 1.5rem;
    margin-top: 0.5rem;
  }

  /* ✅ Footer stays at the bottom */
  .footer-nav-container {
    position: fixed;
    flex-direction: row;
    align-items: center;
    padding: 1rem 0;
    gap: 0.75rem;
  }

  .footer-nav-container a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
  }
}

  /* Ensure parent container allows footer to anchor */
  .pages-wrapper, .background-section {
    min-height: 100vh;
    position: relative;
    padding-bottom: 4rem; /* give room for footer */
    box-sizing: border-box;
  }

/* === Cross-browser layout fixes (append at end of pages.css) === */
:root{
  --top-offset: 20vh;   /* where your card starts */
  --footer-vh: 16vh;    /* your footer height */
}

/* Make the form card taller and start at the top */
.container-right-box{
  top: var(--top-offset);
  height: auto;                          /* was 62vh */
  min-height: max(70vh, 560px);          /* taller baseline */
  /* use dynamic viewport units when available to avoid clipping */
  max-height: calc(100svh - var(--top-offset));
  overflow-y: auto;

  /* don't vertically center; show top of form */
  justify-content: flex-start;           /* was center */
  align-items: stretch;

  /* keep last fields above the footer */
  padding-bottom: calc(var(--footer-vh) + 24px);
}

@supports (height: 100dvh) {
  .container-right-box{
    max-height: calc(100dvh - var(--top-offset));
  }
}

/* Hero text a touch smaller for Chrome/Firefox */
.container-hero-text{ height: 36vh; }     /* was 40vh */
.container-hero-text h1{
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.05;
}

/* make sure footer stays above background everywhere */
.footer-nav-container{ z-index: 5; }



