/* ==========================================================================
   PS Partnerships — Chartered Accountants
   ========================================================================== */

:root {
  --ink: #191c1a;
  --ink-soft: #33362f;
  --paper: #f4efe4;
  --paper-dim: #eae3d3;
  --paper-panel: #fbf8f1;
  --brass: #a9813d;
  --brass-bright: #c99a4a;
  --rust: #9a4630;
  --rust-dark: #7c3623;
  --line: rgba(25, 28, 26, 0.12);
  --line-soft: rgba(244, 239, 228, 0.16);

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;

  --max: 1180px;
  --edge: clamp(1.5rem, 5vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--rust);
  display: inline-block;
}

.eyebrow.on-dark {
  color: var(--brass-bright);
}
.eyebrow.on-dark::before {
  background: var(--brass-bright);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.9em 1.6em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--rust);
  color: var(--paper-panel);
}
.btn-primary:hover {
  background: var(--rust-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-ghost.on-dark {
  border-color: var(--line-soft);
  color: var(--paper);
}
.btn-ghost.on-dark:hover {
  border-color: var(--paper);
}

.btn-arrow {
  transition: transform 0.25s ease;
}
.btn:hover .btn-arrow {
  transform: translateX(4px);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
}

.brand-text span {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2.1rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--rust);
  transition: right 0.25s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  right: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  display: block;
}

/* ---------- Ledger backdrop pattern ---------- */

.ledger-field {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent 47px, rgba(25, 28, 26, 0.06) 48px),
    repeating-linear-gradient(to right, transparent 0, transparent 119px, rgba(25, 28, 26, 0.05) 120px);
  pointer-events: none;
}

.ledger-field.on-dark {
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent 47px, rgba(244, 239, 228, 0.06) 48px),
    repeating-linear-gradient(to right, transparent 0, transparent 119px, rgba(244, 239, 228, 0.05) 120px);
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  max-width: 12ch;
}

.hero-copy .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.6rem;
}

.hero-figures {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.hero-figures .figure b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--rust);
}

.hero-figures .figure span {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Decorative ledger panel */
.hero-panel {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--ink);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 14px 14px 0 rgba(154, 70, 48, 0.18);
}

.hero-panel .ledger-field {
  opacity: 0.9;
}

.hero-panel .monogram {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-panel .monogram svg {
  width: 74%;
  height: auto;
}

.hero-panel .tag {
  position: absolute;
  left: 1.6rem;
  bottom: 1.6rem;
  right: 1.6rem;
  color: var(--paper);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line-soft);
  padding-top: 1rem;
}

/* ---------- Sections generic ---------- */

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-dark {
  background: var(--ink);
  color: var(--paper);
}

.section-panel {
  background: var(--paper-panel);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin-top: 0.4em;
}

.section-dark .section-head h2,
.section-dark h3 {
  color: var(--paper);
}

/* ---------- Services (zig-zag numbered list) ---------- */

.service-list {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 90px 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line);
}

.service-row .num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brass);
}

.service-row h3 {
  font-size: 1.5rem;
  margin-bottom: 0.35em;
}

.service-row p {
  color: var(--ink-soft);
  margin: 0;
}

.service-row:nth-child(even) {
  grid-template-columns: 90px 1fr 1.3fr;
}
.service-row:nth-child(even) h3,
.service-row:nth-child(even) .desc {
  order: 3;
}

/* ---------- Stat strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 2.6rem 0;
}

.stat-strip .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.3rem;
  color: var(--brass-bright);
}

.stat-strip .stat span {
  font-size: 0.85rem;
  color: rgba(244, 239, 228, 0.7);
}

/* ---------- Cards (asymmetric) ---------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.6rem;
}

.value-card {
  grid-column: span 4;
  background: var(--paper-panel);
  border: 1px solid var(--line);
  padding: 2rem;
  position: relative;
}

.value-card:first-child {
  grid-column: span 5;
  background: var(--ink);
  color: var(--paper);
}
.value-card:first-child h3 {
  color: var(--paper);
}
.value-card:first-child p {
  color: rgba(244, 239, 228, 0.75);
}

.value-card:nth-child(2) {
  grid-column: span 7;
}

.value-card:nth-child(3) {
  grid-column: span 7;
}
.value-card:nth-child(4) {
  grid-column: span 5;
}

.value-card .idx {
  font-family: var(--font-display);
  color: var(--brass);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.8rem;
}

/* ---------- Testimonial ---------- */

