/**
 * Shared foundation: reset, typography, and the components that appear on more
 * than one template (nav, footer, buttons, forms, modals, consent, reveals).
 *
 * The source styled everything with inline `style` attributes plus a synthetic
 * `style-hover` attribute that its runtime interpreted. Both are reconstructed
 * here as real CSS.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/*
 * Components below set an explicit `display`, which would otherwise win over
 * the `hidden` attribute and leave dialogs and toggled panels on screen.
 */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  display: block;
}

img,
video {
  height: auto;
}

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--c-highlight);
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--c-accent);
  color: var(--c-on-dark);
}

:focus-visible {
  outline: 2px solid var(--c-highlight);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
}

p {
  margin: 0 0 1em;
}

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

/* --- Layout primitives ---------------------------------------------------- */

.iff-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
}

.iff-section {
  padding: var(--section-y) var(--gutter);
}

.iff-eyebrow {
  margin: 0 0 0.875rem;
  color: var(--c-highlight);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.iff-h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tighter);
}

.iff-h2 {
  font-size: var(--fs-h2);
  letter-spacing: var(--tracking-tighter);
}

.iff-h3 {
  font-size: var(--fs-h3);
}

.iff-lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.iff-prose {
  max-width: 68ch;
  color: var(--c-body);
}

.iff-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Buttons -------------------------------------------------------------- */

.iff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.iff-btn--solid {
  background: var(--c-accent);
  color: var(--c-on-dark);
}

.iff-btn--solid:hover {
  background: var(--c-ink);
  color: var(--c-on-dark);
}

.iff-btn--ghost {
  border-color: var(--c-hairline-strong);
  color: var(--c-accent);
}

.iff-btn--ghost:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-on-dark);
}

.iff-btn--gold {
  background: var(--c-highlight);
  color: var(--iff-ink);
}

.iff-btn--gold:hover {
  filter: brightness(1.08);
}

/* --- Header / navigation -------------------------------------------------- */

.iff-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem var(--gutter);
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-hairline);
}

.iff-nav__logo img {
  height: 49px;
  width: auto;
}

/* The links and the language switcher sit on one row; without this the panel
   is a block and the switcher drops onto a second line. */
.iff-nav__panel {
  display: flex;
  align-items: center;
  gap: 2.125rem;
}

.iff-nav__menu {
  display: flex;
  align-items: center;
  gap: 2.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.iff-nav__menu a {
  color: var(--c-ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.iff-nav__menu a:hover {
  color: var(--c-highlight);
}

/* A menu item given the `cta` class renders as the bordered JONA pill. */
.iff-nav__menu .cta > a {
  padding: 0.5625rem 1rem;
  border: 1px solid var(--c-hairline-strong);
  border-radius: var(--radius);
  color: var(--c-accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.iff-nav__menu .cta > a:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-on-dark);
}

.iff-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--c-hairline);
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
}

/* --- Language switcher ---------------------------------------------------- */

.iff-lang {
  position: relative;
}

.iff-lang__button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.25rem;
  border: none;
  background: none;
  color: var(--c-ink);
  cursor: pointer;
}

.iff-lang__code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.iff-lang__list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: var(--z-dropdown);
  min-width: 140px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--c-bg);
  border: 1px solid var(--c-hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.iff-lang__list[hidden] {
  display: none;
}

.iff-lang__list a {
  display: block;
  padding: 0.625rem 0.875rem;
  color: var(--c-ink);
  font-size: 0.875rem;
}

.iff-lang__list a:hover,
.iff-lang__list li[aria-current="true"] a {
  background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  color: var(--c-ink);
}

/* --- Footer --------------------------------------------------------------- */

.iff-footer {
  padding: clamp(3.5rem, 2rem + 5vw, 6rem) var(--gutter) 4rem;
  background: var(--iff-ink);
  color: var(--iff-cream);
}

.iff-footer a {
  color: var(--iff-cream);
  font-size: 0.9375rem;
}

.iff-footer a:hover {
  color: var(--iff-gold);
}

.iff-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--gap);
  max-width: var(--wrap);
  margin-inline: auto;
}

