/* ===========================================================
   G3 Nutrition — portable static site
   Rebuilt to match the original g3nutrition.ca exactly.
   =========================================================== */

:root {
  --green: #103311;        /* hero heading, primary buttons  rgb(16,51,17) */
  --green-hover: #1c4a1e;
  --dark: #1d231c;         /* CTA section background          rgb(29,35,28) */
  --cream: #ece5d8;        /* cup image block background */
  --line: rgba(0, 0, 0, 0.16);
  --ink: #000000;
  --white: #ffffff;
  --content: 1448px;   /* inner content ≈ 1400px wide → left edge at 157px @1714 (matches original) */
  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "Oxygen", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* ---------- Header (transparent, overlays content) ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 38px 56px;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img { height: 64px; width: auto; }   /* matches original 267 x 64 */

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.main-nav a:hover { border-bottom-color: var(--ink); }
.main-nav a.active { border-bottom-color: var(--ink); }

/* Mobile hamburger — two lines that cross into an X when open */
.burger {
  display: none;
  position: relative;
  width: 34px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 40;
}
.burger .burger-line {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, top 0.3s ease;
}
.burger .burger-line:nth-child(1) { top: 6px; }
.burger .burger-line:nth-child(2) { top: 14px; }
.burger.is-active .burger-line:nth-child(1) { top: 10px; transform: rotate(45deg); }
.burger.is-active .burger-line:nth-child(2) { top: 10px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.32px;
  line-height: 1.3;
  padding: 19.2px 19.2px;   /* hero "Get In Touch" ≈ 132 x 59 */
  text-align: center;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* Fixed-size action buttons ("Partner with G3", CTA "Get in touch") = 224 x 71 */
.btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 224px;
  height: 71px;
  padding: 0 19.2px;
}

.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-hover); }

.btn-white { background: var(--white); color: var(--ink); }
.btn-white:hover { opacity: 0.85; }

/* ---------- Section scaffolding ---------- */
.section { position: relative; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Separate image layer so we can drive a subtle parallax on scroll.
   Extends above/below the hero to give the transform room to move. */
.hero-bg {
  position: absolute;
  inset: 0;                      /* exactly the hero box, so cover matches the original */
  background-image: url("images/hero.webp");
  background-size: cover;
  background-position: 23.94% 8.8%;   /* Squarespace focal point */
  z-index: 0;
  will-change: transform;
}

.hero .container { position: relative; z-index: 2; }

.hero-content { max-width: 740px; padding: 120px 0 90px; }

.hero h1 {
  color: var(--green);
  font-size: clamp(2.6rem, 5.4vw, 4.15rem);
  line-height: 1.23;
  margin: 0 0 40px;
}

/* ---------- Two-column section (Join forces) ----------
   Heading (top-left) + button (below it, left) share the left column;
   paragraph fills the right column. DOM order is heading → text → button
   (matching the original) so it stacks correctly on mobile. */
.split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-areas:
    "heading text"
    "button  text";
  column-gap: 64px;
  row-gap: 0;
  align-items: start;
}

/* vertical padding only — must not use the `padding` shorthand, which would
   zero the container's horizontal padding (breaks side gutters on mobile). */
.pad-y { padding-top: 122px; padding-bottom: 264px; }

.split-heading {
  grid-area: heading;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}

.split-text { grid-area: text; align-self: center; }  /* paragraph vertically centered against the left column */
.split-btn { grid-area: button; margin-top: 66px; }  /* 66px below heading, like the original */
.split p { font-size: 16px; }

/* ---------- Features section (heading+accordion left, cup right) ---------- */
.features { padding: 150px 0; }

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: stretch;   /* right image matches left column height */
}

.features-left h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 44px;
}

/* Right image: fills the stretched cell and crops to zoom in on the cup */
.features-media {
  position: relative;
  background: var(--cream);
  min-height: 320px;
}

.features-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Accordion ---------- */
.accordion { border-top: 1px solid var(--line); }

.feature { border-bottom: 1px solid var(--line); }

.feature > summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 16px 40px 16px 2px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  color: var(--ink);
}

.feature > summary::-webkit-details-marker { display: none; }

/* Plus/minus icon built from two bars. The vertical bar rotates to
   horizontal on open, animating + into a horizontal minus. */
.feature > summary::before,
.feature > summary::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: rgba(0, 0, 0, 0.65);
  transition: transform 0.3s ease;
}

.feature > summary::before { transform: translateY(-50%); }                 /* horizontal bar */
.feature > summary::after  { transform: translateY(-50%) rotate(90deg); }   /* vertical bar */

.feature.is-open > summary::after { transform: translateY(-50%) rotate(0deg); } /* rotates to minus */

.feature-body p {
  margin: 0;
  padding: 0 2px 18px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

.js .feature-body {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
}

/* ---------- CTA (dark) section ---------- */
.cta {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 180px 0 190px;
}

.cta h2 {
  color: var(--white);
  font-size: clamp(2.6rem, 5.4vw, 4.15rem);
  line-height: 1.2;
  margin: 0 0 44px;
}

.cta-copy {
  max-width: 1048px;   /* matches original centered copy block (333–1381 @1714) */
  margin: 0 auto 56px;
  text-align: left;
}

.cta-copy p { font-size: 16px; color: var(--white); }

/* ---------- Wave dividers ---------- */
.wave {
  position: absolute;
  left: 0;
  width: 100%;
  height: 92px;
  line-height: 0;
  z-index: 3;
  pointer-events: none;
}
.wave svg { width: 100%; height: 100%; display: block; }
.wave-bottom { bottom: -1px; }
.wave-top { top: -1px; }

/* ---------- Contact page ---------- */
.contact-section {
  min-height: calc(100vh - 100px);   /* fill viewport so footer sits at the bottom */
  display: flex;
  align-items: center;
  padding: 120px 0 40px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;   /* text vertically centered against the image */
}

/* crop the portrait photo to a landscape band, zoomed in, like the original */
.contact-grid .photo img {
  width: 100%;
  aspect-ratio: 636 / 441;
  object-fit: cover;
  object-position: center;
  display: block;
}

.contact-text h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--ink);
  margin: 0 0 32px;
}

.contact-text p { font-size: 16px; }

.contact-info { margin-top: 40px; font-size: 16px; line-height: 1.9; }
.contact-info a { color: var(--ink); }
.contact-info a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  color: var(--ink);
  text-align: center;
  padding: 40px 0;
  font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .site-header { padding: 24px; }
  .split {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "text"
      "button";
    row-gap: 28px;
  }
  .split-btn { margin-top: 0; }
  .features { padding: 80px 0; }
  .features-grid { grid-template-columns: 1fr; gap: 40px; }
  .features-media { min-height: 440px; }
  .cta { padding: 110px 0 120px; }
  .cta-copy { text-align: left; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-section { padding: 110px 0 40px; }
  .pad-y { padding-top: 80px; padding-bottom: 80px; }
  .wave { height: 48px; }
}

@media (max-width: 767px) {
  .main-nav { display: none; }
  .burger { display: block; }
}

@media (max-width: 560px) {
  .brand img { height: 36px; }
}
