/* Indiana Forms & Labels — landing page styles (mobile-first, no JS) */

:root {
  /* Brand palette — navy sampled from the real logo (assets/ifl-logo.png) */
  --navy: #002142;       /* primary: headings, buttons, dark strips, footer */
  --navy-dark: #00152b;  /* hover / pressed */
  --gray-700: #4a5260;   /* secondary body text (7.1:1 on gray-100) */
  --gray-500: #6b7280;   /* decorative only; not for text on gray-100 */
  --gray-300: #d1d5db;   /* borders / rules */
  --gray-100: #f3f4f6;   /* light section backgrounds */
  --white: #ffffff;

  /* Semantic aliases */
  --ink: var(--navy-dark);
  --muted: var(--gray-700);
  --bg: var(--white);
  --bg-soft: var(--gray-100);
  --line: var(--gray-300);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 33, 66, 0.06), 0 6px 20px rgba(0, 33, 66, 0.08);
  --shadow-hover: 0 2px 4px rgba(0, 33, 66, 0.08), 0 12px 32px rgba(0, 33, 66, 0.14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --focus: 3px solid var(--navy);
  --focus-on-dark: 3px solid var(--white);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

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

h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

a { color: var(--navy); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--navy-dark); }

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

.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; color: #fff; outline: var(--focus-on-dark); outline-offset: -6px; }

/* Scroll offset for sticky header */
section[id] { scroll-margin-top: 140px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-accent { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-accent:hover { background: var(--gray-100); color: var(--navy-dark); border-color: var(--navy-dark); }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1.0625rem; }
.btn-xl { padding: 1.05rem 2rem; font-size: 1.2rem; }
.btn-phone { background: var(--navy); color: #fff; font-size: 0.95rem; white-space: nowrap; }
.btn-phone:hover { background: var(--navy-dark); color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "brand phone" "nav nav";
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.6rem;
  padding-bottom: 0.4rem;
}
.brand { grid-area: brand; display: inline-block; line-height: 0; }
.brand img { height: 48px; width: auto; max-width: none; }
.btn-phone { grid-area: phone; justify-self: end; }
.site-nav { grid-area: nav; overflow-x: auto; }
.site-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 8px;
}
.site-nav a:hover { background: var(--gray-100); }
/* Small screens: wrap the five nav links instead of side-scrolling */
@media (max-width: 899px) {
  .site-nav { overflow-x: visible; }
  .site-nav ul { flex-wrap: wrap; justify-content: center; gap: 0 0.125rem; }
  .site-nav a { padding: 0.45rem 0.6rem; }
  section[id] { scroll-margin-top: 160px; }
}
/* Phones: header scrolls away (not sticky), so no large anchor offset needed */
@media (max-width: 767px) {
  .site-header { position: static; }
  section[id] { scroll-margin-top: 1rem; }
}

@media (min-width: 900px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav phone";
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .brand img { height: 60px; }
  .site-nav ul { justify-content: center; gap: 0.5rem; }
  .site-nav a { font-size: 1rem; }
  .btn-phone { font-size: 1rem; }
  section[id] { scroll-margin-top: 100px; }
}
/* Narrow desktop: tighten links so brand + 5 links + phone fit on one row */
@media (min-width: 900px) and (max-width: 1099px) {
  .site-nav ul { gap: 0.125rem; }
  .site-nav a { padding: 0.55rem 0.5rem; font-size: 0.95rem; }
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, var(--white) 0%, var(--gray-100) 100%);
  border-bottom: 1px solid var(--line);
  padding: 3rem 0 3.25rem;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(2.25rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25em;
}
.tagline {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.tagline::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 0.85rem;
  border-radius: 2px;
  background: var(--navy);
}
.subline { max-width: 62ch; color: var(--muted); font-size: 1.0625rem; }
.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.hero-email { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

@media (min-width: 600px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 900px) {
  .hero { padding: 5rem 0 5.5rem; }
  .subline { font-size: 1.15rem; }
}

/* Sections */
.section { padding: 3.5rem 0; }
@media (min-width: 900px) { .section { padding: 5rem 0; } }

.section-title {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-intro { max-width: 62ch; color: var(--muted); margin-bottom: 2rem; }

/* Service cards */
.card-grid {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.25rem; }
.card p { color: var(--muted); }
.card-link { margin-top: auto; font-weight: 700; align-self: flex-start; }
/* Cards with two links: keep both at the bottom, stacked with a clear gap */
.card-link + .card-link { margin-top: 0.5rem; }
@media (max-width: 639px) {
  .card:has(.card-link + .card-link) .card-link { display: inline-flex; align-items: center; min-height: 44px; }
  .card-link + .card-link { margin-top: 0.25rem; }
}

/* Wide card: fills the last row so the 7-card grid has no orphan */
.card-wide { background: var(--bg-soft); }
.card-wide p { max-width: 70ch; }
@media (min-width: 640px) { .card-wide { grid-column: 1 / -1; } }
/* Desktop: title sits in the first column, text spans the other two */
@media (min-width: 1024px) {
  .card-wide {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto;
    column-gap: 3rem;
    align-items: start;
  }
  .card-wide h3 { grid-row: 1 / span 2; margin: 0; }
  .card-wide p { grid-column: 2; }
  .card-wide .card-link { grid-column: 2; margin-top: 0; }
}

/* How we work strip */
.how-we-work { background: var(--navy); color: var(--white); padding: 2.25rem 0; }
.how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
.how-list li { padding-left: 1rem; border-left: 4px solid var(--gray-300); }
.how-list h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.25rem; }
.how-list p { margin: 0; color: var(--gray-300); }
@media (min-width: 768px) { .how-list { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

/* About */
.about { background: #fff; }
.about p { max-width: 70ch; font-size: 1.125rem; color: var(--ink); }
.about .about-closing {
  margin: 1.75rem 0 0;
  padding-left: 1rem;
  border-left: 4px solid var(--navy);
  font-size: clamp(1.2rem, 2.6vw, 1.35rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--navy);
}

/* Brands */
.brands { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.brand-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) { .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; } }

.brand-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.brand-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--navy); color: var(--ink); }
.brand-card:focus-visible { outline-offset: 4px; border-radius: var(--radius); }
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  margin-bottom: 0.75rem;
  background: #fff;
  border-radius: 10px;
}
.brand-logo img { max-height: 100%; max-width: 90%; width: auto; height: auto; object-fit: contain; }
.brand-title { font-size: 1.35rem; font-weight: 800; color: var(--navy); }
.brand-text { color: var(--muted); }
.brand-cta { margin-top: auto; padding-top: 0.5rem; font-weight: 700; color: var(--navy); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--gray-500); }
@media (min-width: 900px) { .brand-logo { height: 210px; } .brand-card { padding: 2rem; } }

