:root {
  --brand-red: #d62227;
  --brand-red-deep: #a30f1e;
  --brand-charcoal: #16181c;
  --brand-slate: #28313b;
  --brand-cream: #f5f0e7;
  --text-main: #121417;
  --text-soft: #5f6670;
  --line: rgba(255, 255, 255, 0.12);
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --shadow-lg: 0 32px 80px rgba(12, 15, 18, 0.22);
  --shadow-md: 0 18px 36px rgba(12, 15, 18, 0.16);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Barlow", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(214, 34, 39, 0.26), transparent 22%),
    radial-gradient(circle at top right, rgba(26, 33, 40, 0.12), transparent 25%),
    linear-gradient(180deg, #f8f6f2 0%, #ede6dd 44%, #ffffff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Accessibility ──────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  padding: 12px 20px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 999;
  text-decoration: none;
  transition: top 0s;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 3px;
  border-radius: 4px;
}

button,
a,
input,
textarea,
select {
  cursor: pointer;
}

input,
textarea {
  cursor: text;
}

.required-mark {
  color: var(--brand-red);
}

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(18, 20, 23, 0.9), rgba(18, 20, 23, 0.72));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 70px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #fff url("../images/IFS-logo.jpg") center / contain no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.brand-text {
  display: grid;
  gap: 2px;
  color: #fff;
}

.brand-text strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-text span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.primary-nav {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.primary-nav a:hover,
.primary-nav a.is-active {
  background: rgba(214, 34, 39, 0.9);
  color: #fff;
  transform: translateY(-1px);
}

.primary-nav a:focus-visible {
  outline-color: #fff;
}

.menu-toggle {
  display: none;
  justify-self: end;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.menu-toggle:focus-visible {
  outline-color: #fff;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 2px;
  transition: transform 240ms ease, opacity 240ms ease;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 64vh;
  display: grid;
  align-items: end;
  overflow: clip;
}

.hero-media,
.hero-slide,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: #101215;
}

.hero-slide {
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 900ms ease, transform 5.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  background:
    linear-gradient(180deg,
      rgba(10, 11, 13, 0.20) 0%,
      rgba(10, 11, 13, 0.60) 55%,
      rgba(10, 11, 13, 0.88) 100%),
    linear-gradient(280deg,
      rgba(22, 24, 28, 0.36) 0%,
      transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 108px 0 56px;
  color: #fff;
}

/* Slide indicator dots */
.slide-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 10px;
}

.slide-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background-color 300ms ease, border-color 300ms ease, width 300ms ease;
}

.slide-dot.is-active {
  width: 28px;
  background: #fff;
  border-color: #fff;
}

/* ── Typography ─────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.eyebrow::before {
  content: "";
  width: 40px;
  height: 2px;
  background: currentColor;
  flex-shrink: 0;
}

.hero-title,
.section-heading h2 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero-title {
  max-width: 14ch;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
}

.hero-copy {
  max-width: 640px;
  margin: 16px 0 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

/* ── Buttons ─────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: var(--brand-red);
  color: #fff;
  box-shadow: 0 14px 28px rgba(214, 34, 39, 0.26);
}

.button-primary:hover {
  background: var(--brand-red-deep);
  box-shadow: 0 18px 36px rgba(214, 34, 39, 0.36);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.button-outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.36);
  min-height: 46px;
  font-size: 0.92rem;
}

.button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.58);
}

.button-outline-red {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 1px var(--brand-red);
}

.button-outline-red:hover {
  background: rgba(214, 34, 39, 0.14);
  border-color: var(--brand-red-deep);
  box-shadow: 0 0 0 1px var(--brand-red-deep);
}

/* ── Hero highlights ─────────────────────────────────────────── */

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.hero-highlights article {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.hero-highlights span {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.15rem;
  color: #fff;
}

.hero-highlights p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.4;
  font-size: 0.88rem;
}

/* ── Compliance ─────────────────────────────────────────────── */

.compliance {
  position: relative;
  margin-top: -8px;
  padding: 0 0 36px;
  display: grid;
  gap: 18px;
}

.compliance-card,
.compliance-logos,
.compliance-badges,
.service-panel,
.quote-card,
.promo-card,
.resource-link,
.contact-card,
.map-card,
.industry-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(17, 22, 28, 0.07);
  box-shadow: var(--shadow-md);
}

.compliance-card,
.compliance-logos,
.compliance-badges {
  border-radius: var(--radius-md);
  padding: 22px 24px;
}

