/**
 * Homepage.
 *
 * Reconstructed from the static export's inline `style` and `style-hover`
 * attributes. The export had no media queries at all, so every breakpoint here
 * is new work — desktop matches the source, 900px and 640px are additions.
 *
 * Two colours in this file are page-local rather than global tokens: the near
 * black used by the production panel scrim and the two greens of the quality
 * highlight gradient. They appear nowhere else in the site, so they live here
 * instead of in tokens.css.
 */

.iff-home {
  --stage-scrim: #0a140e;
  --quality-gradient-from: #0f5e38;
  --quality-gradient-to: #3f803e;
}

/* --- Hero ----------------------------------------------------------------- */

.iff-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 1.5rem + 3.75vw, 4.5rem) var(--gutter) 0;
  background: var(--iff-ink);
  color: var(--iff-cream);
}

.iff-hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iff-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--iff-ink) 92%, transparent) 0%,
    color-mix(in srgb, var(--iff-ink) 78%, transparent) 45%,
    color-mix(in srgb, var(--iff-ink) 55%, transparent) 100%
  );
}

.iff-hero__inner {
  position: relative;
  z-index: 2;
}

.iff-hero__grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
}

.iff-hero__content {
  max-width: 800px;
}

.iff-hero__eyebrow {
  /* The gap under the eyebrow was an editable knob in the builder. */
  margin-bottom: var(--iff-hero-label-gap, 14px);
  letter-spacing: 0.18em;
}

.iff-hero__title {
  max-width: 15ch;
  line-height: 1.02;
}

.iff-hero__body {
  max-width: 56ch;
  margin: 1.125rem 0 0;
  color: var(--c-on-dark-soft);
  font-size: var(--fs-body-lg);
  font-weight: 300;
  line-height: 1.5;
}

.iff-hero__symbol {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--iff-hero-symbol, 340px);
  height: auto;
  filter: var(--shadow-float);
}

.iff-hero__rule {
  margin-top: 2.75rem;
  padding-top: 0.875rem;
  border-top: 1px solid rgb(244 241 232 / 16%);
}

/* --- About ---------------------------------------------------------------- */

/*
 * Unlike every other section, the source put no side padding on the About
 * <section> and 48px on the 1200px wrapper instead. With border-box that pulls
 * the content 48px further in than the rest of the page — content starts at
 * x=168 rather than x=120 on a 1440 viewport — so the inset is reproduced here
 * rather than inherited from .iff-section.
 */
.iff-about {
  padding: clamp(3rem, 1rem + 5vw, 5rem) 0;
}

.iff-about > .iff-wrap {
  padding-inline: var(--gutter);
}

.iff-about__title {
  max-width: 20ch;
}

.iff-about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: stretch;
  margin-top: 2.25rem;
}

.iff-about__media {
  position: relative;
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.iff-about__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grounds the photo against the cream section without darkening the subject. */
.iff-about__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(11 54 32 / 24%) 0%, rgb(11 54 32 / 0%) 55%);
}

.iff-about__text {
  max-width: 60ch;
}

.iff-about__lead {
  margin: 0 0 1.25rem;
  color: var(--c-ink);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.iff-about__body p {
  margin: 0 0 1rem;
  color: var(--c-body);
  font-size: var(--fs-small);
  line-height: 1.6;
}

/* The closing paragraph is set a shade larger in the source. */
.iff-about__body p:last-child {
  margin-bottom: 0;
  font-size: var(--fs-body);
  line-height: 1.65;
}

.iff-about__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.iff-about__card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1rem;
  border: 1px solid var(--c-hairline);
  border-radius: var(--radius);
}

.iff-about__card-icon {
  display: flex;
  color: var(--c-highlight);
}

.iff-about__card-label {
  display: flex;
  flex-direction: column;
  color: var(--c-ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* --- Production stepper --------------------------------------------------- */

.iff-stages {
  padding-block: clamp(4rem, 10vw, 8rem);
  background: var(--iff-ink);
  color: var(--iff-cream);
}

.iff-stages__intro {
  max-width: 64ch;
}

.iff-stages__lead {
  margin: 1.625rem 0 0;
  color: var(--c-on-dark-soft);
  font-size: var(--fs-body-lg);
  font-weight: 300;
  line-height: 1.6;
}

.iff-stages__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 4rem;
}

.iff-stages__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.375rem 0.875rem 1rem;
  border: 1px solid rgb(244 241 232 / 20%);
  border-radius: var(--radius);
  background: transparent;
  color: rgb(244 241 232 / 70%);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.iff-stages__tab:hover {
  border-color: var(--c-highlight);
  color: var(--iff-cream);
}

.iff-stages__tab[aria-selected="true"] {
  border-color: var(--c-highlight);
  background: var(--c-highlight);
  color: var(--iff-ink);
}

.iff-stages__tab-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.iff-stages__panels {
  margin-top: 1.75rem;
}

.iff-stages__panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 480px;
  overflow: hidden;
  /* Sits behind the photo, so it only shows on a stage with no image yet. */
  background-color: var(--stage-scrim);
  border: 1px solid var(--c-on-dark-hairline);
  border-radius: 3px;
}

