/* ============================================================
   Tempest M&A Advisors — site stylesheet
   Implements "Tempest Brand Guide v1.0" (August 2026).
   Token names map 1:1 to the guide's colour + type tables.
   ============================================================ */

/* --- 02 · COLOR SYSTEM -------------------------------------- */
:root {
  --charcoal:        #33302B;  /* text, headings, ring, dark sections */
  --charcoal-700:    #55524B;  /* secondary text */
  --charcoal-400:    #8A867D;  /* metadata; large text only */
  --burgundy:        #7C2138;  /* the T, primary CTA, links, eyebrows */
  --burgundy-hover:  #641A2D;
  --burgundy-active: #521626;
  --rose:            #A84B60;  /* graphic accents on dark — never text */
  --rose-300:        #D08E9E;  /* text-size links on charcoal */
  --offwhite:        #F6F4EF;  /* default page ground */
  --white:           #FFFFFF;  /* cards on off-white only */
  --border:          #DDD9CE;  /* form fields, table rules */
  --divider:         #E9E5DA;  /* hairlines, card strokes */
  --success:         #57713F;
  --error:           #B3502E;
  --on-dark-body:    #C9C4B8;  /* body copy inside charcoal sections */
  --on-dark-meta:    #A19B8F;  /* nudged from the guide's #9C968A: 4.47:1 missed AA, this is 4.76:1 */

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans:  'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-btn:  6px;
  --radius-card: 10px;
  --shadow-card: 0 1px 2px rgba(51, 48, 43, 0.05);

  --measure: 1120px;
  --gutter: 40px;
}

/* --- reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--offwhite);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }

/* --- 03 · TYPOGRAPHY ----------------------------------------- */
/* Headings are sentence case and never letterspaced.
   The ALL-CAPS eyebrow is the only letterspaced style. */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  text-wrap: pretty;
}
h1 { font-size: 56px; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 40px; line-height: 1.20; letter-spacing: -0.005em; }
h3 { font-size: 28px; line-height: 1.30; letter-spacing: 0; }
p  { margin: 0; }

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.22em;
  margin-right: -0.22em;   /* absorb the trailing tracking */
  text-transform: uppercase;
  color: var(--burgundy);
}
.eyebrow--on-dark { color: var(--rose-300); }

.lede    { font-size: 17px; line-height: 1.65; color: var(--charcoal-700); }
.small   { font-size: 14px; line-height: 1.55; color: var(--charcoal-700); }
.measure { max-width: 62ch; }
.measure-tight { max-width: 46ch; }

/* --- links --------------------------------------------------- */
a { color: var(--burgundy); text-decoration: none; font-weight: 500; }
a:hover { color: var(--burgundy-hover); text-decoration: underline; text-underline-offset: 3px; }
a:active { color: var(--burgundy-active); }
/* :not(.btn) so these never outspecify the button colourways below. */
.on-dark a:not(.btn) { color: var(--rose-300); }
.on-dark a:not(.btn):hover { color: var(--offwhite); }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: 3px;
}
.on-dark :where(a, button):focus-visible { outline-color: var(--rose-300); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--charcoal); color: var(--offwhite);
  padding: 10px 16px; border-radius: var(--radius-btn);
  font-size: 15px; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; color: var(--offwhite); text-decoration: none; }

/* --- layout -------------------------------------------------- */
.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: 88px; }
.section--tight { padding-block: 64px; }
.section--dark {
  background: var(--charcoal);
  color: var(--offwhite);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--offwhite); }
.section--dark p { color: var(--on-dark-body); }
.rule-top { border-top: 1px solid var(--divider); }

