/* =========================================================
   New Affinity — site styles
   Navy #0E2747 · Orange #F25C1F · Quicksand + Figtree
   ========================================================= */

:root {
  --navy: #0E2747;
  --orange: #F25C1F;
  --text-2: #4A5468;      /* secondary text, 7:1 on white */
  --line: #DDE1E8;
  --pale: #F6F7F9;
  --footer-text: #C7CEDB;

  --font-display: 'Quicksand', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;

  --wrap: 1360px;
  --gutter: 80px;
  --side: 260px;
  --section: clamp(100px, 14vw, 200px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

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

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

a { color: var(--navy); text-underline-offset: 4px; }
a:hover { color: var(--orange); }

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

h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }

.dot { color: var(--orange); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #FFFFFF; padding: 12px 18px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 16px; color: #FFFFFF; }

/* ---------- Layout ---------- */

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.section { padding-top: var(--section); padding-bottom: var(--section); }
.section--flush-top { padding-top: 0; }
.section--pale { background: var(--pale); }
.section--ruled { border-top: 1px solid var(--line); }

/* Narrow label column + wide content column */
.split { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.split__side { flex: 0 0 var(--side); }
.split__main { flex: 1 1 560px; min-width: 0; }

.grid { display: grid; gap: 72px 64px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 48px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 36px; }

/* ---------- Header ---------- */

.site-header { position: relative; z-index: 20; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 36px; padding-bottom: 36px;
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.logo:hover { color: var(--navy); }
.logo__icon { width: 38px; height: 38px; flex: 0 0 auto; }
.wordmark { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.005em; white-space: nowrap; }
.wordmark__new { font-weight: 500; }
.wordmark__affinity { font-weight: 700; }
.wordmark .o { color: var(--orange); }

.nav { display: flex; align-items: center; gap: 40px; }
.nav__links { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-size: 15px; font-weight: 500; text-decoration: none;
  padding: 10px 0; display: inline-block; border-bottom: 2px solid transparent;
}
.nav__links a.is-current { border-bottom-color: var(--navy); }
.nav__contact {
  font-size: 15px; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--orange); padding: 10px 0; min-height: 44px;
  display: inline-flex; align-items: center;
}
.nav__contact.is-current { color: var(--orange); }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  font: 600 15px var(--font-body); color: var(--navy);
  background: none; border: 0; padding: 10px 0; min-height: 44px; cursor: pointer;
}
.nav-toggle__bars { width: 22px; height: 12px; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 10px; }
.nav-open .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
.nav-open .nav-toggle__bars::after { top: 5px; transform: rotate(-45deg); }

/* ---------- Type ---------- */

.display {
  font-size: clamp(48px, 8.4vw, 124px);
  line-height: .98; letter-spacing: -0.035em; max-width: 1100px;
}
.display--page { font-size: clamp(44px, 7vw, 104px); line-height: 1; }
.split__main .display--page { font-size: clamp(42px, 6vw, 88px); }
.split__main .lede { margin-top: 36px; }
.display__light { font-weight: 400; display: block; }
.display__bold { font-weight: 700; display: block; }

.statement {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(26px, 3vw, 40px); line-height: 1.32; letter-spacing: -0.01em; max-width: 900px;
}

.big-line {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px, 6vw, 88px); line-height: 1.02; letter-spacing: -0.03em;
  margin-bottom: clamp(56px, 7vw, 96px);
}

.label {
  font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
}
.label__num { color: var(--orange); margin-right: 10px; }

.lede { font-size: 19px; line-height: 1.65; color: var(--text-2); max-width: 640px; }
.muted { color: var(--text-2); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(80px, 14vw, 200px); padding-bottom: clamp(80px, 10vw, 160px); }
.hero--page { padding-top: clamp(64px, 10vw, 150px); padding-bottom: clamp(56px, 8vw, 120px); }
.hero__facts {
  margin-top: clamp(64px, 9vw, 128px); padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 16px; line-height: 1.6; color: var(--text-2);
}
.hero__facts strong { display: block; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.hero .lede, .hero--page .lede { margin-top: 40px; }

/* ---------- Content blocks ---------- */

.item { border-top: 2px solid var(--navy); padding-top: 28px; }
.item h3 { font-weight: 700; font-size: 28px; line-height: 1.2; margin-bottom: 14px; }
.item p { color: var(--text-2); }
.item p + p { margin-top: 14px; }
.item ul { margin: 16px 0 0; padding: 0; list-style: none; color: var(--text-2); }
.item li { padding-left: 20px; position: relative; margin-top: 6px; }
.item li::before {
  content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--orange);
}

.step { font-size: 16px; line-height: 1.65; color: var(--text-2); }
.step strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--navy); margin-bottom: 8px; }