/* The class sets display:flex, which would otherwise beat the hidden attribute. */
.iff-stages__panel[hidden] {
  display: none;
}

.iff-stages__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iff-stages__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--stage-scrim) 92%, transparent) 0%,
    color-mix(in srgb, var(--stage-scrim) 55%, transparent) 40%,
    transparent 65%
  );
}

.iff-stages__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  width: 100%;
  padding: clamp(1.75rem, 1rem + 3vw, 3.25rem) clamp(1.25rem, 0.5rem + 3.5vw, 3.5rem);
}

.iff-stages__badge {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1.5px solid color-mix(in srgb, var(--c-highlight) 50%, transparent);
  border-radius: 50%;
  color: var(--c-highlight);
}

.iff-stages__copy {
  max-width: 62ch;
}

.iff-stages__title {
  margin: 0 0 1.25rem;
  color: var(--iff-cream);
}

.iff-stages__text {
  margin: 0;
  color: rgb(244 241 232 / 82%);
  font-size: var(--fs-body-lg);
  font-weight: 300;
  line-height: 1.6;
}

.iff-stages__cta {
  margin-top: 2.25rem;
  padding: 0.875rem 1.375rem;
  font-size: 0.8125rem;
}

.iff-stages__cta:hover {
  background: var(--iff-cream);
  color: var(--iff-ink);
  filter: none;
}

/* --- Statistics ----------------------------------------------------------- */

.iff-stats {
  /* The source's bottom padding is 4px deeper than the top. */
  padding: clamp(3rem, 1rem + 5vw, 5rem) var(--gutter) clamp(3.25rem, 1.25rem + 5vw, 5.25rem);
  background: var(--iff-white);
  border-top: 1px solid var(--c-hairline);
  border-bottom: 1px solid var(--c-hairline);
}

.iff-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.iff-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem;
  text-align: center;
}

.iff-stats__item + .iff-stats__item {
  border-left: 1px solid var(--c-hairline);
}

