/* ==========================================================================
   Farallon Global Services — brand stylesheet
   Navy #0D2241 · Slate #8AA5B8 · White
   Display: Playfair Display   Text: IBM Plex Sans
   ========================================================================== */

:root {
  --navy:        #0D2241;
  --navy-deep:   #081729;
  --navy-soft:   #16304F;
  --slate:       #8AA5B8;
  --slate-deep:  #55748C;
  --paper:       #FFFFFF;
  --paper-alt:   #F1F5F8;
  --rule:        #DCE4EB;
  --rule-dark:   rgba(138, 165, 184, 0.28);
  --ink:         #26364A;
  --muted:       #5A6B7D;
  --muted-light: rgba(255, 255, 255, 0.72);

  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --text: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --measure: 1200px;
  --section-y: clamp(64px, 9vw, 128px);
}

/* --- reset ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a, button, summary, label { -webkit-tap-highlight-color: rgba(138, 165, 184, 0.24); }

a { color: var(--navy); text-decoration-color: var(--slate); text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--navy);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--navy); color: #fff; padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --- layout --------------------------------------------------------------- */

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

.section { padding-block: var(--section-y); }
.section--alt { background: var(--paper-alt); }
.section--navy { background: var(--navy); color: var(--muted-light); }
.section--navy h2,
.section--navy h3,
.section--navy h4 { color: #fff; }

.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font-size: clamp(30px, 4.2vw, 46px); }
.section-head p {
  margin-top: 18px;
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 40rem;
}
.section--navy .section-head p { color: var(--muted-light); }

.lede { font-size: clamp(1.06rem, 1.6vw, 1.22rem); color: var(--muted); }
.section--navy .lede { color: var(--muted-light); }

/* --- header --------------------------------------------------------------- */

.masthead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.masthead__logo { display: block; padding-block: 6px; }
.masthead__logo img { width: clamp(122px, 16vw, 178px); }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 34px); }

.nav a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--navy); border-bottom-color: var(--slate); }
.nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }

.nav a.btn { color: #fff; border-bottom: 1px solid var(--navy); }
.nav a.btn:hover { color: #fff; background: var(--navy-soft); border-color: var(--navy-soft); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--rule); border-radius: 4px;
  min-height: 44px; min-width: 44px; padding: 9px 14px; cursor: pointer;
  font-family: var(--text); font-size: 0.86rem; color: var(--navy);
}

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--text);
  font-size: 0.95rem; font-weight: 500;
  padding: 13px 26px;
  border-radius: 3px;
  border: 1px solid var(--navy);
  background: var(--navy); color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: var(--navy-soft); border-color: var(--navy-soft); }

.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }

.btn--light { background: #fff; color: var(--navy); border-color: #fff; }
.btn--light:hover { background: var(--slate); border-color: var(--slate); color: var(--navy); }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.btn--outline-light:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.textlink {
  display: inline-block;
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--slate);
  padding-bottom: 2px;
}
.textlink:hover { border-bottom-color: var(--navy); }
.section--navy .textlink { color: #fff; border-bottom-color: var(--slate); }

/* --- hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.hero__mark {
  position: absolute;
  right: max(clamp(24px, 6vw, 96px), calc(50% - var(--measure) / 2));
  bottom: clamp(24px, 4vw, 56px);
  width: clamp(130px, 16vw, 220px);
  opacity: 0.16;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  padding-block: clamp(72px, 11vw, 148px) clamp(56px, 7vw, 92px);
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.45rem, 6.2vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  max-width: 17ch;
}

.hero p {
  margin-top: 26px;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: var(--muted-light);
}

.hero--interior .hero__inner { padding-block: clamp(60px, 8vw, 108px) clamp(52px, 7vw, 92px); }

/* credentials strip — the facts a procurement officer scans for */

.credentials {
  position: relative;
  border-top: 1px solid var(--rule-dark);
  background: var(--navy);
}
.credentials__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.credentials__item {
  padding: 26px 26px 28px;
  border-left: 1px solid var(--rule-dark);
}
.credentials__item:first-child { border-left: 0; padding-left: 0; }
.credentials__item dt {
  font-family: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 8px;
}
.credentials__item dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1.16rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

/* --- service index -------------------------------------------------------- */

.index { border-top: 1px solid var(--rule); }

.index__row {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) 2fr;
  gap: clamp(20px, 5vw, 64px);
  padding-block: clamp(26px, 3.4vw, 40px);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.18s ease, padding-inline 0.18s ease;
}
a.index__row:hover { background: var(--paper-alt); }

.index__row h3 { font-size: clamp(1.32rem, 2.2vw, 1.7rem); }
.index__row p { color: var(--muted); margin: 0; max-width: 44rem; }
.index__row .kicker {
  display: block;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--slate-deep);
  margin-bottom: 10px;
}

