/* =========================
   Base reset
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body{
  height: 100%;
  width: 100%;
}

/* =========================
   Base & variables
========================= */
:root {
  --mars-orange: #b65a1e;
  --mars-orange-dark: #8f4315;
  --mars-yellow: #f6e6c8;
  --mars-yellow-dim: #e8d4a8;
  --mars-shadow: rgba(0,0,0,0.35);

  --locator-red: #ff1f1f;
  --locator-red-glow: rgba(255, 31, 31, 0.65);

  /* Header heights for positioning */
  --header-h: 96px;
  --header-h-mobile: 80px;

  /* Text panel (readability box) */
  --text-panel-bg: rgba(55, 28, 14, 0.68);
  --text-panel-border: rgba(255, 255, 255, 0.12);
}

/* Keep layout stable: always reserve scrollbar space (prevents tiny “shift”) */
body{
  margin: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  background: none; /* IMPORTANT: move background to ::before */
  min-height: 100vh;
  min-height: 100svh; /* helps mobile address-bar resizing */
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--mars-yellow);
}

/* Make your main content expand and push footer down */
main,
.site-main,
.page,
#page,
.content{
  flex: 1 0 auto;
  width: 100%;
}

/* Footer must not shrink */
.site-footer{
  flex-shrink: 0;
}

/* Prevent accidental horizontal overflow from media */

/* Ensure generic containers never force overflow */
.container{width:100%; max-width:100%;}
img, video, canvas, svg{
  max-width: 100%;
  height: auto;
}

/* The real background lives here (prevents the “jump” on state changes) */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
    url("/images/italymars.png") no-repeat center center;

  background-size: cover;
  background-position: center center;

  /* Helps prevent repaint jitter on some GPUs/browsers */
  transform: translateZ(0);
  will-change: auto;
}

/* =========================
   Header
========================= */
.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  max-width: 1400px;
  height: var(--header-h);

background:
  radial-gradient(
    ellipse at center,
    rgb(244, 228, 208) 0%,
    rgb(232, 206, 176) 16%,
    rgb(182, 90, 30) 45%,
    rgb(143, 67, 21) 70%,
    rgb(90, 38, 10) 100%
  );

  border-radius: 999px; /* oval tube */
  box-shadow:
  inset 0 14px 22px rgba(255,255,255,0.14),
  inset 0 -18px 26px rgba(0,0,0,0.36),
  0 18px 32px rgba(0,0,0,0.42);

  z-index: 1000;
}

.site-header nav a{
  font-weight: 600; /* was likely 400 */
}

/* Make the brand text ("Mara San Farino") stronger */
.site-header .brand-text,
.site-header .logo,
.site-header .site-title,
.site-header .header-brand,
.site-header .header-left a{
  font-weight: 700;
}



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

@media (max-width: 700px) {
  .site-header {
    height: var(--header-h-mobile);
    width: 96%;
  }

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

@media (max-width: 700px){

  .site-header{
    /* slightly darker + narrower highlight, still opaque */
    background:
      radial-gradient(
        ellipse at center,
        rgb(238, 220, 196) 0%,
        rgb(218, 188, 156) 14%,
        rgb(175, 86, 28) 42%,
        rgb(138, 64, 20) 70%,
        rgb(90, 38, 10) 100%
      );

    /* same character, but less aggressive */
    box-shadow:
      inset 0 12px 20px rgba(255,255,255,0.12),
      inset 0 -16px 22px rgba(0,0,0,0.32),
      0 16px 28px rgba(0,0,0,0.38);
  }

}


/* =========================
   Brand
========================= */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--mars-yellow);
}

.brand-mark {
  height: 36px;
  width: auto;
}

.brand-text {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* =========================
   Desktop navigation
========================= */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--mars-yellow);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
}

/* =========================
   Hamburger button
========================= */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--mars-yellow);
  margin: 6px 0;
}

/* =========================
   Mobile menu (fullscreen)
========================= */
.mobile-menu {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  background: #b65a1e;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-inner {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-top: calc(var(--header-h-mobile) + 18px);
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 24px;
  background: #b65a1e;
}