.compliance-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.compliance-card p,
.section-heading p,
.section-body p,
.service-list li,
.contact-card address {
  color: var(--text-soft);
  line-height: 1.75;
}

.compliance-card a,
.resource-link strong,
.map-card span {
  color: var(--brand-red-deep);
  font-weight: 700;
}

.compliance-card a:hover,
.resource-link:hover strong {
  text-decoration: underline;
}

.compliance-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px 32px;
}

.compliance-logos img {
  max-height: 72px;
  width: auto;
}

.compliance-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.compliance-badges span {
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(214, 34, 39, 0.08), rgba(22, 24, 28, 0.04));
  font-weight: 600;
  color: var(--brand-slate);
  text-align: center;
  line-height: 1.4;
}

/* ── Sections ───────────────────────────────────────────────── */

.section {
  padding: 80px 0;
}

.section-about,
.section-services,
.section-contact {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.94));
}

.section-industries,
.section-links {
  background: linear-gradient(180deg, rgba(214, 34, 39, 0.98), rgba(162, 15, 30, 0.96));
  color: #fff;
}

.section-quote {
  background: linear-gradient(180deg, #16181c 0%, #1e2329 100%);
  color: #fff;
}

.split-layout,
.quote-layout,
.contact-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 36px;
  align-items: start;
}

.section-heading h2 {
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.section-heading p {
  max-width: 60ch;
  margin: 18px 0 0;
}

.quote-intro {
  display: grid;
  align-content: start;
  gap: 18px;
}

.section-about .eyebrow,
.section-services .eyebrow,
.section-contact .eyebrow {
  color: rgba(22, 24, 28, 0.55);
}

.section-about .section-heading h2,
.section-services .section-heading h2,
.section-contact .section-heading h2 {
  color: var(--brand-charcoal);
}

.section-industries .eyebrow,
.section-links .eyebrow,
.section-quote .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.section-industries .section-heading p,
.section-links .section-heading p,
.section-quote .section-heading p {
  color: rgba(255, 255, 255, 0.88);
}

/* ── Industries ─────────────────────────────────────────────── */

.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.industry-card {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
  align-content: end;
}

.industry-card h3 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

/* ── Services ───────────────────────────────────────────────── */

.service-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.service-panel {
  padding: 28px;
  border-radius: var(--radius-lg);
}

.service-panel h3 {
  margin: 0 0 18px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.9rem;
  color: var(--brand-slate);
}

.service-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding-left: 20px;
}

.service-list li::marker {
  color: var(--brand-red);
}

/* ── Quote section ──────────────────────────────────────────── */

.quote-card,
.promo-card,
.map-card {
  border-radius: var(--radius-lg);
}

.quote-card,
.contact-copy .modern-form,
.promo-card,
.map-card {
  padding: 28px;
}

.promo-card {
  display: grid;
  gap: 16px;
  align-content: start;
  background: linear-gradient(160deg, rgba(214, 34, 39, 0.18), rgba(255, 255, 255, 0.06));
  border-color: rgba(214, 34, 39, 0.18);
}

.promo-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

/* ── Forms ──────────────────────────────────────────────────── */

.modern-form {
  display: grid;
  gap: 16px;
}

.modern-form label {
  display: grid;
  gap: 8px;
}

.modern-form span {
  font-size: 0.94rem;
  font-weight: 600;
  color: #111317;
}

.modern-form input,
.modern-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(21, 24, 29, 0.22);
  background: #ffffff;
  color: var(--text-main);
  font: inherit;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.modern-form textarea {
  min-height: 140px;
  resize: vertical;
  cursor: text;
}

.modern-form input:focus,
.modern-form textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(214, 34, 39, 0.14);
}

.modern-form input::placeholder,
.modern-form textarea::placeholder {
  color: #9aa0aa;
  font-size: 0.92rem;
}

.modern-form input[aria-invalid="true"],
.modern-form textarea[aria-invalid="true"] {
  border-color: var(--brand-red);
}

.modern-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Contact form label spans are dark on light background */
.section-contact .modern-form span {
  color: #111317;
}

/* ── Links ──────────────────────────────────────────────────── */