/* --- bundle callout ------------------------------------------------------- */

.bundle {
  margin-top: clamp(40px, 5vw, 64px);
  background: var(--navy);
  color: var(--muted-light);
  padding: clamp(34px, 4.6vw, 56px);
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 32px;
  align-items: center;
  border-radius: 3px;
}
.bundle h3 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.05rem); }
.bundle p { margin: 14px 0 0; max-width: 38rem; }

/* --- pillars (feature grid without the card kit) -------------------------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: clamp(26px, 3.4vw, 48px);
}
.pillar { border-top: 2px solid var(--slate); padding-top: 20px; }
.pillar h4 { font-size: 1.16rem; margin-bottom: 8px; }
.pillar p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.section--navy .pillar p { color: var(--muted-light); }
.section--navy .pillar { border-top-color: var(--slate); }

/* --- split (text + supporting column) ------------------------------------ */

.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}
.split__aside { border-left: 1px solid var(--rule); padding-left: clamp(24px, 3vw, 44px); }
.section--navy .split__aside { border-left-color: var(--rule-dark); }

.stack-list { list-style: none; margin: 0; padding: 0; }
.stack-list li { padding-block: 18px; border-bottom: 1px solid var(--rule); }
.stack-list li:first-child { padding-top: 0; }
.stack-list li:last-child { border-bottom: 0; }
.stack-list h4 { font-size: 1.06rem; margin-bottom: 6px; }
.stack-list p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* --- service detail (services page) --------------------------------------- */

.discipline {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 76px);
  padding-block: clamp(48px, 6vw, 84px);
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 100px;
}
.discipline:last-of-type { border-bottom: 0; }
.discipline__kicker {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--slate-deep);
  margin-bottom: 12px;
}
.discipline h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 20px; }
.discipline p { color: var(--muted); }

.scope { margin: 0; padding: 0; list-style: none; }
.scope__title {
  font-family: var(--text);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--navy);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 4px;
}
.scope li {
  padding: 11px 0 11px 24px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
  position: relative;
}
.scope li::before {
  content: "";
  position: absolute;
  left: 0; top: 19px;
  width: 9px; height: 9px;
  background: var(--slate);
}

/* --- agency columns (government page) ------------------------------------ */

.agencies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(30px, 4vw, 60px);
}
.agencies h3 {
  font-size: 1.32rem;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--slate);
  margin-bottom: 4px;
}
.agencies ul { list-style: none; margin: 0; padding: 0; }
.agencies li {
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.96rem;
}
.section--navy .agencies h3 { border-bottom-color: var(--slate); }
.section--navy .agencies li { border-bottom-color: var(--rule-dark); color: var(--muted-light); }

/* --- registrations -------------------------------------------------------- */

.registrations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.registration { background: var(--paper); padding: clamp(26px, 3vw, 38px); }
.registration h4 { font-size: 1.22rem; margin-bottom: 10px; }
.registration p { color: var(--muted); font-size: 0.94rem; margin: 0; }

/* --- values / mission ----------------------------------------------------- */

.statements { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(28px, 4vw, 56px); }
.statement { border-top: 2px solid var(--slate); padding-top: 22px; }
.statement h3 { font-size: 1.45rem; margin-bottom: 14px; }
.statement p { color: var(--muted); margin: 0; }
.section--navy .statement p { color: var(--muted-light); }

/* --- contact -------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 5.5vw, 88px);
  align-items: start;
}

.detail-list { margin: 28px 0 0; padding: 0; }
.detail-list > div { padding-block: 16px; border-bottom: 1px solid var(--rule); }
.detail-list > div:first-child { border-top: 1px solid var(--rule); }
.detail-list dt {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--slate-deep);
  margin-bottom: 5px;
}
.detail-list dd { margin: 0; font-size: 1.06rem; color: var(--navy); font-weight: 500; }
.detail-list dd a { text-decoration: none; }
.detail-list dd a:hover { text-decoration: underline; }

.form-shell {
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy);
  padding: clamp(26px, 3.6vw, 44px);
  background: var(--paper);
}
.form-shell h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.form-shell > p { color: var(--muted); margin-top: 10px; font-size: 0.97rem; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 7px;
}

.field input,
.field select,
.field textarea {
  font-family: var(--text);
  font-size: 0.97rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--slate-deep) 50%),
                    linear-gradient(135deg, var(--slate-deep) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
  padding-block: 13px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(138, 165, 184, 0.3);
}

.hp { position: absolute; left: -9999px; }

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding-block: 22px;
  font-family: var(--display);
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
  font-weight: 700;
  color: var(--navy);
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--text);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--slate-deep);
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 24px; color: var(--muted); max-width: 52rem; margin: 0; }

/* --- closing band --------------------------------------------------------- */

