/* Fraunhofer-style editorial — home main only */

/*
 * Fraunhofer rhythm: content → hairline → open paper → next block.
 * Spacing scale — one system for sections and cards.
 */
/* Side rails: below hero only (header + #top stay full width) */
body.home {
  --page-rail: 20px;
  --page-pad: 24px;
  background-attachment: scroll;
}
@media (min-width: 640px) {
  body.home { --page-rail: 32px; }
}
@media (min-width: 1024px) {
  body.home {
    --page-rail: 48px;
    --page-pad: 32px;
  }
}
@media (min-width: 1280px) {
  body.home { --page-rail: 64px; }
}
@media (max-width: 720px) {
  body.home { --page-pad: 20px; }
}

/* Rails only on blocks after #top — hero/header never touch page-rail */
body.home main {
  margin: 0;
  border: 0;
  overflow: visible;
}

body.home #top,
body.home #top .hero-frame {
  margin-inline: 0;
  border-inline: 0;
  max-width: none;
  width: 100%;
}

body.home .home-below-hero,
body.home .site-footer {
  margin-inline: var(--page-rail);
  border-inline: 1px solid var(--line);
  box-sizing: border-box;
  overflow-x: clip;
  width: auto;
  max-width: none;
}

.home .nav-frame {
  margin: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}
.home .site-header {
  background-color: #fff;
}
@media (min-width: 1024px) {
  .home .nav-shell > .brand { padding-inline: 32px; }
  .home .nav-util { padding-inline: 20px 32px; }
  .home .nav-bar { padding-right: 32px; }
}
@media (max-width: 1023px) {
  .home .nav-shell > .brand { padding-inline: 20px; }
  .home .nav-shell .nav-util { padding-inline: 16px; }
}
.home .foot-wide {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: var(--page-pad);
  box-sizing: border-box;
}

.home {
  --fh-gap-xs: 10px;
  --fh-gap-sm: 14px;
  --fh-gap-md: 20px;
  --fh-gap-lg: 28px;
  --fh-gap-xl: 40px;
  --fh-pad-card-y: 18px;
  --fh-pad-card-x: 18px;
  --fh-pad-section-y: 44px;
  --fh-pad-section-bottom: 52px;
}
@media (min-width: 640px) {
  .home {
    --fh-pad-card-y: 20px;
    --fh-pad-card-x: 22px;
    --fh-gap-lg: 32px;
    --fh-gap-xl: 48px;
  }
}
@media (min-width: 900px) {
  .home {
    --fh-pad-card-y: 22px;
    --fh-pad-card-x: 24px;
    --fh-pad-section-y: 64px;
    --fh-pad-section-bottom: 72px;
    --fh-gap-xl: 56px;
  }
}

.home main > .fh-section {
  position: relative;
  isolation: isolate;
  margin-inline: var(--page-rail);
  margin-block: 0 var(--fh-gap-xl);
  padding: var(--fh-pad-section-y) 0 var(--fh-pad-section-bottom);
  border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
  overflow-x: clip;
}
.home main > .fh-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  width: auto;
  transform: none;
  top: 0;
  bottom: 0;
  pointer-events: none;
  background: none;
}
.home main > .fh-section.fh-section--paper::before,
.home main > .fh-section.fh-section--logos::before {
  content: none;
}
.home .home-below-hero + .fh-section {
  padding-top: var(--fh-pad-section-y);
}
.home .wrap,
.home main > .fh-section .wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: var(--page-pad);
  border: 0;
  box-sizing: border-box;
}
.home #sectors .fh-section-foot {
  margin-bottom: 0;
}
.home main > .fh-section:last-of-type {
  border-bottom: 0;
  margin-bottom: var(--fh-gap-lg);
  padding-bottom: var(--fh-gap-xl);
}
.home .home-close {
  margin-top: 0;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  .home .home-close { padding-top: 72px; }
}

/* Pattern only on wash bands (sectors, method) — dots + wash, nothing else */
.fh-section--wash::before {
  background-image:
    var(--bg-pattern-dots-soft),
    linear-gradient(180deg, var(--wash) 0%, var(--bone-2) 100%);
  background-size: var(--bg-pattern-dots-soft-size), auto;
  background-repeat: repeat, no-repeat;
}
.home main > .fh-section.fh-section--paper {
  background: #fff;
}
.home main > .fh-section.fh-section--logos {
  background: var(--bone);
}