.mobile-close {
  position: absolute;
  top: calc((var(--header-h-mobile) - 26px) / 2);
  right: 2rem;

  width: 26px;
  height: 26px;

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

  font-size: 44px;
  line-height: 1;

  background: none;
  border: none;
  color: var(--mars-yellow);
  cursor: pointer;
}

.mobile-nav {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  width: 100%;
}

.mobile-nav li {
  margin: 1.35rem 0;
}

.mobile-nav a {
  display: inline-block;
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  color: var(--mars-yellow);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.mobile-nav a:hover {
  opacity: 1;
  transform: scale(1.05);
}
/* =========================
   Responsive
========================= */
@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

/* =========================
   Mars locator intro (red action letters)
========================= */

/* Container: centered under header, never hidden behind it */
.mars-locator{
  position: fixed;
  width: 100%;
  display: flex;
  flex-direction: column;    /* stack skip above box */
  align-items: center;
  justify-content: flex-start;
  padding: 0 16px;
  z-index: 20;
  left: 0;
  right: 0;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding-top: calc(var(--header-h) + 14px); /* keep it below header (desktop) */
  pointer-events: auto;
}

/* Mobile */
@media (max-width: 700px){
  .mars-locator{
    padding-top: calc(var(--header-h-mobile) + 70px);
  }
}

.intro-skip-wrap{
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 14px; /* keeps it above the box without covering */
}

.intro-skip{
  background: #000; /* solid black */
  color: var(--locator-red);
  border: 1px solid rgba(255,31,31,0.75);
  padding: 10px 18px;
  border-radius: 10px;
  font: 600 0.95rem/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
}

.intro-skip:hover{ filter: brightness(1.08); }
.intro-skip:active{ transform: translateY(1px); }

/* Lock all navigation until intro ends/skips */
.intro-lock .main-nav,
.intro-lock .menu-toggle,
.intro-lock .mobile-menu,
.intro-lock .mobile-close{
  pointer-events: none;
}

.intro-lock .menu-toggle{
  opacity: 0.35;
  cursor: not-allowed;
}

.intro-lock .main-nav{ opacity: 0.45; }

/* The “HUD card” */
.mars-locator-inner{
  display: inline-block;
  width: fit-content;      /* shrink-wrap to content */
  max-width: 92vw;         /* still safe on mobile */
  padding: 18px 22px;
  border: 1px solid rgba(255, 31, 31, 0.28);
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(7px);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.42);
}

/* Terminal font + strong red */
.mars-locator-line{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--locator-red);
  text-shadow:
    0 0 10px var(--locator-red-glow),
    0 0 24px rgba(255,31,31,0.28);
  line-height: 1.25;
}

#mars-coords{ font-size: 1.05rem; opacity: 0.98; }
#mars-line-1{ font-size: 1.55rem; margin-top: 12px; }
#mars-line-2{ font-size: 1.05rem; margin-top: 8px; opacity: 0.92; }
#mars-line-3{ font-size: 1.05rem; margin-top: 8px; opacity: 0.92; }

.mars-postcode{
  font-size: 0.9rem;
  margin-top: 10px;
  opacity: 0.6;
  letter-spacing: 0.18em;
}

.mars-scramble{ animation: marsFlicker 0.08s infinite alternate; }

@keyframes marsFlicker{
  from { opacity: 0.78; filter: blur(0.25px); }
  to   { opacity: 1;    filter: blur(0px); }
}

.mars-hide{ animation: marsFadeOut 0.85s ease forwards; }