.iff-footer__logo {
  height: 44px;
  width: auto;
  margin-bottom: 1.5rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.iff-footer__address {
  margin-bottom: 1.5rem;
  color: var(--c-on-dark-soft);
  font-size: 1rem;
}

.iff-footer__socials {
  display: flex;
  gap: 0.875rem;
}

.iff-footer__socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgb(244 241 232 / 20%);
  border-radius: var(--radius);
}

.iff-footer__socials a:hover {
  border-color: var(--iff-gold);
  color: var(--iff-gold);
}

.iff-footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: flex-start;
}

.iff-footer__heading {
  margin-bottom: 0.375rem;
  color: var(--iff-gold);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.iff-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.iff-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 1.375rem;
  max-width: var(--wrap);
  margin: 4rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--c-on-dark-hairline);
  color: var(--c-on-dark-faint);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.iff-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.375rem;
}

.iff-footer__legal a {
  color: rgb(244 241 232 / 55%);
  font-size: inherit;
  letter-spacing: 0.08em;
}

/* --- Modal ---------------------------------------------------------------- */

.iff-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: rgb(13 40 24 / 55%);
  backdrop-filter: blur(6px);
}

.iff-modal[hidden] {
  display: none;
}

.iff-modal__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 900px);
  overflow-y: auto;
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  background: var(--iff-cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
}

.iff-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--c-ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.iff-modal__close:hover {
  color: var(--c-highlight);
}

.iff-modal__body h2,
.iff-modal__body h3 {
  margin: 2rem 0 0.625rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--iff-ink);
}

.iff-modal__body h2:first-child,
.iff-modal__body h3:first-child {
  margin-top: 0;
}

.iff-modal__body p,
.iff-modal__body li {
  color: var(--c-body);
  font-size: 0.9375rem;
  line-height: 1.75;
}

body.iff-scroll-locked {
  overflow: hidden;
}

/* --- Forms ---------------------------------------------------------------- */

.iff-form input[type="text"],
.iff-form input[type="email"],
.iff-form input[type="tel"],
.iff-form textarea,
.iff-form select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--c-hairline);
  border-radius: var(--radius);
  background: var(--iff-white);
  color: var(--c-ink);
  font-family: inherit;
  font-size: var(--fs-body);
}

.iff-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.iff-form input::placeholder,
.iff-form textarea::placeholder {
  color: var(--c-muted);
}

.iff-form input:focus,
.iff-form textarea:focus {
  border-color: var(--c-accent);
  outline: none;
}

.iff-form .iff-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.iff-form p {
  margin: 0 0 0.875rem;
}

.iff-form .wpcf7-submit {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--radius);
  background: var(--c-accent);
  color: var(--c-on-dark);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}

.iff-form .wpcf7-submit:hover {
  background: var(--c-ink);
}

.iff-form .wpcf7-not-valid-tip {
  color: #b3261e;
  font-size: 0.8125rem;
}