/* Promo */
.promo {
  background:
    linear-gradient(180deg, var(--gray-100) 0%, var(--white) 100%);
}
.promo p { color: var(--muted); font-size: 1.125rem; margin-bottom: 1.75rem; }

/* Contact */
.contact { background: #fff; }
.contact-list {
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.contact-list li {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.contact-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.contact-list a[href^="mailto:"] { overflow-wrap: anywhere; }
.reviews-link { margin: -0.5rem 0 1.5rem; font-weight: 600; }
@media (max-width: 359px) { .contact-list li { font-size: 1rem; } }
/* Tablet+: columns size to their content and the email never wraps */
@media (min-width: 768px) {
  .contact-list {
    grid-template-columns: repeat(3, auto);
    justify-content: center;
  }
  .contact-list li {
    overflow-wrap: normal;
    font-size: 1rem;
    padding: 1rem 1.125rem;
  }
  .contact-list a[href^="mailto:"] { white-space: nowrap; overflow-wrap: normal; }
}
/* Desktop: let the card row extend past the narrow text column so cards get room */
@media (min-width: 1024px) {
  .contact-list {
    width: 920px;
    margin-left: 50%;
    transform: translateX(-50%);
    gap: 1.25rem;
  }
  .contact-list li { font-size: 1.125rem; padding: 1rem 1.5rem; }
}

/* Footer */
.site-footer { background: var(--navy); color: var(--gray-300); padding: 2rem 0; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gray-300); }
.site-footer :focus-visible { outline: var(--focus-on-dark); }
.footer-inner p { margin: 0 0 0.5rem; }
.footer-inner p:last-child { margin-bottom: 0; }
@media (min-width: 900px) {
  .footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
  .footer-inner p { margin: 0; }
}