.iff-stats__index {
  margin-bottom: 1.625rem;
  color: var(--c-highlight);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.iff-stats__value {
  display: flex;
  align-items: baseline;
  color: var(--c-ink);
  font-size: var(--fs-stat);
  letter-spacing: -0.035em;
  line-height: 0.9;
}

.iff-stats__number {
  font-weight: 600;
  /* Keeps the layout still while the value counts up. */
  font-variant-numeric: tabular-nums;
}

.iff-stats__suffix {
  font-weight: 200;
}

.iff-stats__suffix--word {
  margin-left: 0.16em;
}

.iff-stats__label {
  max-width: 22ch;
  margin-top: 1.125rem;
  color: var(--c-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* --- Quality -------------------------------------------------------------- */

.iff-quality {
  padding-block: clamp(3.5rem, 1rem + 6.25vw, 6rem);
}

.iff-quality__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4.5rem;
  align-items: center;
}

.iff-quality__lead {
  margin: 0 0 1.125rem;
  color: var(--c-ink);
  font-size: var(--fs-lead);
  line-height: 1.5;
  text-wrap: pretty;
}

.iff-quality__body {
  max-width: 56ch;
  margin: 0 0 2rem;
  color: var(--c-body);
  font-size: var(--fs-small);
  line-height: 1.6;
  text-wrap: pretty;
}

.iff-quality__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.625rem;
  border-top: 1px solid var(--c-hairline);
}

.iff-quality__badges {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.iff-quality__badge {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.iff-quality__points {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.iff-quality__point {
  display: flex;
  align-items: center;
  gap: 1.375rem;
  padding: 1.5rem 1.625rem;
  background: linear-gradient(100deg, var(--quality-gradient-from) 0%, var(--quality-gradient-to) 100%);
  color: var(--iff-cream);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.iff-quality__point:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgb(15 94 56 / 35%);
}

.iff-quality__point-index {
  color: rgb(244 241 232 / 70%);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.iff-quality__point-text {
  font-size: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

/* --- Contact -------------------------------------------------------------- */

.iff-contact {
  padding-block: clamp(3.75rem, 1rem + 6.9vw, 6.5rem);
  background: var(--c-bg-alt);
  scroll-margin-top: 96px;
}

.iff-contact__head {
  max-width: 640px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.iff-contact__lead {
  margin: 1.125rem 0 0;
  color: var(--c-body);
  font-size: var(--fs-body-lg);
  font-weight: 300;
  line-height: 1.6;
}

.iff-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
  perspective: 1600px;
}

/*
 * The two panels are turned very slightly toward the viewer and straighten on
 * hover — the only 3D treatment on the site, carried over from the source.
 */
.iff-contact__card,
.iff-contact__map {
  border: 1px solid rgb(13 40 24 / 8%);
  border-radius: 12px;
  box-shadow: 0 30px 60px -20px rgb(13 40 24 / 28%), 0 8px 20px -8px rgb(13 40 24 / 18%);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.iff-contact__card {
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  background: var(--iff-cream);
  transform: rotateY(1.5deg);
}

.iff-contact__map {
  overflow: hidden;
  transform: rotateY(-1.5deg);
}

.iff-contact__card:hover,
.iff-contact__map:hover {
  transform: rotateY(0deg) translateY(-4px);
  box-shadow: 0 40px 70px -18px rgb(13 40 24 / 32%), 0 10px 24px -6px rgb(13 40 24 / 20%);
}

.iff-contact__card .iff-form input,
.iff-contact__card .iff-form textarea,
.iff-contact__card .iff-form .wpcf7-submit {
  border-radius: 8px;
}

.iff-contact__card .iff-form .wpcf7-submit {
  padding: 0.9375rem 1.875rem;
  background: var(--iff-ink);
  box-shadow: 0 10px 24px -8px rgb(13 40 24 / 50%);
}

.iff-contact__card .iff-form .wpcf7-submit:hover {
  background: color-mix(in srgb, var(--iff-ink) 88%, var(--iff-green));
}

/* --- Newsletter ----------------------------------------------------------- */

.iff-newsletter {
  padding: clamp(4rem, 1rem + 7.5vw, 7rem) var(--gutter);
}

.iff-newsletter__inner {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.iff-newsletter__lead {
  margin: 0 0 2.5rem;
  color: var(--c-body);
  font-size: var(--fs-body-lg);
  line-height: 1.6;
}

.iff-newsletter__form {
  max-width: 480px;
  margin-inline: auto;
  text-align: left;
}

.iff-newsletter__form form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: center;
}

.iff-newsletter__form input[type="email"] {
  min-width: 220px;
}

.iff-newsletter__form input[type="checkbox"] {
  accent-color: var(--c-accent);
}

.iff-newsletter__thanks {
  margin: 1.125rem 0 0;
  color: var(--c-accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}

/* --- Certifications dialog ------------------------------------------------ */

/* Keeps the heading clear of the close button pinned to the panel corner. */
.iff-certs .iff-eyebrow,
.iff-certs__title {
  padding-right: 3.25rem;
}

.iff-certs__title {
  margin: 0;
  color: var(--c-ink);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  line-height: var(--lh-tight);
}

.iff-certs__list {
  margin: 2.25rem 0 0;
  padding: 0;
  border-top: 1px solid var(--c-hairline);
  list-style: none;
}

.iff-certs__item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--c-hairline);
}

.iff-certs .iff-certs__item-title {
  margin: 0 0 0.5rem;
  color: var(--c-accent);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
  .iff-hero__grid {
    flex-direction: column;
    align-items: center;
  }

  .iff-hero__symbol {
    max-width: min(var(--iff-hero-symbol, 340px), 55vw);
  }

  .iff-about__grid,
  .iff-quality__grid,
  .iff-contact__grid {
    grid-template-columns: 1fr;
    gap: var(--gap);
  }

  .iff-about__media {
    min-height: 320px;
  }

  .iff-about__text {
    max-width: none;
  }

  /*
   * Desktop sets the About and Quality body copy two steps below the rest of
   * the page's prose, which reads as deliberately secondary beside the photo it
   * shares a row with. Once those rows stack that pairing is gone and the same
   * copy is simply the smallest text on the page — 13px against 16px
   * everywhere else — so it joins the single body size the rest of the
   * homepage uses. The leads stay a step above it, so the hierarchy survives.
   */
  .iff-about__body p,
  .iff-about__body p:last-child,
  .iff-quality__body {
    font-size: var(--fs-body-lg);
    line-height: 1.6;
  }

  /* Stacked panels no longer face each other, so the 3D tilt is dropped. */
  .iff-contact__card,
  .iff-contact__map {
    transform: none;
  }

  .iff-stages__panel {
    min-height: 420px;
  }

  .iff-stats__item {
    padding: 0 1rem;
  }
}

@media (max-width: 640px) {
  .iff-hero__title {
    max-width: none;
  }

  .iff-about__cards {
    grid-template-columns: 1fr;
  }

  /* Tabs become a swipeable row rather than wrapping into a tall block. */
  .iff-stages__tabs {
    flex-wrap: nowrap;
    margin-top: 2.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .iff-stages__tabs::-webkit-scrollbar {
    display: none;
  }

  .iff-stages__tab {
    flex: 0 0 auto;
    font-size: 0.9375rem;
    scroll-snap-align: start;
  }

  .iff-stages__content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .iff-stages__badge {
    width: 48px;
    height: 48px;
  }

  .iff-stats__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .iff-stats__item {
    padding: 0;
  }

  .iff-stats__item + .iff-stats__item {
    padding-top: 2.5rem;
    border-left: none;
    border-top: 1px solid var(--c-hairline);
  }

  .iff-quality__point {
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }

  .iff-newsletter__form form {
    align-items: stretch;
  }
}