.iff-form .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 0.875rem 1rem;
  border: 1px solid var(--c-hairline);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.iff-form__file {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px dashed var(--c-hairline-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

/* --- Cookie consent ------------------------------------------------------- */

/*
 * A bottom-anchored notice, not a section: the copy and the buttons share one
 * row so the bar stays shallow. Geometry follows the source — 16px inset,
 * 1080px panel, 26px/28px padding — rather than the page gutter and wrap,
 * which made the panel page-width and left the right half empty.
 */
.iff-consent {
  position: fixed;
  inset: auto 0 0;
  z-index: var(--z-consent);
  display: flex;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.iff-consent[hidden] {
  display: none;
}

.iff-consent__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.375rem 2rem;
  width: 100%;
  max-width: 1080px;
  padding: 1.625rem 1.75rem;
  background: var(--iff-cream);
  border: 1px solid var(--c-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  pointer-events: auto;
}

/* Grows to fill the row, but yields to the buttons before wrapping. */
.iff-consent__copy {
  flex: 1 1 26.25rem;
  min-width: 17.5rem;
}

.iff-consent__title {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
}

.iff-consent__body {
  margin: 0 0 0.75rem;
  max-width: 64ch;
  color: var(--c-body);
  font-size: 0.875rem;
}

.iff-consent__actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Opens as a full-width block beneath the copy and the buttons. */
.iff-consent__prefs {
  display: flex;
  flex: 1 0 100%;
  flex-direction: column;
  padding-top: 1.375rem;
  border-top: 1px solid var(--c-hairline);
}

.iff-consent__prefs[hidden] {
  display: none;
}

.iff-consent__prefs-title {
  margin: 0 0 0.375rem;
  font-size: 1rem;
}

.iff-consent__prefs-intro {
  margin: 0 0 0.5rem;
  max-width: 60ch;
  color: var(--c-muted);
  font-size: 0.875rem;
}

.iff-consent__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.125rem 0;
  border-top: 1px solid var(--c-hairline);
}

.iff-consent__row-copy p {
  margin: 0.25rem 0 0;
  max-width: 52ch;
  color: var(--c-body);
  font-size: 0.875rem;
}

.iff-consent__row-title {
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Mirrors the "Always Active" pill on the essential row, which has no toggle. */
.iff-consent__chip {
  flex: none;
  padding: 0.5rem 0.75rem;
  color: var(--c-accent);
  border: 1px solid var(--c-hairline);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.65625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.iff-consent__toggle {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
}

.iff-consent__link {
  border: none;
  background: none;
  color: var(--c-accent);
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.iff-consent__links {
  margin: 0;
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* --- Consent-gated map ---------------------------------------------------- */

.iff-map {
  position: relative;
  min-height: 420px;
  height: 100%;
  background: var(--c-bg-alt);
}

.iff-map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

.iff-map__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  min-height: 420px;
  padding: 2.5rem;
  text-align: center;
}

.iff-map__placeholder p {
  margin: 0;
  max-width: 34ch;
  color: var(--c-body);
  font-size: 0.9375rem;
}

.iff-map__eyebrow {
  color: var(--c-highlight);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.iff-map__link {
  color: var(--c-accent);
  font-size: 0.875rem;
  text-decoration: underline;
}

/* --- Scroll reveal -------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

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

@media (max-width: 900px) {
  .iff-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .iff-nav__toggle {
    display: flex;
  }

  /*
   * The closed panel is removed from flow rather than parked off-screen with a
   * transform: a fixed element sitting outside the viewport still extends the
   * document's scroll width, which gave the whole site a horizontal scrollbar
   * on phones. The slide-in is kept as an animation, which runs when the
   * element becomes displayed.
   */
  .iff-nav__panel {
    display: none;
    position: fixed;
    inset: 0 0 0 auto;
    z-index: var(--z-dropdown);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    width: min(320px, 86vw);
    padding: 5rem 1.5rem 2rem;
    background: var(--c-bg);
    box-shadow: var(--shadow-modal);
  }

  .iff-nav__panel.is-open {
    display: flex;
    animation: iff-nav-in var(--dur) var(--ease);
  }

  @keyframes iff-nav-in {
    from {
      transform: translateX(100%);
    }
  }

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

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

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

  .iff-modal {
    padding: 0;
  }

  .iff-modal__panel {
    width: 100%;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
  }

  /*
   * The banner competes with the page for a small screen, so it tightens up:
   * less padding, and the two decision buttons share a row instead of stacking.
   * "Manage preferences" keeps its own line as the secondary path.
   */
  .iff-consent {
    padding: 0.75rem;
  }

  .iff-consent__panel {
    gap: 1rem;
    padding: 1.25rem;
  }

  .iff-consent__body {
    margin-bottom: 0.625rem;
    font-size: 0.8125rem;
  }

  .iff-consent__actions {
    flex: 1 1 100%;
  }

  .iff-consent__actions .iff-btn {
    flex: 1 1 0;
    justify-content: center;
    padding-inline: 0.75rem;
  }

  .iff-consent__link {
    flex: 1 1 100%;
  }
}