.steps-long { counter-reset: step; }
.step-long { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 48px 0; border-top: 1px solid var(--line); }
.step-long:last-child { border-bottom: 1px solid var(--line); }
.step-long__num { flex: 0 0 72px; font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--orange); }
.step-long__body { flex: 1 1 420px; min-width: 0; }
.step-long h3 { font-weight: 700; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; margin-bottom: 14px; }
.step-long p { color: var(--text-2); max-width: 680px; }

/* Dot marker used beside quotes */
.marker { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); margin-top: 18px; }

/* ---------- Quotes ---------- */

.quote { margin: 0; }
.quote blockquote {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(34px, 5vw, 72px); line-height: 1.1; letter-spacing: -0.025em; max-width: 1000px;
}
.quote blockquote b { font-weight: 700; }
.quote figcaption { margin-top: 40px; font-size: 16px; color: var(--text-2); }

.quote-sm { margin: 0; }
.quote-sm blockquote { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.3; }
.quote-sm figcaption { margin-top: 18px; font-size: 15px; color: var(--text-2); }

/* ---------- Work list ---------- */

.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.work-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 40px;
  padding: 34px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--navy);
  transition: padding-left .35s var(--ease);
}
a.work-row:hover { padding-left: 16px; color: var(--navy); }
.work-row__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: 0 0 auto; align-self: center; transition: background .35s; }
a.work-row:hover .work-row__dot { background: var(--orange); }
.work-row__sector { flex: 0 0 280px; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.work-row__title { flex: 1 1 320px; font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; }

.case { padding: 56px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 24px 48px; }
.case:last-child { border-bottom: 1px solid var(--line); }
.case__meta { flex: 0 0 280px; }
.case__body { flex: 1 1 420px; min-width: 0; }
.case h3 { font-weight: 700; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; margin-bottom: 16px; }
.case p { color: var(--text-2); }
.case p + p { margin-top: 14px; }

.text-link {
  display: inline-block; margin-top: 48px; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--orange); padding-bottom: 4px;
}

/* ---------- Contact ---------- */

.email-link {
  display: inline-block; margin-top: 40px; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 2.6vw, 34px); text-decoration: none; border-bottom: 3px solid var(--orange); padding-bottom: 6px;
  word-break: break-word;
}

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; max-width: 820px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--text-2); }
.field input, .field textarea {
  font: 400 17px var(--font-body); color: var(--navy);
  border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: transparent;
  padding: 12px 0; min-height: 48px; transition: border-color .2s;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.field--error input, .field--error textarea { border-bottom-color: #B42318; }
.field__error { font-size: 14px; color: #B42318; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.button {
  font: 600 17px var(--font-body); color: #FFFFFF; background: var(--navy);
  border: 0; border-radius: 999px; padding: 16px 34px; min-height: 52px; cursor: pointer;
  transition: background .25s;
}
.button:hover { background: #1B3A63; }
.form__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.notice { padding: 28px 32px; border-radius: 16px; background: var(--pale); max-width: 820px; margin-bottom: 48px; }
.notice h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.notice--error { background: #FEF3F2; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy); color: var(--footer-text); font-size: 14px; }
.site-footer a { color: #FFFFFF; }
.site-footer a:hover { color: var(--orange); }
.site-footer__top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 48px;
  padding-top: 72px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-footer .wordmark { color: #FFFFFF; font-size: 22px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 32px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.footer-nav a { text-decoration: none; display: inline-block; padding: 8px 0; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; padding-top: 28px; padding-bottom: 40px; }

/* ---------- Motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .9s var(--ease) both; }
.rise--late { animation-delay: .25s; }

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  a.work-row:hover { padding-left: 0; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  :root { --gutter: 48px; --side: 200px; }
}

@media (max-width: 900px) {
  :root { --gutter: 32px; }
  .split__side { flex-basis: 100%; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 0; z-index: 30;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px;
    padding: 96px var(--gutter) 48px; background: #FFFFFF;
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
  .nav__links { flex-direction: column; gap: 4px; }
  .nav__links a, .nav__contact { font-family: var(--font-display); font-weight: 700; font-size: 34px; padding: 6px 0; }
  .nav-toggle { position: relative; z-index: 40; }
}

@media (max-width: 600px) {
  :root { --gutter: 24px; }
  body { font-size: 16px; }
  .grid--2, .grid--3, .grid--4, .form { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 48px; }
  .site-header__inner { padding-top: 24px; padding-bottom: 24px; }
  .wordmark { font-size: 21px; }
  .logo__icon { width: 34px; height: 34px; }
  .work-row__sector, .case__meta { flex-basis: 100%; }
  .work-row__dot { display: none; }
}