.fh-h2 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4.2vw, 3.05rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.06;
  max-width: 20ch;
  text-wrap: balance;
}
.fh-h2--wide { max-width: 22ch; }
.fh-lede {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}
.fh-intro-head {
  max-width: 720px;
  margin-bottom: var(--fh-gap-lg);
}
.fh-intro-head .fh-lede { margin-top: var(--fh-gap-sm); }
.fh-section-foot {
  margin: var(--fh-gap-lg) 0 0;
  padding-top: var(--fh-gap-xs);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.fh-section-foot .link-sweep { color: var(--accent); }
.fh-section-foot .link-sweep + .link-sweep {
  margin-left: 0.15em;
}

/* Sectors — topic grid */
.fh-topic-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  grid-template-columns: 1fr 1fr;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  width: calc(100% + 2 * var(--page-pad, 24px));
  margin-inline: calc(-1 * var(--page-pad, 24px));
}
@media (min-width: 768px) {
  .fh-topic-grid { grid-template-columns: repeat(4, 1fr); }
}
.fh-topic {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.3s ease;
}
.fh-topic:hover {
  background: linear-gradient(180deg, #fff 0%, #f1fbfd 100%);
}
.fh-topic__fig {
  display: block;
  height: 100px;
  overflow: hidden;
  background: var(--photo-frame-bg, #e4eff0);
  position: relative;
  isolation: isolate;
}
@media (min-width: 640px) { .fh-topic__fig { height: 132px; } }
@media (min-width: 1024px) { .fh-topic__fig { height: 148px; } }
.fh-topic__fig img {
  height: 100%;
  object-fit: cover;
}
.fh-topic__body {
  padding: var(--fh-pad-card-y) var(--fh-pad-card-x) calc(var(--fh-pad-card-y) + 2px);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.fh-topic__label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.fh-topic__more {
  margin-top: auto;
  padding-top: var(--fh-gap-sm);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.fh-topic:hover .fh-topic__more { color: var(--crimson); }

/* Suite tabs — underline */
.fh-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fh-tabs::-webkit-scrollbar { display: none; }
.fh-tabs button {
  flex-shrink: 0;
}
.fh-services-shell .fh-tabs {
  background: #fff;
  padding: 0 6px;
}
.fh-services-shell .fh-tabs button {
  border: 0;
  background: transparent;
  padding: 16px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.fh-tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent-2);
}
.fh-tabs button:hover { color: var(--accent); }

/* Product grid */
.fh-services-shell,
.fh-method-shell {
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: #fff;
}
.fh-services-shell {
  position: relative;
}
.fh-services-shell::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--steel));
  pointer-events: none;
}
.fh-method-shell .fh-steps {
  margin-bottom: 0;
}
.fh-method-shell .fh-principles {
  margin: 0;
  border-top: 1px solid var(--line);
}
.fh-method-shell .fh-compare {
  margin-top: 0;
  border-top: 1px solid var(--line);
}
.fh-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
}
@media (min-width: 640px) {
  .fh-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .fh-grid { grid-template-columns: repeat(3, 1fr); }
}
.fh-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  min-height: 100%;
}
.fh-card:hover {
  background: linear-gradient(180deg, #fff 0%, #f2fbfd 100%);
}
.fh-card:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: -2px;
  z-index: 1;
}
.fh-topic:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: -2px;
  z-index: 1;
}
.fh-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.fh-card__shot {
  height: 152px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1024px) {
  .fh-card__shot { height: 168px; }
}
.fh-card__shot img[src*=".jpg"] {
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.fh-card__shot img[src*=".png"] {
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 12px 16px;
  box-sizing: border-box;
}
.fh-card__body {
  padding: var(--fh-pad-card-y) var(--fh-pad-card-x) var(--fh-gap-md);
  flex: 1;
}
.fh-card__code {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.fh-card__body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fh-card:hover h3 { color: var(--accent); }
.fh-card__body p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fh-card__foot {
  padding: 0 var(--fh-pad-card-x) var(--fh-pad-card-y);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Why — editorial list */
.fh-why {
  display: grid;
  gap: 40px;
}
@media (min-width: 1024px) {
  .fh-why {
    grid-template-columns: minmax(260px, 0.38fr) 1fr;
    gap: 56px;
    align-items: start;
  }
}
.fh-why__aside { position: sticky; top: 108px; }
.fh-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.fh-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.fh-list__n {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  padding-top: 2px;
}
.fh-list h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.fh-list p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Three desks */
.fh-desks {
  display: grid;
  gap: 1px;
  background: var(--line);
  margin-top: 8px;
}
@media (min-width: 900px) {
  .fh-desks { grid-template-columns: repeat(3, 1fr); }
}
.fh-desk {
  background: #fff;
  padding: 28px 24px 32px;
  border-top: 3px solid var(--navy);
}
.fh-desk:nth-child(2) { border-top-color: var(--accent-2); }
.fh-desk:nth-child(3) { border-top-color: var(--steel); }
.fh-desk b {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.fh-desk h3 {
  margin: 10px 0 0;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.fh-desk p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Footprint */
.fh-logos-lead {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.fh-logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 16px;
  justify-items: center;
  align-items: center;
  padding: var(--fh-gap-lg) var(--fh-gap-md);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: var(--fh-gap-sm);
  box-shadow: 0 8px 28px rgba(11, 143, 168, 0.05);
}
@media (min-width: 640px) {
  .fh-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--fh-gap-lg) var(--fh-gap-xl);
    padding: var(--fh-gap-xl) var(--fh-gap-lg);
  }
}
.fh-logos img {
  height: 30px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  opacity: 0.88;
  filter: none;
  transition: opacity 0.2s ease;
}
.fh-logos img:hover { opacity: 1; }
#svc-tiles:empty {
  min-height: 200px;
  background: linear-gradient(180deg, #f6fcfd 0%, #fff 100%);
}
@media (min-width: 640px) {
  #svc-tiles:empty { min-height: 240px; }
}
/* Method — four steps */
.fh-steps {
  display: grid;
  gap: 1px;
  margin-bottom: 0;
  background: var(--line);
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 900px) {
  .fh-steps { grid-template-columns: repeat(4, 1fr); }
}
.fh-step {
  margin: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.fh-step__fig {
  display: block;
  height: 120px;
  overflow: hidden;
  background: var(--photo-frame-bg, #e4eff0);
}
@media (min-width: 640px) { .fh-step__fig { height: 140px; } }
@media (min-width: 1024px) { .fh-step__fig { height: 156px; } }
.fh-step__fig img {
  height: 100%;
  object-fit: cover;
}
.fh-step figcaption {
  padding: var(--fh-pad-card-y) var(--fh-pad-card-x) 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.fh-step figcaption b {
  display: inline-block;
  margin-right: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent-2);
}
.fh-step p {
  margin: var(--fh-gap-xs) 0 0;
  padding: 0 var(--fh-pad-card-x) var(--fh-pad-card-y);
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  flex: 1;
}

/* Principles — compact why */
.fh-principles {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .fh-principles { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .fh-principles { grid-template-columns: repeat(4, 1fr); }
}
.fh-method-shell .fh-principles li {
  border-top: 0;
  box-shadow: inset 0 3px 0 var(--accent-2);
}
.fh-principles li {
  background: #fff;
  padding: var(--fh-pad-card-y) var(--fh-pad-card-x) calc(var(--fh-pad-card-y) + 2px);
  border-top: 3px solid var(--accent-2);
}
.fh-principles strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.fh-principles span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.fh-contact-meta {
  margin-top: var(--fh-gap-md);
}
.fh-contact-meta p { margin: 0 0 var(--fh-gap-xs); }
.fh-contact-badges {
  margin-top: var(--fh-gap-md) !important;
  padding-top: var(--fh-gap-sm);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.home #sectors,
.home #services,
.home #thesis,
.home #network,
.home #quote {
  scroll-margin-top: 112px;
}
.fh-intro-head .fh-lede .link-sweep {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}
.fh-card {
  transition: background 0.3s ease;
}
.fh-topic {
  transition: background 0.3s ease;
}

/* Compare */
.fh-compare {
  display: grid;
  gap: 1px;
  margin-top: 0;
  background: var(--line);
}
@media (min-width: 900px) {
  .fh-compare { grid-template-columns: 1fr 1fr; }
}
.fh-compare > div {
  padding: var(--fh-gap-lg) var(--fh-gap-md);
  background: #fff;
}
@media (min-width: 900px) {
  .fh-compare > div {
    padding: var(--fh-gap-xl) var(--fh-gap-lg);
  }
}
.fh-compare .is-aw {
  background: var(--navy);
  color: #fff;
}
.fh-compare .is-aw li { color: rgba(255, 255, 255, 0.88); }
.fh-compare b {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.fh-compare .is-aw b { color: var(--accent-2); }
.fh-compare-cta {
  margin: 22px 0 0;
}
.fh-compare .is-aw .btn-line {
  display: inline-block;
  margin-top: 0;
  border-color: var(--accent-2);
  color: #fff;
  padding: 9px 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.fh-compare .is-aw .btn-line:hover {
  background: var(--accent-2);
  color: var(--navy);
}
.fh-compare h3 {
  margin: 10px 0 16px;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.fh-compare ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
  color: var(--muted);
}

/* Contact */
.fh-contact {
  display: grid;
  gap: var(--fh-gap-xl);
  padding-top: var(--fh-gap-xs);
}
@media (min-width: 1024px) {
  .fh-contact {
    grid-template-columns: 5fr 7fr;
    gap: var(--fh-gap-xl);
    align-items: start;
  }
}
/* Contact band — second patterned zone (soft dots + glow) */
.home #quote::before {
  background-image:
    var(--bg-pattern-glow),
    var(--bg-pattern-dots-soft),
    linear-gradient(180deg, var(--wash) 0%, var(--bone) 100%);
  background-size: auto, var(--bg-pattern-dots-soft-size), auto;
  background-repeat: no-repeat, repeat, no-repeat;
}
.home .fh-contact .quote-form {
  display: grid;
  gap: var(--fh-gap-sm);
  background: #fff;
  border: 1px solid var(--line);
  padding: var(--fh-gap-lg) var(--fh-gap-md);
  box-shadow: none;
  border-top: 2px solid var(--accent-2);
  border-radius: 0;
  min-width: 0;
}
.home .fh-contact .quote-form input,
.home .fh-contact .quote-form select,
.home .fh-contact .quote-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
}
.home .fh-contact .quote-form textarea {
  min-height: 128px;
  padding-top: 16px;
}
.quote-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.home .fh-contact .quote-form {
  position: relative;
}
.home .quote-form__row {
  display: grid;
  gap: var(--fh-gap-sm);
}
@media (min-width: 640px) {
  .home .quote-form__row { grid-template-columns: 1fr 1fr; }
  .home .fh-contact .quote-form {
    padding: var(--fh-gap-xl) var(--fh-gap-lg);
  }
}
.quote-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fh-gap-md) var(--fh-gap-lg);
  margin-top: var(--fh-gap-xs);
  padding-top: var(--fh-gap-xs);
}
.quote-form__actions .link-sweep {
  font-size: 14px;
  font-weight: 600;
}
.home .form-status.on {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f0fcff;
  border: 1px solid rgba(0, 167, 201, 0.2);
  border-radius: 8px;
}
.home .form-status.err {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.25);
}
@media (prefers-reduced-motion: reduce) {
  .fh-card:hover,
  .fh-topic:hover,
  .home .home-below-hero .story:hover {
    transform: none;
  }
}

.fh-split-head {
  display: grid;
  gap: var(--fh-gap-md);
  margin-bottom: var(--fh-gap-lg);
}
.fh-split-head__lede {
  margin: 0;
  max-width: 42ch;
}
@media (min-width: 1024px) {
  .fh-split-head {
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--fh-gap-xl);
    align-items: end;
    margin-bottom: var(--fh-gap-xl);
  }
  .fh-split-head__lede { justify-self: end; text-align: left; }
}
