/* Factor Seven Seven — site styles
   Design tokens match the mockup and the Wix Build Sheet. */

:root {
  --ink: #101412;
  --ink-2: #1A201B;
  --ink-line: #2C342D;
  --white: #FFFFFF;
  --mist: #F4F6F1;
  --line: #E4E8DE;
  --green: #8CC63F;
  --green-dark: #3B6E12;
  --green-darker: #2A500C;
  --text-muted: #4A5249;
  --text-on-dark: #C2C8C0;
  --text-footer: #A9B0A7;
  --nav-text: #3A403A;

  --ashley: #4744D6;
  --ashley-deep: #2E2BA8;
  --ashley-night: #13123A;
  --ashley-night-line: #2C2A66;
  --ashley-mist: #F5F5FE;
  --ashley-line: #E3E2FA;
  --ashley-text-muted: #4A4D63;
  --coral: #FF7A5C;
  --coral-soft: #FF9A80;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --max: 1200px;
  --gutter: 32px;
  --section-y: 112px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--green-dark); }
a:hover { color: var(--green-darker); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
[id] { scroll-margin-top: 96px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 12px 18px; text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--tight { padding-top: 72px; padding-bottom: 72px; }
.bg-ink { background: var(--ink); color: var(--white); }
.bg-mist { background: var(--mist); }
.bg-white { background: var(--white); }
.border-y { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.border-b { border-bottom: 1px solid var(--line); }
.border-t { border-top: 1px solid var(--line); }

/* ---------- Type ---------- */
.eyebrow {
  margin: 0 0 16px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--green-dark);
}
.bg-ink .eyebrow, .eyebrow--light { color: var(--green); }
.h1, .h2, .h3 { font-family: var(--serif); }
.h1 { font-weight: 500; font-size: clamp(44px, 6.2vw, 76px); line-height: 1.03; letter-spacing: -0.005em; }
.h1 em { font-style: italic; }
.h2 { font-weight: 500; font-size: clamp(36px, 4.4vw, 54px); line-height: 1.08; }
.h3 { font-weight: 600; font-size: 28px; line-height: 1.2; }
.lead { font-size: 17px; line-height: 1.75; color: var(--text-muted); }
.bg-ink .lead { color: var(--text-on-dark); }
.body { font-size: 15px; line-height: 1.8; color: var(--text-muted); }
.small { font-size: 14px; line-height: 1.75; color: var(--text-muted); }
.accent { color: var(--green); }
.tm { font-family: var(--sans); font-size: 0.45em; font-weight: 600; letter-spacing: 0; vertical-align: super; margin-left: 2px; line-height: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 16px 32px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; border-radius: 0; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }
.btn--primary { background: var(--green); color: var(--ink); }
.btn--primary:hover { background: #9DD254; color: var(--ink); }
.btn--outline-light { border-color: rgba(255,255,255,.45); color: var(--white); background: transparent; }
.btn--outline-light:hover { border-color: var(--white); background: rgba(255,255,255,.06); color: var(--white); }
.btn--outline-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline-dark:hover { background: var(--ink); color: var(--white); }
.btn--outline-dark:hover svg { stroke: var(--white); }
.btn--ashley { background: var(--ashley); color: var(--white); }
.btn--ashley:hover { background: var(--ashley-deep); color: var(--white); }
.btn--white { background: var(--white); color: var(--ashley-deep); }
.btn--white:hover { background: #ECEBFF; color: var(--ashley-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 52px; height: auto; }
.brand__name { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: 0.18em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__link {
  color: var(--nav-text); text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 0; border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--green); }
.nav__cta { padding: 14px 22px; min-height: 44px; }
.nav-toggle {
  display: none; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); background: var(--white); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 22px; height: 2px; background: var(--ink); position: relative; transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Layout helpers ---------- */
.split { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.split--top { align-items: flex-start; }
.split__main { flex: 999 1 520px; min-width: 0; }
.split__side { flex: 1 1 340px; min-width: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 56px; }
.section-head > div { flex: 1 1 520px; min-width: 0; }
.section-head > p { flex: 1 1 380px; min-width: 0; }
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* ---------- Hero ---------- */
.hero { padding-top: 112px; padding-bottom: 104px; }
.hero .lead { margin-top: 32px; max-width: 580px; }
.hero .btn-row { margin-top: 44px; }
.glance { background: var(--ink-2); border: 1px solid rgba(140,198,63,.35); padding: 36px; }
.glance__title { margin: 0 0 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.27em; color: var(--green); }
.glance__row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ink-line); }
.glance__row:last-child { border-bottom: 0; }
.glance__row dt { font-size: 13px; color: var(--text-footer); }
.glance__row dd { font-size: 15px; font-weight: 600; letter-spacing: 0.05em; text-align: right; }

/* ---------- Stats ---------- */
.stat { border-left: 2px solid var(--green); padding-left: 20px; }
.stat__value { font-family: var(--serif); font-size: 46px; font-weight: 500; line-height: 1; }
.stat__label { margin-top: 8px; font-size: 14px; color: var(--text-muted); }

/* ---------- Service cards ---------- */
.cards-joined { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--white); padding: 44px 36px; }
.card__icon { width: 32px; height: 32px; stroke: var(--green-dark); fill: none; stroke-width: 1.4; }
.card .h3 { margin: 24px 0 12px; }

/* ---------- Media ---------- */
.ashley-icon { width: 100%; max-width: 300px; aspect-ratio: 1 / 1; border-radius: 22%; box-shadow: 0 24px 48px rgba(85,81,238,.22); margin: 0 auto; }
.portrait { position: relative; max-width: 460px; margin: 0 auto 20px 0; }
.portrait::before { content: ""; position: absolute; top: 20px; left: 20px; right: -20px; bottom: -20px; border: 2px solid var(--green); }
.portrait img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo--entrance { object-position: 50% 30%; }
figcaption { margin-top: 12px; font-size: 13px; color: var(--text-muted); }
.person { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.person__name { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.person__title { margin-top: 4px; font-size: 13px; letter-spacing: 0.12em; color: var(--green-dark); }
.person .btn { margin-top: 24px; }

/* ---------- Contact ---------- */
.contact-details { margin-top: 40px; display: flex; flex-direction: column; gap: 24px; font-size: 15px; line-height: 1.65; color: var(--text-on-dark); }
.label-sm { margin: 0 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green); }
.bg-ink a:not(.btn) { color: var(--white); text-decoration: none; }
.bg-ink a:not(.btn):hover { color: var(--green); text-decoration: underline; }
.form { background: var(--ink-2); border: 1px solid rgba(140,198,63,.3); padding: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-on-dark); }
.field input, .field textarea {
  background: transparent; border: 0; border-bottom: 1px solid #5A635A; border-radius: 0;
  color: var(--white); font: inherit; font-size: 16px; padding: 12px 0;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--green); box-shadow: 0 1px 0 var(--green); }
.form .btn { grid-column: 1 / -1; justify-self: start; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; font-size: 14px; line-height: 1.6; color: var(--text-on-dark); min-height: 1px; }
.form-status--ok { color: var(--green); }
.form-status--error { color: #FFB4A3; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--text-footer); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--ink-line); font-size: 12px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--green); }

/* ---------- ASHLEY page ---------- */
.theme-ashley .eyebrow { color: var(--ashley); }
.ashley-hero { background: var(--ashley); color: var(--white); }
.ashley-hero .eyebrow { color: var(--white); display: inline-flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); display: inline-block; }
.ashley-hero .h1 { font-size: clamp(46px, 6.6vw, 80px); line-height: 1.0; }
.ashley-hero .lead { color: #E6E5FF; margin-top: 32px; max-width: 560px; }
.ashley-hero__icon { width: 100%; max-width: 360px; aspect-ratio: 1 / 1; border-radius: 22%; box-shadow: 0 32px 64px rgba(16,12,80,.35); outline: 1px solid rgba(255,255,255,.25); margin: 0 auto; }
.bg-ashley-mist { background: var(--ashley-mist); }
.stat--ashley { border-left-color: var(--ashley); }
.stat--ashley .stat__value { font-size: 34px; font-weight: 600; line-height: 1.1; }
.stat--ashley .stat__label { color: var(--ashley-text-muted); }
.feature { border: 1px solid var(--ashley-line); padding: 36px; background: var(--white); }
.feature svg { width: 30px; height: 30px; stroke: var(--ashley); fill: none; stroke-width: 1.5; }
.feature .h3 { font-size: 26px; margin: 20px 0 10px; }
.feature .small { color: var(--ashley-text-muted); }
.agents-section { background: var(--ashley-night); color: var(--white); }
.agents-section .eyebrow { color: #B9B7FF; }
.agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1px; background: var(--ashley-night-line); border: 1px solid var(--ashley-night-line); margin-top: 48px; }
.agent { background: var(--ashley-night); padding: 32px; }
.agent__num { font-size: 12px; font-weight: 600; letter-spacing: 0.15em; color: var(--coral-soft); }
.agent .h3 { font-size: 26px; margin: 12px 0 8px; }
.agent p:last-child { font-size: 14px; line-height: 1.7; color: #C9C8EC; }
.center { text-align: center; }
.narrow { max-width: 900px; }

/* ---------- Contracting page ---------- */
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1px; background: var(--ink-line); border: 1px solid var(--ink-line); margin-top: 56px; }
.codes > div { background: var(--ink-2); padding: 28px; }
.codes dt { font-size: 11px; font-weight: 600; letter-spacing: 0.27em; color: var(--green); }
.codes dd { margin-top: 10px; font-size: 24px; font-weight: 600; letter-spacing: 0.06em; }
.numbered { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.numbered li { display: flex; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.numbered__n { font-size: 12px; font-weight: 600; color: var(--green-dark); min-width: 28px; padding-top: 3px; }
.numbered h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; font-family: var(--sans); }
.naics { background: var(--mist); border: 1px solid var(--line); padding: 12px 36px; }
.naics__title { margin: 24px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.25em; color: var(--green-dark); }
.naics ul { list-style: none; margin: 0; padding: 0; }
.naics li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.naics li:last-child { border-bottom: 0; padding-bottom: 24px; }
.naics__code { font-family: var(--serif); font-size: 24px; font-weight: 600; min-width: 84px; }
.naics__desc { font-size: 14px; color: var(--text-muted); flex: 1 1 200px; }
.naics li.is-primary .naics__desc { color: var(--ink); font-weight: 600; }
.tag { background: var(--green); color: var(--ink); font-size: 10px; font-weight: 600; letter-spacing: 0.15em; padding: 4px 10px; }
.diff { border-top: 2px solid var(--green); padding-top: 20px; }
.diff .h3 { font-size: 26px; margin-bottom: 8px; }
.placeholder-card { border: 1px dashed #B8C0B4; padding: 32px; font-size: 14px; color: #5A635A; }
.company-data { display: flex; flex-direction: column; gap: 20px; font-size: 15px; line-height: 1.6; }
.company-data dt { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; color: var(--green); }
.company-data dd { margin-top: 4px; }

/* ---------- Insights band ---------- */
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.band > div { flex: 1 1 520px; min-width: 0; }
.band__quote { font-family: var(--serif); font-size: clamp(26px, 3vw, 32px); line-height: 1.25; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: flex; align-items: center; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --section-y: 88px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px;
    box-shadow: 0 16px 32px rgba(16,20,18,.08);
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav__link[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--green); padding-left: 12px; }
  .nav__cta { margin-top: 16px; }
  .no-js .nav { display: flex; position: static; box-shadow: none; padding: 0; border: 0; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --section-y: 72px; }
  .brand img { width: 44px; }
  .brand__name { font-size: 16px; letter-spacing: 0.12em; }
  .hero { padding-top: 72px; padding-bottom: 72px; }
  .glance, .form { padding: 28px 22px; }
  .card { padding: 32px 24px; }
  .naics { padding: 8px 20px; }
  .btn-row .btn { width: 100%; }
  .stat__value { font-size: 40px; }
  .portrait { margin-right: 20px; }
  .split { gap: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