.testimonial {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.testimonial blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  font-weight: 500;
  max-width: 34ch;
  margin: 0 0 1.4rem;
  line-height: 1.3;
}

.testimonial cite {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.testimonial cite b {
  color: var(--ink);
  display: block;
  font-size: 1rem;
}

/* ---------- CTA banner ---------- */

.cta-banner {
  background: var(--rust);
  color: var(--paper-panel);
  padding: clamp(3rem, 6vw, 4rem) 0;
}

.cta-banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-banner h2 {
  color: var(--paper-panel);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  max-width: 20ch;
  margin: 0;
}

.cta-banner .btn-primary {
  background: var(--ink);
}
.cta-banner .btn-primary:hover {
  background: #050604;
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--paper-panel);
  border: 1px solid var(--line);
  padding: 1.7rem 1.5rem 1.9rem;
}

.team-card .avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--paper);
}

.team-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.15em;
}

.team-card .role {
  color: var(--rust);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.7em;
  display: block;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Timeline (About) ---------- */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.timeline-item {
  border-top: 3px solid var(--brass);
  padding-top: 1.1rem;
}

.timeline-item b {
  font-family: var(--font-display);
  font-size: 1.6rem;
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.section-dark .timeline-item b {
  color: var(--paper);
}

.timeline-item p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}
.section-dark .timeline-item p {
  color: rgba(244, 239, 228, 0.72);
}

/* ---------- Credentials strip ---------- */

.cred-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.cred-pill {
  border: 1px solid var(--line);
  padding: 0.6em 1.1em;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.contact-info h2 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
}

.info-block {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.info-block:last-child {
  border-bottom: 1px solid var(--line);
}

.info-block .label {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 700;
  margin-bottom: 0.5em;
  display: block;
}

.info-block a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.info-block a:hover {
  border-color: var(--ink);
}

.contact-form {
  background: var(--paper-panel);
  border: 1px solid var(--line);
  padding: clamp(1.8rem, 4vw, 2.6rem);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.field {
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.45em;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0.85em 0.9em;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
  transition: border-color 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--rust);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.8rem;
}

.form-success {
  display: none;
  background: var(--paper);
  border: 1px solid var(--brass);
  padding: 1.3rem;
  font-size: 0.95rem;
}
.form-success.is-visible {
  display: block;
}
.contact-form.is-submitted form {
  display: none;
}

.map-note {
  margin-top: 2.2rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}

.hours-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1.5rem;
  font-size: 0.92rem;
}
.hours-grid dt {
  color: var(--ink-soft);
}
.hours-grid dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

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

.site-footer {
  background: var(--ink);
  color: rgba(244, 239, 228, 0.82);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 2rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line-soft);
}

.footer-brand .brand-text strong,
.footer-brand .brand {
  color: var(--paper);
}
.footer-brand p {
  max-width: 32ch;
  font-size: 0.9rem;
  color: rgba(244, 239, 228, 0.65);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.footer-col a {
  text-decoration: none;
  color: inherit;
}
.footer-col a:hover {
  color: var(--paper);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.78rem;
  color: rgba(244, 239, 228, 0.5);
}

/* ---------- Reveal-on-scroll ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Page hero (About / Contact) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(2.6rem, 6vw, 3.6rem);
}

.page-hero .wrap {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  color: var(--paper);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 18ch;
}

.page-hero .lede {
  color: rgba(244, 239, 228, 0.75);
  max-width: 52ch;
  font-size: 1.08rem;
  margin: 0;
}

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

@media (max-width: 900px) {
  .hero .wrap,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-panel {
    max-width: 380px;
  }
  .service-row,
  .service-row:nth-child(even) {
    grid-template-columns: 60px 1fr;
  }
  .service-row .desc {
    grid-column: span 2;
  }
  .value-grid,
  .team-grid,
  .timeline,
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .value-card,
  .value-card:first-child,
  .value-card:nth-child(2),
  .value-card:nth-child(3),
  .value-card:nth-child(4) {
    grid-column: span 2;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .site-nav ul {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav.is-open ul {
    max-height: 320px;
  }
  .site-nav ul li {
    border-top: 1px solid var(--line);
  }
  .site-nav a {
    display: block;
    padding: 1rem var(--edge);
  }
  .site-nav .btn {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .team-grid,
  .value-grid,
  .timeline,
  .stat-strip {
    grid-template-columns: 1fr;
  }
  .value-card,
  .value-card:first-child,
  .value-card:nth-child(2),
  .value-card:nth-child(3),
  .value-card:nth-child(4) {
    grid-column: span 1;
  }
  .cta-banner .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
