/*
  Hannah Farms marketing site stylesheet
  -------------------------------------

  This stylesheet defines a clean, modern layout inspired by minimal Burb‑style design.
  It features:
    - A fixed navigation bar with a logo and simple menu
    - Full‑bleed hero image with overlaying text and call‑to‑actions
    - Panel components supporting both video and image backgrounds with overlay and floating
      content cards
    - A responsive brand portfolio grid
    - A simple contact section with form and information

  The file uses CSS variables for colours and spacing for easy customisation. Adjust the
  `--` variables below to tweak the look and feel.
*/

/* ====== Variables & base reset ====== */
:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --accent: #4caf50;
  --accent-dark: #3d9142;
  --line: #e9e9e9;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --max-width: 1180px;
  --padding: 24px;
  --radius: 16px;
  --radius-sm: 12px;
  --btn-radius: 999px;
  --hero-height: 85vh;
  --panel-height: 620px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}
.fineprint {
  font-size: 0.85rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====== Navigation ====== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  max-height: 72px;
  overflow: hidden;
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding) 4px var(--padding);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.logo-image {
  height: 64px;
  width: auto;
  display: block;
}

.menu {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
  color: var(--muted);
}
.menu a {
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.menu a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Mobile menu toggle button */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  padding: 10px;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__toggle--open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav__toggle--open span:nth-child(2) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ====== Hero section ====== */
.hero {
  position: relative;
  height: var(--hero-height);
  min-height: 560px;
  padding-top: 172px; /* space for fixed nav — matches 164px logo + 8px nav padding */
  display: grid;
  place-items: center;
  overflow: hidden;
}

/*
  Hero background
  Place your hero background image at /images/hero-bg.jpg.
*/
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: saturate(1.4) brightness(1.05);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.30),
    rgba(255, 255, 255, 0.10) 35%,
    rgba(255, 255, 255, 0.45)
  );
}

.hero__content {
  position: relative;
  max-width: var(--max-width);
  width: 100%;
  padding: 0 var(--padding);
  text-align: left;
}

.kicker {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 14px 0;
  font-weight: 600;
  max-width: 760px;
}

.lead {
  font-size: 1.05rem;
  color: #2d2d2d;
  max-width: 640px;
  margin: 0 0 22px 0;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--btn-radius);
  border: 1px solid rgba(0, 0, 0, 0.14);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn--primary {
  background: var(--text);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.18);
}
.btn--primary:hover {
  opacity: 0.9;
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.80);
}

/* ====== Sections & panels ====== */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 92px var(--padding);
}

.panel {
  position: relative;
  padding: 0;
  max-width: none;
  overflow: hidden;
}

/* Panel background (for static images) */
.panel__bg {
  height: var(--panel-height);
  border: none;
  background-size: cover;
  background-position: center;
}

/* Overlay fade on panels for readability */
.panel__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08),
    rgba(0, 0, 0, 0.02) 40%,
    rgba(0, 0, 0, 0.15)
  );
  pointer-events: none;
  z-index: 1;
}

/*
  Panel inner — floating card on panels.
  Left-aligned and half-width so the background video/image shows through on the right side.
*/
.panel__inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 0 0 var(--padding);           /* left-aligned with page padding */
  padding: 28px 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel__inner h2 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 12px 0;
  font-weight: 600;
}
.panel__inner p {
  margin: 0 0 14px 0;
  color: #2a2a2a;
  max-width: 72ch;
}

/*
  FIX: Video panels.
*/
.panel--video {
  position: relative;
  overflow: hidden;
  min-height: var(--panel-height);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 48px;
}

/* About section: card in top-right corner */
#about.panel--video {
  justify-content: flex-start;
  padding-top: 48px;
  padding-bottom: 0;
}
#about .panel__inner {
  margin-left: auto;
  margin-right: var(--padding);
}