.closer {
  position: relative;
  background: var(--navy);
  color: var(--muted-light);
  overflow: hidden;
}
.closer__mark {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(170px, 20vw, 250px);
  opacity: 0.12;
  pointer-events: none;
}
.closer__inner {
  position: relative;
  padding-block: clamp(64px, 8vw, 108px);
  text-align: center;
}
.closer h2 { color: #fff; font-size: clamp(1.85rem, 4vw, 2.9rem); }
.closer p { margin: 18px auto 0; max-width: 34rem; }
.closer .btn-row { justify-content: center; }

/* --- footer --------------------------------------------------------------- */

.footer {
  background: var(--navy);
  color: var(--muted-light);
  padding-block: clamp(52px, 6vw, 80px) 34px;
  border-top: 1px solid var(--rule-dark);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(30px, 4vw, 56px);
}
.footer__brand img { width: 158px; margin-bottom: 20px; }
.footer__brand .footer__logo--print { display: none; }
.footer__brand p { font-size: 0.93rem; max-width: 30rem; color: var(--muted-light); }

.footer h5 {
  font-family: var(--text);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 11px; font-size: 0.93rem; }
.footer a { color: var(--muted-light); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--slate); }
.footer address { font-style: normal; font-size: 0.93rem; margin-top: 14px; }

.footer__legal {
  margin-top: clamp(40px, 5vw, 62px);
  padding-top: 24px;
  border-top: 1px solid var(--rule-dark);
  display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.55);
}
.footer__legal ul { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer__legal li { margin: 0; }

/* --- one orchestrated page-load reveal ------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
  .reveal:nth-child(2) { animation-delay: 0.09s; }
  .reveal:nth-child(3) { animation-delay: 0.18s; }
  .reveal:nth-child(4) { animation-delay: 0.27s; }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 1000px) {
  .split, .discipline, .contact-grid { grid-template-columns: 1fr; }
  .split__aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .credentials__grid { grid-template-columns: 1fr 1fr; }
  .credentials__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .credentials__item:nth-child(-n+2) { border-bottom: 1px solid var(--rule-dark); }
  .bundle { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 22px;
    box-shadow: 0 18px 30px -18px rgba(13, 34, 65, 0.45);
  }
  .nav.is-open { display: flex; }
  .nav a { padding-block: 14px; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 16px; }
  .nav-toggle { display: block; }
  .masthead__inner { position: relative; min-height: 70px; }
  .index__row { grid-template-columns: 1fr; gap: 12px; }
  .field-grid { grid-template-columns: 1fr; }
  .credentials__grid { grid-template-columns: 1fr; }
  .credentials__item { border-left: 0; padding-inline: 0; border-bottom: 1px solid var(--rule-dark); }
  .credentials__item:last-child { border-bottom: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; }
}

/* four-up variant so a set of four commitments fills the row evenly */
@media (min-width: 1001px) {
  .pillars--quad { grid-template-columns: repeat(4, 1fr); }
}

/* --- touch targets and iOS input behaviour -------------------------------- */

@media (max-width: 760px) {
  /* Safari zooms the whole page when a focused control is under 16px */
  .field input, .field select, .field textarea { font-size: 16px; }

  /* give small text links a finger-sized hit area */
  .footer li { margin-bottom: 0; }
  .footer li a { display: inline-block; padding-block: 13px; }
  .detail-list dd a { display: inline-block; padding-block: 10px; }
  .nav a { min-height: 48px; display: flex; align-items: center; }
}

@media (hover: none) {
  /* hover styling is meaningless on touch and can stick after a tap */
  a.index__row:hover { background: transparent; }
}

/* --- print: capability statements get printed ----------------------------- */

@media print {
  .masthead, .nav-toggle, .closer, .btn-row, .skip-link,
  .hero__mark, .closer__mark { display: none !important; }

  /* the footer turns white on paper, so swap to the navy-wordmark logo */
  .footer__brand .footer__logo { display: none; }
  .footer__brand .footer__logo--print { display: block; }

  body { font-size: 11pt; line-height: 1.45; color: #000; }
  .hero, .credentials, .section--navy, .footer, .bundle {
    background: #fff !important;
    color: #000 !important;
  }
  .hero h1, .section--navy h2, .section--navy h3, .section--navy h4,
  .bundle h3, .footer h5 { color: #000 !important; }
  .hero p, .section--navy p, .footer p, .credentials__item dd,
  .section--navy .agencies li { color: #000 !important; }
  .credentials__item dt { color: #333 !important; }

  .section { padding-block: 18pt; }
  .hero__inner { padding-block: 0 18pt; }
  .split, .discipline, .contact-grid { grid-template-columns: 1fr 1fr; }
  .discipline, .index__row, .pillar, .statement { break-inside: avoid; }
  .faq details { break-inside: avoid; }

  a { text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}
