/* =========================================================================
   Matrix Accountants & Auditors — Design System
   Aesthetic: high-end consultancy
   Palette seam: #8B0D1C (oxblood) -> #0690D0 (signal blue)
   Type: Century Gothic (Questrial / Twentieth Century fallbacks)
   ========================================================================= */

/* ----- Fallback web font closest to Century Gothic geometry ----- */
@import url('https://fonts.googleapis.com/css2?family=Questrial&display=swap');

:root {
  /* Brand */
  --oxblood:      #8B0D1C;
  --oxblood-deep: #5E0912;
  --blue:         #0690D0;
  --blue-deep:    #056a9b;

  /* Ink & paper */
  --ink:          #0A1522;   /* near-black navy for text */
  --ink-soft:     #223141;
  --slate:        #5A6472;   /* muted body / captions */
  --paper:        #F7F5F2;   /* warm off-white page */
  --paper-2:      #EFEBE5;   /* slightly deeper panel */
  --line:         #E2DCD3;   /* hairline on paper */
  --white:        #ffffff;

  /* Accent hairline — restrained gold, used only for rules/eyebrows */
  --gold:         #B8923D;

  /* Type families */
  --display: 'Century Gothic', 'Questrial', 'Twentieth Century', 'Futura', 'Trebuchet MS', sans-serif;
  --body:    'Century Gothic', 'Questrial', 'Twentieth Century', 'Futura', 'Segoe UI', sans-serif;

  /* Rhythm */
  --section-y: clamp(4.5rem, 9vw, 9rem);
  --gutter:    clamp(1.25rem, 5vw, 4rem);
  --maxw:      1240px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.075rem);
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Typography scale ---------- */
h1,h2,h3,h4 { font-family: var(--display); font-weight: 700; line-height: 1.04; margin: 0; letter-spacing: -.02em; }

.display {
  font-size: clamp(2.6rem, 7vw, 5.75rem);
  letter-spacing: -.035em;
  line-height: .98;
}
.h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -.03em; }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); letter-spacing: -.02em; }

p { margin: 0 0 1.1em; }
a { color: inherit; text-decoration: none; }

/* Eyebrow — wide-tracked geometric caps, the consultancy signature detail */
.eyebrow {
  font-size: .74rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--oxblood);
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 2px;
  background: linear-gradient(90deg, var(--oxblood), var(--blue));
}
.eyebrow.on-dark { color: #9fd4f2; }

.lead { font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--ink-soft); line-height: 1.5; }
.muted { color: var(--slate); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink);
  --fg: #fff;
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: 1.05rem 1.9rem;
  background: var(--bg);
  color: var(--fg);
  border: none;
  cursor: pointer;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  isolation: isolate;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, var(--oxblood), var(--blue));
  transform: translateX(-101%);
  transition: transform .55s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -18px rgba(9,20,34,.6); }
.btn:hover::after { transform: translateX(0); }
.btn .arw { transition: transform .45s var(--ease); }
.btn:hover .arw { transform: translateX(5px); }

.btn.ghost {
  --bg: transparent; --fg: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn.ghost:hover { --fg: #fff; border-color: transparent; }
.btn.on-dark.ghost { --fg: #fff; border-color: rgba(255,255,255,.4); }

/* Text link with animated underline */
.link-arrow {
  font-family: var(--display); font-weight: 700; font-size: .92rem;
  color: var(--oxblood); display: inline-flex; align-items: center; gap: .5rem;
  letter-spacing: .01em;
}
.link-arrow .arw { transition: transform .4s var(--ease); }
.link-arrow:hover .arw { transform: translateX(5px); }
.link-arrow.blue { color: var(--blue); }

/* ---------- Focus ---------- */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-delay="1"]{ transition-delay:.08s }
[data-reveal-delay="2"]{ transition-delay:.16s }
[data-reveal-delay="3"]{ transition-delay:.24s }
[data-reveal-delay="4"]{ transition-delay:.32s }

/* ---------- The seam: signature diagonal gradient divider ---------- */
.seam { position: relative; height: 0; }
.seam::before {
  content:""; position:absolute; left:0; right:0; top:-1px; height:3px;
  background: linear-gradient(90deg, var(--oxblood) 0%, var(--blue) 100%);
  transform: skewY(-1.1deg);
  transform-origin: left;
}

/* ---------- Vertical ledger rule (echoes logo divider) ---------- */
.ledger-rule { border-left: 2px solid var(--line); padding-left: clamp(1.2rem,3vw,2.4rem); }

/* utility */
.text-blue { color: var(--blue); }
.text-oxblood { color: var(--oxblood); }
.nowrap { white-space: nowrap; }
.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); border:0;
}