/* Toll Services: card in bottom-left corner (default, already handled by base styles) */
#toll-services.panel--video {
  justify-content: flex-end;
  padding-bottom: 48px;
}
#toll-services .panel__inner {
  margin-left: var(--padding);
  margin-right: auto;
}

.panel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(1.5) brightness(1.05);
}

/*
  FIX: Image panels also get the flex layout so the card sits consistently.
  The panel__bg still provides intrinsic height as before.
*/
.panel:not(.panel--video) {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 48px;
}
/* Cards inside panels */
.cardlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}
.card h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  font-weight: 600;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Brand portfolio image background */
.media--brand {
  background-image: url('../images/brand.jpg');
}

/* Brand section: override panel__inner to go full-width wall-to-wall */
#brand-portfolio .panel__inner {
  max-width: none;
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  padding: 40px 48px;
}

/* Brand grid inside brand portfolio — wall-to-wall, large images */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 32px -48px 32px -48px; /* bleed to edges of the card */
}
.brand-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0;
  border: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  background: #f5f5f5;
  padding: 0;
  box-shadow: none;
}
.brand-grid img:last-child {
  border-right: none;
}

/* ====== Contact section ====== */
.contact {
  background: #fafafa;
  max-width: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.contact__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 92px var(--padding);
}
.contact__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 22px;
  margin-top: 22px;
}

.contact__info {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.infoRow {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.infoRow:last-child {
  border-bottom: none;
}
.label {
  color: var(--muted);
  font-size: 0.95rem;
}
.value a {
  color: var(--text);
}

.form {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form input,
.form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  outline: none;
}
.form input:focus,
.form textarea:focus {
  border-color: rgba(0, 0, 0, 0.28);
}

/* ====== Footer ====== */
.footer {
  padding: 32px var(--padding);
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .cardlist {
    grid-template-columns: 1fr;
  }
  .contact__grid {
    grid-template-columns: 1fr;
  }
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
    margin: 32px -28px 32px -28px;
  }
}

@media (max-width: 760px) {
  .menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 14px var(--padding);
    flex-direction: column;
    gap: 10px;
  }
  .menu--open {
    display: flex;
  }
  .nav__toggle {
    display: block;
  }
  .hero {
    min-height: 520px;
    height: 82vh;
  }

  /*
    MOBILE PANEL REDESIGN
    Switch from overlapping card-over-video to a clean vertical stack:
    video block on top (fixed height, full width), card below with white bg.
    No overlap, no transparency — readable and professional.
  */
  .panel--video,
  .panel:not(.panel--video) {
    display: block;             /* drop flex so we can stack naturally */
    min-height: unset;
    padding: 0;
    overflow: hidden;
  }

  /* Video becomes a standalone cinematic block at the top */
  .panel__video {
    position: relative;         /* back in normal flow on mobile */
    inset: unset;
    width: 100%;
    height: 260px;              /* cinematic strip — enough to read but not overwhelming */
    object-fit: cover;
    display: block;
    filter: saturate(1.5) brightness(1.05);
  }

  /* Image-based panel bg also becomes a fixed-height block */
  .panel__bg {
    height: 260px;
    position: relative;
  }

  /* Hide the overlay on mobile — not needed without text on top of video */
  .panel__overlay {
    display: none;
  }

  /* Card sits below the video, full width, clean white background */
  .panel__inner,
  #about .panel__inner,
  #toll-services .panel__inner {
    position: relative;
    z-index: 2;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 28px var(--padding);
    box-shadow: none;
    border-bottom: 1px solid var(--line);
  }

  /* About and Toll — reset desktop corner positioning */
  #about.panel--video {
    justify-content: unset;
    padding-top: 0;
  }

  #brand-portfolio .panel__inner {
    padding: 28px var(--padding);
    margin: 0;
    border-radius: 0;
    background: #ffffff;
    backdrop-filter: none;
  }
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
    margin: 24px -24px 24px -24px;
  }
  .brand-grid img {
    height: 140px;
  }
  .contact__grid {
    grid-template-columns: 1fr;
  }
}