.links-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.resource-link {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.resource-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.resource-link span {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

/* ── Contact ─────────────────────────────────────────────────── */

.contact-layout {
  grid-template-columns: 0.95fr 1.05fr;
}

.contact-copy .eyebrow {
  display: inline-flex;
}

.contact-copy h2 {
  margin: 0 0 4px;
}

.contact-card {
  margin: 20px 0 22px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
}

.contact-card address {
  font-style: normal;
  color: var(--text-soft);
  line-height: 1.9;
}

.contact-card address a {
  color: var(--brand-red-deep);
  font-weight: 600;
}

.contact-card address a:hover {
  text-decoration: underline;
}

.map-card {
  display: grid;
  gap: 16px;
  align-self: start;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.map-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.map-card img {
  width: 100%;
  border-radius: var(--radius-md);
}

.map-card span {
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  padding-bottom: 4px;
}

/* ── Footer ─────────────────────────────────────────────────── */

.site-footer {
  background: #101215;
  color: rgba(255, 255, 255, 0.72);
}

.footer-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-shell p {
  margin: 0;
  font-size: 0.88rem;
}

.footer-shell a {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-shell a:hover {
  color: var(--brand-red);
}

/* ── Form submission modal ───────────────────────────────────── */

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 11, 13, 0.68);
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  padding: 20px;
}

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

.form-modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modal-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.form-modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
}

.form-modal-box p {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.form-modal-sub {
  margin: 8px 0 28px !important;
  font-family: "Barlow", sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 400 !important;
  color: var(--text-soft) !important;
  line-height: 1.5 !important;
}

/* ── Reveal animation ───────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Reduced motion ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-slide,
  .reveal,
  .primary-nav a,
  .button,
  .slide-dot,
  .resource-link,
  .map-card {
    transition: none;
  }

  .form-modal-box {
    animation: none;
  }
}

/* ── Tablet (≤1024px) ───────────────────────────────────────── */

@media (max-width: 1024px) {
  .header-shell {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    left: auto;
    display: none;
    width: fit-content;
    max-width: calc(100vw - 32px);
    padding: 8px;
    border-radius: 16px;
    background: rgba(18, 20, 23, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md);
  }

  .primary-nav.is-open {
    display: grid;
    justify-items: start;
    gap: 4px;
  }

  .primary-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 12px;
    width: auto;
    max-width: 100%;
    justify-self: start;
    font-size: 0.9rem;
  }

  .hero-highlights,
  .industry-grid,
  .service-columns,
  .links-list,
  .compliance-badges,
  .split-layout,
  .quote-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .industry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Mobile (≤768px) ────────────────────────────────────────── */

@media (max-width: 768px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .primary-nav {
    right: 12px;
    max-width: calc(100vw - 24px);
  }

  .header-shell {
    min-height: 76px;
    gap: 14px;
  }

  .brand-mark {
    width: 62px;
    height: 42px;
  }

  .brand-text strong {
    font-size: 1.1rem;
  }

  .brand-text span {
    display: none;
  }

  .hero {
    min-height: 52vh;
  }

  .hero-slide {
    background-position: center 30%;
  }

  .hero-content {
    padding: 76px 0 36px;
  }

  .hero .eyebrow {
    margin-bottom: 12px;
  }

  .hero-title {
    max-width: 12ch;
  }

  .hero-copy {
    font-size: 0.92rem;
  }

  .hero-highlights {
    gap: 12px;
  }

  .section {
    padding: 60px 0;
  }

  .compliance {
    padding-top: 0;
    padding-bottom: 48px;
    margin-top: 0;
  }

  .section-heading h2 {
    font-size: clamp(1.9rem, 7vw, 2.7rem);
    line-height: 1.04;
  }

  .resource-link span,
  .service-panel h3,
  .industry-card h3 {
    font-size: 1.1rem;
  }
}

/* ── Small mobile (≤540px) ──────────────────────────────────── */

@media (max-width: 540px) {
  .primary-nav {
    right: 10px;
    max-width: calc(100vw - 20px);
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-content {
    padding-top: 68px;
    padding-bottom: 32px;
  }

  .hero .eyebrow {
    margin-bottom: 10px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .hero-highlights {
    display: none;
  }

  .industry-grid {
    grid-template-columns: 1fr;
  }

  .compliance-badges {
    grid-template-columns: 1fr;
  }

  .compliance-card,
  .compliance-logos,
  .compliance-badges,
  .service-panel,
  .quote-card,
  .promo-card,
  .resource-link,
  .contact-card,
  .map-card,
  .industry-card,
  .contact-copy .modern-form {
    padding: 18px;
  }

  .footer-shell {
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
    text-align: center;
    gap: 8px;
  }

  .form-modal-box {
    padding: 32px 24px 28px;
  }
}