.stack   { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.stack--center { align-items: center; text-align: center; }
.grid    { display: grid; gap: 20px; }
.grid-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split   { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--lead { grid-template-columns: 1.15fr 1fr; }

/* --- 01 · LOGO SYSTEM ---------------------------------------- */
/* Clear space on all sides = half the ring's diameter.
   Below 120px available width, the wordmark drops (see .logo--icon). */
.logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 400; }
.logo:hover { text-decoration: none; }
.logo__mark { flex-shrink: 0; display: block; }
.logo__text { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo__name {
  font-family: var(--serif); font-weight: 500; font-size: 21px;
  line-height: 1.1; color: var(--charcoal);
}
/* Sized so "M&A ADVISORS" sits at ~85-95% of the wordmark's width, per the guide. */
.logo__sub {
  font-family: var(--sans); font-size: 7.5px; font-weight: 500;
  letter-spacing: 0.22em; margin-right: -0.22em;
  text-transform: uppercase;
  white-space: nowrap; color: var(--burgundy); line-height: 1;
}
.logo--on-dark .logo__name { color: var(--offwhite); }
.logo--on-dark .logo__sub  { color: var(--rose-300); }
/* Colourways. Dark ground = white ring + rose T — burgundy on charcoal is a
   documented misuse (2.4:1), so it never appears there. */
.logo__ring { stroke: var(--charcoal); }
.logo__t    { fill: var(--burgundy); }
.logo--on-dark .logo__ring { stroke: var(--offwhite); }
.logo--on-dark .logo__t    { fill: var(--rose); }

/* --- 04 · UI COMPONENTS — buttons ---------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1;
  padding: 13px 22px;
  border-radius: var(--radius-btn);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--burgundy); color: var(--offwhite); }
.btn--primary:hover  { background: var(--burgundy-hover);  color: var(--offwhite); }
.btn--primary:active { background: var(--burgundy-active); color: var(--offwhite); }
.btn--secondary { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn--secondary:hover { background: var(--charcoal); color: var(--offwhite); }
.btn--on-dark { background: transparent; color: var(--offwhite); border-color: var(--offwhite); }
.btn--on-dark:hover { background: var(--offwhite); color: var(--charcoal); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.link-arrow { font-size: 15px; font-weight: 600; color: var(--burgundy); }
.link-arrow::after { content: " \2192"; }
.on-dark .link-arrow { color: var(--rose-300); }

.btn-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* --- cards --------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 26px;
  display: flex; flex-direction: column; gap: 8px;
}
.card h3 { font-size: 21px; line-height: 1.3; }
.card p { font-size: 15px; line-height: 1.6; color: var(--charcoal-700); }
.card--dark {
  background: rgba(246, 244, 239, 0.05);
  border-color: rgba(246, 244, 239, 0.16);
  box-shadow: none;
}
.card--dark h3 { color: var(--offwhite); }
.card--dark p  { color: var(--on-dark-body); }

/* --- pull quote ---------------------------------------------- */
.quote {
  border-left: 3px solid var(--burgundy);
  padding: 4px 0 4px 22px;
  display: flex; flex-direction: column; gap: 10px;
  margin: 0;
}
.quote p {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 23px; line-height: 1.45; color: var(--charcoal);
}
.quote cite { font-family: var(--sans); font-size: 14px; font-style: normal; color: var(--charcoal-700); }
.on-dark .quote { border-left-color: var(--rose); }
.on-dark .quote p { color: var(--offwhite); }
.on-dark .quote cite { color: var(--on-dark-meta); }

.tagline {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  color: var(--charcoal-700);
}

/* --- numbered step list -------------------------------------- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { display: flex; flex-direction: column; gap: 10px; }
.step__num {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; margin-right: -0.22em;
  color: var(--burgundy); text-transform: uppercase;
}
.step h3 { font-size: 21px; line-height: 1.3; }
.step p  { font-size: 15px; line-height: 1.6; color: var(--charcoal-700); }

/* --- definition rows (ICP, FAQ) ------------------------------ */
.rows { border-top: 1px solid var(--divider); }
.row {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  padding: 22px 0; border-bottom: 1px solid var(--divider);
}
.row dt { font-weight: 600; font-size: 15px; }
.row dd { margin: 0; font-size: 15px; line-height: 1.65; color: var(--charcoal-700); }

.faq { border-top: 1px solid var(--divider); }
.faq details { border-bottom: 1px solid var(--divider); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 22px 40px 22px 0; position: relative;
  font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 24px; font-weight: 400; color: var(--burgundy); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 60px 24px 0; font-size: 16px; line-height: 1.65; color: var(--charcoal-700); }
.faq details > div p + p { margin-top: 14px; }

/* --- portrait ------------------------------------------------ */
.portrait {
  border-radius: var(--radius-card);
  border: 1px solid var(--divider);
  overflow: hidden;
  background: var(--white);
}
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 32%; }
.portrait figcaption {
  padding: 14px 18px; font-size: 14px; line-height: 1.5; color: var(--charcoal-700);
  border-top: 1px solid var(--divider);
}
.portrait figcaption strong { color: var(--charcoal); display: block; font-weight: 600; }

/* --- 04 · UI COMPONENTS — form fields ------------------------ */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 600; }
.field .hint { font-size: 12.5px; font-weight: 400; color: var(--charcoal-400); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--charcoal);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 12px 13px;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--charcoal-400); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(124, 33, 56, 0.12);
}
.field .error-msg { font-size: 12px; color: var(--error); min-height: 0; }
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: var(--error); }
.form__note { font-size: 13px; line-height: 1.55; color: var(--charcoal-400); }
.form__status {
  font-size: 15px; line-height: 1.6; padding: 14px 16px;
  border-radius: var(--radius-btn); border: 1.5px solid;
}
.form__status[data-state="success"] { color: var(--success); border-color: var(--success); background: rgba(87, 113, 63, 0.06); }
.form__status[data-state="error"]   { color: var(--error);   border-color: var(--error);   background: rgba(179, 80, 46, 0.06); }
[hidden] { display: none !important; }

