/* Perspectives Chartered Accountants — "Analysis book" design system
   Paper + ink + feint blue rules + double red margin line. */

:root {
  --paper: #FBFAF7;
  --ink: #1B2A38;
  --ink-soft: #46596B;
  --brand: #2078B8;
  --brand-deep: #175E92;
  --accent: #00B0F0;
  --feint: #D8E3ED;
  --feint-soft: #EAF0F5;
  --mist: #F2F6F9;
  --red: #C0503C;
  --max: 1160px;
  --display: "Besley", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.shell { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* ---- type ---- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-deep);
  display: inline-block;
  margin-bottom: 1rem;
}

.lede { font-size: 1.2rem; color: var(--ink-soft); }

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--feint);
}
.site-header .shell {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}
.brand-link { flex-shrink: 0; }
.brand-link img { height: 2.1rem; width: auto; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.6rem; list-style: none; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--brand); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }

.header-phone {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
}
.header-phone:hover { color: var(--brand); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--feint);
  border-radius: 3px;
  padding: 0.45rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .header-phone { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--feint);
    padding: 0.75rem 1.25rem 1.25rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.4rem; }
  .site-nav a { display: block; padding: 0.55rem 0; font-size: 1.05rem; }
}

/* ---- heroes ---- */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
}

/* full-bleed image hero */
.hero-banner { position: relative; color: #fff; }
.hero-banner .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-banner .bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20, 42, 61, 0.87) 0%, rgba(20, 42, 61, 0.6) 45%, rgba(23, 94, 146, 0.35) 100%);
}
.hero-banner .shell {
  position: relative;
  z-index: 1;
  padding-top: 7.5rem;
  padding-bottom: 7.5rem;
}
.hero-banner h1 { color: #fff; max-width: 46rem; }
.hero-banner h1 .thin { color: #BFE0F5; }
.hero-banner .eyebrow { color: #9FD5F2; }
.hero-banner .lede { color: #DCE9F3; margin: 1.25rem 0 2.25rem; max-width: 34rem; }
.hero-banner .btn-ghost { border-color: #fff; color: #fff; }
.hero-banner .btn-ghost:hover { background: #fff; color: var(--ink); }
@media (max-width: 880px) {
  .hero-banner .shell { padding-top: 5rem; padding-bottom: 5rem; }
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 3rem;
  align-items: center;
}
.hero h1 .thin { font-weight: 500; font-style: italic; color: var(--brand-deep); }
.hero .lede { margin: 1.25rem 0 2rem; max-width: 34rem; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--feint);
  border-radius: 3px;
  box-shadow: 0 12px 32px rgba(27, 42, 56, 0.12);
  filter: saturate(0.92) contrast(1.03);
}
@media (max-width: 880px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border-radius: 3px;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---- ledger stats strip ---- */
.stats {
  border-top: 1px solid var(--feint);
  border-bottom: 1px solid var(--feint);
  background: var(--paper);
}
.stats .shell {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 1.4rem 1rem;
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--feint); }
.stat .num { display: block; font-size: 1.5rem; font-weight: 500; color: var(--brand-deep); }
.stat span:last-child { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
@media (max-width: 720px) {
  .stats .shell { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--feint); }
}

/* ---- sections ---- */
.section { padding: 4.5rem 0; }
.section-tint { background: var(--mist); border-top: 1px solid var(--feint); border-bottom: 1px solid var(--feint); }
.section-head { max-width: 44rem; margin-bottom: 2.5rem; }
.section-head .lede { margin-top: 0.75rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}
.split-photo img {
  border: 1px solid var(--feint);
  border-radius: 3px;
  filter: saturate(0.92) contrast(1.03);
}
.split .btn-row { margin-top: 1.75rem; }
.split p + p { margin-top: 1rem; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---- service entries (ledger folio rows) ---- */
.entries { display: grid; gap: 0; }
.entry {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  padding: 2.75rem 0;
  border-top: 1px solid var(--feint);
  align-items: center;
}
.entry:last-child { border-bottom: 1px solid var(--feint); }
.entry-no {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  color: var(--brand);
  padding-top: 0.3rem;
  align-self: start;
}
.entry-no::after { content: ""; display: block; width: 2rem; border-top: 2px solid var(--brand); margin-top: 0.5rem; opacity: 0.6; }
.entry h3, .entry h2 { margin-bottom: 0.75rem; }
.entry p + p { margin-top: 0.9rem; }
.entry-body a.more { font-weight: 600; }
.entry-photo img {
  border: 1px solid var(--feint);
  border-radius: 3px;
  filter: saturate(0.92) contrast(1.03);
}
@media (max-width: 880px) {
  .entry { grid-template-columns: 1fr; gap: 1.25rem; padding: 2.25rem 0; }
  .entry-no { padding-top: 0; }
}

/* ---- partner / badge strips ---- */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}
.logo-row img {
  height: 6.5rem;
  width: auto;
  border-radius: 6px;
}
@media (max-width: 720px) { .logo-row img { height: 4.5rem; } }

.badge-strip { border-top: 1px solid var(--feint); padding: 2.5rem 0; }
.badge-strip .eyebrow { color: var(--ink-soft); }
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}
.badge-row img {
  height: 4.75rem;
  width: auto;
  border-radius: 6px;
}
@media (max-width: 720px) {
  .badge-row { justify-content: center; gap: 1.5rem; }
  .badge-row img { height: 3.5rem; }
}

/* ---- testimonial cards ---- */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}
.quote {
  border: 1px solid var(--feint);
  border-radius: 3px;
  background: var(--paper);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.quote h3 { font-style: italic; font-weight: 500; color: var(--brand-deep); }
.quote blockquote { color: var(--ink-soft); }
.quote figcaption {
  font-family: var(--mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--feint);
}
@media (max-width: 880px) { .quote-grid { grid-template-columns: 1fr; } }

/* ---- team ---- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}
.member {
  border-top: 2px solid var(--ink);
  padding-top: 1.5rem;
}
.member .role {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-deep);
  margin: 0.25rem 0 1rem;
}
.member p + p { margin-top: 0.9rem; }
.member .member-links { margin-top: 1.25rem; }
@media (max-width: 880px) { .team-grid { grid-template-columns: 1fr; } }

/* ---- CTA band ---- */
.cta-band { position: relative; color: #fff; }
.cta-band .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.cta-band .bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20, 42, 61, 0.92) 20%, rgba(23, 94, 146, 0.72) 100%);
}
.cta-band .shell { position: relative; z-index: 1; padding-top: 4.5rem; padding-bottom: 4.5rem; }
.cta-band h2 { color: #fff; max-width: 30rem; }
.cta-band .eyebrow { color: #9FD5F2; }
.cta-band p { max-width: 34rem; margin-top: 1rem; color: #DCE9F3; }
.cta-band .btn-row { margin-top: 2rem; }
.cta-band .btn-ghost { border-color: #fff; color: #fff; }
.cta-band .btn-ghost:hover { background: #fff; color: var(--ink); }
.cta-details {
  margin-top: 2.25rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: #C6DCEC;
  display: grid;
  gap: 0.35rem;
}
.cta-details a { color: #fff; }

/* ---- contact form (ruled-line inputs) ---- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 4rem;
  align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.6rem; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.field input,
.field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--feint);
  padding: 0.5rem 0.1rem;
  border-radius: 0;
}
.field textarea {
  min-height: 8rem;
  resize: vertical;
  border: 1px solid var(--feint);
  border-radius: 3px;
  padding: 0.6rem 0.75rem;
  background: #fff;
}
.field textarea:focus { border-color: var(--brand); }
.field input:focus {
  outline: none;
  border-bottom-color: var(--brand);
  box-shadow: 0 1px 0 var(--brand);
}
.field textarea:focus { outline: none; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  min-height: 1.5rem;
}
.form-status.ok { color: #1F7A43; }
.form-status.err { color: var(--red); }

.contact-details h2 { margin-bottom: 1rem; }
.detail-list { list-style: none; display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.detail-list .k {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-deep);
  display: block;
}

/* ---- footer ---- */
.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--feint);
  padding: 2.5rem 0 3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-grid .col { display: grid; gap: 0.3rem; }
.social-row { display: flex; gap: 1rem; }
.social-row a { color: var(--ink-soft); }
.social-row a:hover { color: var(--brand); }
.social-row svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.footer-note { margin-top: 2rem; font-family: var(--mono); font-size: 0.78rem; }

/* ---- reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}