@keyframes marsFadeOut{ to { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 700px){
  #mars-coords{ font-size: 1.02rem; }
  #mars-line-1{ font-size: 1.35rem; }
  #mars-line-2{ font-size: 1.0rem; }
  .mars-postcode{ font-size: 1.0rem; letter-spacing: 0.14em; }
}

/* =========================
   Hero content (H1 + intro text)
========================= */

/* Base hero layout: ALWAYS below the fixed header */
.hero-content{
  width: 94%;
  max-width: 980px;

/* start the whole brown box below the fixed header, and keep SAME 22px gap to footer */
margin: calc(var(--header-h) + 22px) auto 22px;

/* do NOT push content down with padding-top anymore */
padding-top: 0;

/* do NOT create fake space before the footer */
padding-bottom: 0;
}

@media (max-width: 700px){
  .hero-content{
    width: 96%;

margin: calc(var(--header-h-mobile) + 22px) auto 22px;
padding-top: 0;
padding-bottom: 0;
  }
}


/* Hidden state: MUST stay invisible until locator finishes */
.hero-content.is-hidden{
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Visible state */
.hero-content.is-visible{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.6s ease;
}
/* =========================
   Typography
========================= */
.hero-content h1,
.hero-content h2,
.hero-content h3{
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--mars-yellow);
}

.hero-content h1{
  font-size: clamp(2.0rem, 3.6vw, 3.1rem);
  margin: 4px 0 18px;
}

.hero-content h2{
  font-size: clamp(1.45rem, 2.2vw, 2.0rem);
  margin: 26px 0 10px;
}

.hero-content h3{
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  margin: 20px 0 8px;
}

.hero-content p{
  margin: 0 0 14px;
  font-size: clamp(1.02rem, 1.15vw, 1.12rem);
  line-height: 1.65;

  text-align: justify;
  text-justify: inter-word;

  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: anywhere;
  word-break: normal;

  color: rgba(246,230,200,0.92);
}

@media (max-width: 700px){
  .hero-content p{ text-align: left; }
}

/* Ensure H1 never sits under the fixed header */
.hero-content h1{
  margin-top: 10px;   /* pushes it below the header capsule */
}

/* Mobile: header is taller visually, needs more space */
@media (max-width: 700px){
  .hero-content h1{
    margin-top: 20px;
  }
}

/* =========================
   Flour image (responsive)
========================= */
.hero-content img.flour{
  display: block;
  width: 160px;
  height: 320px;
  object-fit: contain;
  margin: 18px auto 22px;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

@media (max-width: 700px){
  .hero-content img.flour{
    width: min(240px, 70vw);
    height: auto;
    max-height: 42vh;
    margin: 14px auto 18px;
  }
}

/* =========================
   Footer: SAME capsule width as header + stuck to bottom
========================= */
.site-footer{
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  max-width: 1400px;

  height: auto;
  min-height: 110px;
  padding: 14px 0;
  border-radius: 999px;
  overflow: hidden;

  background:
    radial-gradient(
      ellipse at center,
      rgba(255,255,255,0.12) 0%,
      rgba(255,255,255,0.05) 18%,
      rgba(18,28,18,0.98) 45%,
      rgba(8,14,10,1) 72%,
      rgba(3,6,4,1) 100%
    );

  box-shadow:
    inset 0 18px 28px rgba(255,255,255,0.10),
    inset 0 -22px 32px rgba(0,0,0,0.62),
    0 22px 40px rgba(0,0,0,0.58);

  margin-top: auto;   /* stick to bottom on short pages */
  margin-bottom: 0;   /* flush */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Lava tube texture */
.site-footer::before{
  content:"";
  position:absolute;
  inset:0;
  background: url("/images/darklavatube1.png") center / cover no-repeat;
  /* Optional tweaks you previously tested:
     filter: brightness(0.85) contrast(1.08);
     opacity: 0.95;
  */
}

.site-footer .footer-top,
.site-footer .footer-legal{
  position: relative;
  z-index: 2;
}

.site-footer .footer-top{
  width: 100%;
  display:flex;
  justify-content:center;
}

.footer-nav{
  display:flex;
  gap: 18px;
  align-items:center;
  flex-wrap: wrap;
  justify-content: center;
  white-space: normal;
  max-width: 92%;
}

.footer-nav a{
  color: rgba(246,230,200,0.92);
  text-decoration:none;
  font-size: 0.90rem;
  letter-spacing: 0.04em;
}
.footer-nav a:hover{ color: rgba(246,230,200,1); }

.footer-legal{
  margin-top: 15px;
  text-align:center;
  color: rgba(232,212,168,0.85);
  font-size: 0.82rem;
  line-height: 1.2;
}

@media (max-width: 700px){
  .site-footer{
    width: 96%;
    min-height: 120px;
  }

  .footer-nav{
    gap: 8px 14px;
    text-align: center;
  }

  .footer-nav a{
    font-size: 0.86rem;
  }
}

/* =========================
   Cookie Banner (KEEP)
========================= */
.cookie-banner{
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: -100%;
  transition: bottom .35s ease;
  z-index: 9999;
}
.cookie-banner.show{ bottom:16px; }

.cookie-inner{
  background:
    linear-gradient(0deg, rgba(8,5,18,0.88), rgba(8,5,18,0.65)),
    url("/images/lavatube.png") center / cover no-repeat;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.55);
  padding:16px;
  color: var(--mars-yellow);
  max-width:980px;
  margin:0 auto;
}

.cookie-inner h3{
  margin:0 0 6px;
  font-size:1.05rem;
}

.cookie-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

/* ==========================================================
   Text readability panels (non-menu content)
   - dark “aura box” behind content, not a shadow
   ========================================================== */

/* Main content panels (you already use .hero-content; .section-card is a safe extra hook) */
.hero-content,
.section-card{
  background: var(--text-panel-bg);
  border: 1px solid var(--text-panel-border);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 28px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* Keep text crisp inside panels */
.hero-content h1, .hero-content h2, .hero-content h3,
.hero-content p, .hero-content li, .hero-content span,
.section-card h1, .section-card h2, .section-card h3,
.section-card p, .section-card li, .section-card summary, .section-card span{
  text-shadow: none !important;
}

/* Links inside panels */
.hero-content a, .section-card a{
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Q&A specifics (if present) */
.faq-list details{ background: transparent; }
.faq-list summary{ cursor: pointer; }


/* =========================
   Mobile width lock (no overflow)
========================= */
@media (max-width: 700px){

  html, body{
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* prevent any section/card from exceeding viewport */
  .hero,
  .hero-content,
  .section-card,
  main,
  section{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* images can never push layout wider */
  img{
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* =========================
   Contact form  NN structure, Mara colours
========================= */

form#contact-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

form#contact-form.narrow {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #fff;
  color: #000;
  font-size: 0.98rem;
}

.form-group input {
  height: 40px;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--mars-yellow-dim);
  background: #fff;
}

/* red validation messages */
.error-msg {
  color: #ff2a2a !important;
  display: none;
  font-size: 0.9em;
  margin-top: 4px;
  background: transparent;
  text-shadow: none !important;
  position: relative;
  z-index: 3;
}

form.submitted .error-msg.visible {
  display: block;
}

/* consent line */
.form-consent{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:10px;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 0;
}

.form-consent input[type="checkbox"]{
  width:18px;
  height:18px;
  flex:0 0 auto;
  margin-top:2px;
  accent-color: var(--mars-orange);
}

.form-consent .consent-text{
  max-width:680px;
  text-align:left;
}

.form-consent label{
  width:auto !important;
  display:block;
  margin:0;
  text-align:left;
  line-height:1.35;
  color: var(--mars-yellow);
}

.form-consent label a{
  color: #fff;
  text-decoration: underline;
}

.form-consent .error-msg{
  margin:6px 0 0;
  text-align:left;
}

/* keep form labels above fields like NN */
#contact-form .form-group label{
  display:inline-block;
  width:100%;
  text-align:center;
  margin-bottom: 4px;
  color: var(--mars-yellow);
}

/* compact centered button */
.form-actions{
  display:flex;
  justify-content:center;
  margin-top:6px;
}

.form-actions .btn{
  width:auto;
  align-self:center;
  padding:8px 16px;
  border-radius:12px;
  font-size:0.95rem;
}

/* Mara primary button */
.btn{
  cursor:pointer;
  border-radius:12px;
  padding:8px 14px;
  font-weight:600;
  border:1px solid transparent;
}

.btn-primary{
  background: var(--mars-orange);
  color: #fff;
}

.btn-primary:hover{
  background: var(--mars-orange-dark);
}

/* success message */
#success-message{
  color: #90ee90 !important;
  display: none;
  margin-top: 15px;
  text-align: center;
}