/* --- nav ----------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--divider);
}
.nav__inner {
  max-width: var(--measure); margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) {
  font-size: 15px; font-weight: 500; color: var(--charcoal-700);
  text-decoration: none;
}
.nav__links a:not(.btn):hover { color: var(--charcoal); text-decoration: none; }
.nav__links a:not(.btn)[aria-current="page"] { color: var(--charcoal); font-weight: 600; }
.nav__toggle {
  display: none;
  background: none; border: 1.5px solid var(--border); border-radius: var(--radius-btn);
  padding: 9px 12px; cursor: pointer; color: var(--charcoal);
  font-family: var(--sans); font-size: 14px; font-weight: 600;
}

/* --- footer -------------------------------------------------- */
.footer { background: var(--charcoal); color: var(--offwhite); padding-block: 56px 40px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer h2 { font-size: 11px; }
.footer__col-title {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; margin-right: -0.18em;
  text-transform: uppercase; color: var(--on-dark-meta);
}
.footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer__col a { color: var(--rose-300); font-weight: 400; }
.footer__col a:hover { color: var(--offwhite); }
.footer__col span { color: var(--offwhite); }
.footer__base {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid rgba(246, 244, 239, 0.14);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 13px; color: var(--on-dark-meta); line-height: 1.6;
}
.footer__base p { color: var(--on-dark-meta); max-width: 68ch; }

/* --- hero ---------------------------------------------------- */
.hero { padding-block: 108px 96px; }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 52ch; }

/* ============================================================
   Responsive — mobile type scale from the guide's 03 table
   ============================================================ */
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  h1 { font-size: 36px; line-height: 1.2; }
  h2 { font-size: 30px; line-height: 1.25; }
  h3 { font-size: 23px; line-height: 1.35; }
  body { font-size: 16px; }
  .lede { font-size: 16px; }
  .small { font-size: 13px; }
  .eyebrow { font-size: 11px; }
  .quote p { font-size: 19px; }
  .faq summary { font-size: 19px; }

  .section { padding-block: 56px; }
  .section--tight { padding-block: 44px; }
  .hero { padding-block: 56px 52px; }

  .grid-2, .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .split, .split--lead { grid-template-columns: 1fr; gap: 32px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .faq details > div { padding-right: 20px; }

  .nav__toggle { display: block; }
  .nav__links {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--offwhite);
    border-bottom: 1px solid var(--divider);
    padding: 8px var(--gutter) 20px;
  }
  .nav__links[data-open="true"] { display: flex; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--divider); font-size: 16px; }
  .nav__links .btn { margin-top: 16px; border-bottom: none; }
  .nav__inner { position: relative; }
  .btn { width: auto; }
}

@media (max-width: 480px) {
  .btn-row { width: 100%; }
  .btn-row .btn { flex: 1 1 auto; }
}

@media print {
  .nav, .skip-link, .btn-row { display: none; }
  body { background: #fff; }
}
