/* ==========================================================================
   Oceangreen.eco — sustainable packaging page
   One stylesheet, no frameworks, no JavaScript.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no Google Fonts requests) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */
:root {
  --forest: #26372a;      /* brand dark green */
  --forest-2: #2f4434;
  --sage: #9dc58e;        /* brand light green */
  --sage-dark: #4c7440;   /* sage darkened for text on light backgrounds */
  --linen: #efece3;       /* brand beige */
  --mist: #f8f8f8;
  --slate: #7d8a76;       /* table backdrop */
  --ink: #1d2620;
  --text: #2c332e;
  --white: #fff;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(40px, 6vw, 80px);
  --radius: 14px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { font-weight: 800; line-height: 1.15; color: var(--ink); letter-spacing: -0.015em; }
p + p, p + ul { margin-top: 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }

.section__title {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  color: var(--forest);
  margin-bottom: clamp(20px, 3vw, 36px);
  max-width: 24ch;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--forest);
  color: var(--white);
}
.hero__media {
  display: block;
  position: relative;
  overflow: hidden;
}
.hero__media img {
  width: 100%;
  object-fit: cover;
  object-position: left center;
}

/* Mobile: dissolve the square logo badge (baked into the 800px image at
   x 58-262, y 58-254, colour rgb(9,50,36)) into the photo, and fade the
   photo into the text panel below. 1px of the source image = 0.125cqw. */
@media (max-width: 767.98px) {
  .hero__media { container-type: inline-size; }
  .hero__media img { margin-top: -3cqw; } /* trim the white band on top */
  .hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 20cqw 16.5cqw,
        rgba(9, 50, 36, 1) 17.5cqw,
        rgba(9, 50, 36, .75) 26cqw,
        rgba(9, 50, 36, .35) 40cqw,
        rgba(9, 50, 36, 0) 58cqw),
      linear-gradient(to bottom, rgba(38, 55, 42, 0) 70%, rgba(38, 55, 42, 1) 100%);
    pointer-events: none;
  }
  /* The logo itself, cropped from the same image, laid back over the wash */
  .hero__media::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: 7.5cqw;
    top: 4.5cqw;
    width: 25cqw;
    height: 24cqw;
    background: url("../img/hero-mobile-800.webp") no-repeat -7.5cqw -7.5cqw / 100cqw auto;
    pointer-events: none;
  }
}
.hero__content {
  padding: 32px var(--gutter) 48px;
  background: var(--forest);
}
.hero__title {
  color: var(--white);
  font-size: clamp(2rem, 0.9rem + 2.7vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.hero__lead {
  margin-top: 20px;
  max-width: 34ch;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  color: rgba(255, 255, 255, 0.86);
}
.hero__next {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 28px;
  border: 2px solid var(--sage);
  border-radius: 50%;
  transition: background-color .2s;
}
.hero__next::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--sage);
  border-bottom: 2px solid var(--sage);
  transform: translateY(-2px) rotate(45deg);
}
.hero__next:hover { background: rgba(157, 197, 142, .15); }

@media (min-width: 768px) {
  .hero__media img {
    height: min(calc(100vh - 40px), 56.25vw);
    min-height: 460px;
  }
  /* Melt the logo strip (baked into the image, ends at 18.96% of its width)
     into the photo. The image is rendered at max(100%, 460px * 16/9) wide. */
  .hero__media::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 calc(max(100%, 818px) * 0.188);
    width: calc(max(100%, 818px) * 0.5);
    background: linear-gradient(to right,
      rgba(38, 55, 42, 1) 0%,
      rgba(38, 55, 42, .92) 12%,
      rgba(38, 55, 42, .7) 30%,
      rgba(38, 55, 42, .38) 55%,
      rgba(38, 55, 42, .12) 80%,
      rgba(38, 55, 42, 0) 100%);
    pointer-events: none;
  }
  /* Text sits on the dark wall between the logo strip and the people */
  .hero__content {
    position: absolute;
    inset: 0 auto 0 23.5%;
    width: min(30%, 500px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    background: none;
  }
  .hero__lead { max-width: 30ch; }
  .hero__next { display: none; }
}

/* ---------- Intro ---------- */
.intro__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
.intro__title {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.75rem);
  color: var(--forest);
  margin-bottom: 20px;
  max-width: 18ch;
}
.intro__text p { max-width: 62ch; font-size: 1.05rem; }
.intro__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
@media (min-width: 900px) {
  .intro__grid { grid-template-columns: 7fr 5fr; gap: 64px; }
}

/* ---------- Feature (image with overlapping card) ---------- */
.feature {
  display: grid;
  margin-bottom: clamp(24px, 4vw, 48px);
}
.feature:last-child { margin-bottom: 0; }
.feature__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.feature__card {
  position: relative;
  margin: -48px 12px 0;
  padding: clamp(24px, 3vw, 44px);
  background: var(--forest);
  color: rgba(255, 255, 255, .88);
  border-radius: var(--radius);
}
.feature__title {
  color: var(--sage);
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  margin-bottom: 16px;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
  }
  .feature__img {
    grid-column: 1 / -1;
    grid-row: 1;
    aspect-ratio: 16 / 9;
  }
  .feature__card {
    grid-column: 1 / span 6;
    grid-row: 1;
    margin: 0 0 0 clamp(24px, 4vw, 56px);
  }
  .feature--flip .feature__card {
    grid-column: 7 / span 6;
    margin: 0 clamp(24px, 4vw, 56px) 0 0;
  }
}

/* Tick list */
.ticks { list-style: none; padding: 0; margin-top: 20px; }
.ticks li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .45em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--sage);
  border-bottom: 2px solid var(--sage);
  transform: rotate(-45deg);
}

/* ---------- Comparison table ---------- */
.compare__scroll {
  overflow-x: auto;
  background: var(--slate);
  border-radius: var(--radius);
  padding: clamp(12px, 3vw, 40px);
}
.compare__table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: .95rem;
  line-height: 1.45;
  text-align: center;
}
.compare__table th,
.compare__table td {
  padding: 18px 20px;
  border: 1px solid rgba(38, 55, 42, .18);
  background: var(--linen);
  color: var(--ink);
  vertical-align: middle;
}
.compare__table thead th {
  background: var(--forest);
  color: var(--linen);
  font-weight: 600;
  font-size: 1.05rem;
  border-color: rgba(239, 236, 227, .25);
}
.compare__table tbody th { font-weight: 600; width: 24%; }
.compare__table td.is-ours { background: var(--sage); font-weight: 500; }
.compare__table thead th.is-ours { color: var(--sage); }

/* ---------- Smart value ---------- */
.value { padding-bottom: 0; }
.value__intro p { max-width: 62ch; font-size: 1.05rem; font-weight: 500; }
.value__band {
  margin-top: clamp(24px, 4vw, 48px);
  padding-block: clamp(32px, 5vw, 56px);
  background: var(--mist);
}
.value__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 20px;
}
.value__list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.value__list img { width: 72px; height: 72px; margin-bottom: 14px; }
.value__list li:last-child { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .value__list { grid-template-columns: repeat(3, 1fr); }
  .value__list li:last-child { grid-column: auto; }
}
@media (min-width: 992px) {
  .value__list { grid-template-columns: repeat(5, 1fr); }
}
.value + .section { padding-top: var(--section); }

/* ---------- FAQ (details/summary) ---------- */
.faq__list { display: grid; gap: 12px; }
.faq details {
  background: var(--mist);
  border-radius: 10px;
  overflow: hidden;
}
.faq summary {
  position: relative;
  display: block;
  cursor: pointer;
  list-style: none;
  padding: 24px 84px 24px 28px;
  font-size: clamp(1rem, .95rem + .35vw, 1.2rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
/* circle */
.faq summary::before {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 2px solid var(--sage-dark);
  border-radius: 50%;
}
/* chevron */
.faq summary::after {
  content: "";
  position: absolute;
  right: 39px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--sage-dark);
  border-bottom: 2px solid var(--sage-dark);
  transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(4px) rotate(-135deg); }
.faq summary:hover { color: var(--forest); }
.faq details p {
  padding: 0 84px 24px 28px;
  max-width: 80ch;
}
@media (max-width: 599.98px) {
  .faq summary { padding: 20px 68px 20px 18px; }
  .faq summary::before { right: 16px; width: 36px; height: 36px; margin-top: -18px; }
  .faq summary::after { right: 29px; }
  .faq details p { padding: 0 18px 20px; }
}

/* ---------- Closing CTA ---------- */
.cta {
  background: var(--forest);
  padding-block: clamp(40px, 6vw, 72px);
}
.cta__text {
  max-width: 46ch;
  font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--linen);
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .hero__next { display: none; }
  .feature__card, .cta { background: none; color: #000; }
  .feature__title, .cta__text { color: #000; }
}
