/* ============================================================
   CNA & Co Chartered Certified Accountants — demo by Nezaam
   Established-chartered-firm aesthetic: warm, papery, serif
   headlines, one confident red accent.
   ============================================================ */

:root {
  --ink:      #1C2A3A;   /* deep navy — headings, footer bg */
  --body:     #3D4A5C;   /* slate — body text */
  --paper:    #FAF7F2;   /* warm ivory — page background */
  --card:     #FFFFFF;   /* cards */
  --line:     #E7E0D6;   /* hairline borders */
  --red:      #C8102E;   /* signage red — CTAs, eyebrows, accents ONLY */
  --red-dark: #A50D26;   /* hover */
  --gold:     #B98A2E;   /* stars, small highlights, use sparingly */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --shadow-card: 0 1px 2px rgb(28 42 58 / .04), 0 8px 24px rgb(28 42 58 / .06);
  --radius-card: 14px;
  --maxw: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--red); }

h1, h2, h3 { text-wrap: balance; }

a, button, input, select, textarea { touch-action: manipulation; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus-visible { top: 0; }

img, iframe { max-width: 100%; }

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1em;
}

.section { padding-block: 96px; }
.section-alt { background: #F4EFE7; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-sub { font-size: 1.1rem; color: var(--body); }

/* Placeholders stay visibly marked for the demo */
mark.placeholder {
  background: #FFF3C4;
  color: #6b5814;
  border-radius: 4px;
  padding: 0 4px;
  font-style: normal;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 12.5px 24.5px;
}
.btn-secondary:hover { border-color: var(--red); color: var(--red); transform: translateY(-1px); }
.btn-full { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(250 247 242 / .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Text recreation of the red storefront signage */
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--red);
  line-height: 1.05;
}
.logo-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--body);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links > a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links > a:not(.btn):hover { color: var(--red); }
.nav-cta { padding: 10px 20px; font-size: 0.95rem; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 60;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-block: 88px 72px; position: relative; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero-copy .lede {
  font-size: 1.15rem;
  max-width: 34em;
  margin-bottom: 2em;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Abstract panel: gradient mesh in ivory/navy tones with faint grid */
.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 40px 36px;
  background:
    linear-gradient(rgba(28,42,58,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,42,58,.05) 1px, transparent 1px),
    radial-gradient(ellipse 120% 90% at 15% 0%, rgba(28,42,58,.10), transparent 55%),
    radial-gradient(ellipse 100% 80% at 100% 100%, rgba(200,16,46,.06), transparent 60%),
    linear-gradient(160deg, #FFFDF9, #F3EDE2);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}
.panel-rating { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.panel-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.4rem;
  color: var(--ink);
  line-height: 1;
}
.panel-star { color: var(--gold); font-size: 2.2rem; margin-left: 4px; }
.panel-count { font-weight: 500; color: var(--body); }
.panel-stats { list-style: none; margin: 0; padding: 0; }
.panel-stats li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.95rem;
}
.panel-stats li::before { content: "• "; color: var(--red); }

/* ---------- Trust bar ---------- */
.trustbar { border-block: 1px solid var(--line); background: #FFFDF9; }
.trustbar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.trustbar-inner span {
  padding: 18px 12px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}
.trustbar-inner span + span { border-left: 1px solid var(--line); }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s cubic-bezier(.22,1,.36,1), border-color .25s ease;
}
.services-grid .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgb(28 42 58 / .05), 0 16px 36px rgb(28 42 58 / .10);
  border-color: #DCD2C2;
}
.card h3 { margin-bottom: 0.45em; }
.card p { font-size: 0.925rem; }

.card-icon {
  width: 24px;
  height: 24px;
  color: var(--red);
  margin-bottom: 16px;
  display: block;
}
.services-grid .card:hover .card-icon path,
.services-grid .card:hover .card-icon rect,
.services-grid .card:hover .card-icon circle {
  stroke-dasharray: 70;
  animation: icon-draw .7s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes icon-draw {
  from { stroke-dashoffset: 70; }
  to { stroke-dashoffset: 0; }
}

/* ---------- MTD band ---------- */
.mtd-band {
  background: var(--ink);
  color: #EDE7DC;
  padding-block: 96px;
}
.mtd-band h2 { color: #FAF7F2; }
.mtd-band .eyebrow { color: #FF5A6E; }
.mtd-band p { color: #C9CFD8; max-width: 42em; }
.mtd-band .btn-primary { margin-top: 10px; }

.mtd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.mtd-countdown {
  background: rgb(255 255 255 / .05);
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: var(--radius-card);
  padding: 44px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.countdown-days {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 9vw, 6.5rem);
  line-height: 1;
  color: #FAF7F2;
}
.countdown-caption {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #AEB7C2;
}

/* ---------- Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.why-col h3 { font-size: 1.3rem; }
.why-col h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--red);
  margin-top: 12px;
  border-radius: 2px;
}

/* ---------- Reviews slider ---------- */
.review-slider { max-width: 780px; margin-inline: auto; }

.slider-viewport { position: relative; }

.slide {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 40px 44px;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
  visibility: hidden;
}
.slide.is-active {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}
.slide.is-leaving {
  opacity: 0;
  transform: translateX(-28px);
}

.stars { color: var(--gold); letter-spacing: 3px; font-size: 1.15rem; display: block; margin-bottom: 14px; }
.slide p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink);
}
.slide footer { margin-top: 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.slide cite { font-style: normal; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.review-source { font-size: 0.78rem; color: #7A8492; }

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 26px;
}
.slider-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.slider-arrow svg { width: 20px; height: 20px; }
.slider-arrow:hover { border-color: var(--red); color: var(--red); transform: translateY(-1px); }

.slider-dots { display: flex; gap: 10px; }
.slider-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #D8D0C2;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.slider-dots button[aria-selected="true"] { background: var(--red); transform: scale(1.25); }

.reviews-more { margin-top: 36px; text-align: center; }

/* ---------- About ---------- */
.about { position: relative; overflow: hidden; }
.about-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16rem, 40vw, 34rem);
  color: var(--ink);
  opacity: 0.03;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.about-inner { position: relative; max-width: 760px; }
.about-body { font-size: 1.1rem; }
.about-smallprint {
  margin-top: 28px;
  font-size: 0.85rem;
  color: #8B94A1;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.contact-list { list-style: none; margin: 0 0 28px; padding: 0; }
.contact-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.contact-list strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 2px;
}
.contact-list a { color: var(--ink); font-weight: 500; text-decoration: none; }
.contact-list a:hover { color: var(--red); }

.map-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
  filter: grayscale(1) contrast(0.95);
}

.form-card { padding: 32px 28px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.field label span[aria-hidden] { color: var(--red); }
.field .optional { color: #8B94A1; font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #FFFDF9;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
  border-color: var(--red);
}
.form-note {
  margin-top: 10px;
  text-align: center;
  font-size: 0.85rem;
  color: #6E7886;
}
.form-success {
  margin-top: 16px;
  padding: 13px 16px;
  background: #EAF5EC;
  border: 1px solid #BFE0C6;
  border-radius: 8px;
  color: #1E5E2E;
  font-weight: 500;
  text-align: center;
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #C9CFD8; }
.footer a { color: #EDE7DC; }
.footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 44px;
  padding-block: 64px 40px;
}
.logo-footer .logo-name { color: #FAF7F2; }
.logo-footer .logo-sub { color: #AEB7C2; }
.footer-tag { margin-top: 16px; font-size: 0.9rem; }

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { text-decoration: none; font-size: 0.95rem; }

.footer-contact { font-style: normal; font-size: 0.95rem; line-height: 1.9; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-block: 20px;
  border-top: 1px solid rgb(255 255 255 / .12);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Nezaam preview chip (remove at go-live) ---------- */
.nezaam-chip {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  box-shadow: 0 2px 8px rgb(28 42 58 / .08);
}
.nezaam-chip:hover { color: var(--red); }

/* ---------- Hero entrance (runs on load; not scroll-gated) ---------- */
.rise { animation: rise .7s cubic-bezier(.22,1,.36,1) both; }
.r1 { animation-delay: .05s; }
.r2 { animation-delay: .15s; }
.r3 { animation-delay: .28s; }
.r4 { animation-delay: .4s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Scroll reveal ---------- */
/* hidden only when JS is running (html.js set inline in <head>), so a
   failed script never leaves the page blank */
html.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1);
}
html.js .reveal.visible { opacity: 1; transform: none; }

/* stagger children inside a revealed grid */
.stagger .reveal:nth-child(2) { transition-delay: .07s; }
.stagger .reveal:nth-child(3) { transition-delay: .14s; }
.stagger .reveal:nth-child(4) { transition-delay: .21s; }
.stagger .reveal:nth-child(5) { transition-delay: .07s; }
.stagger .reveal:nth-child(6) { transition-delay: .14s; }
.stagger .reveal:nth-child(7) { transition-delay: .21s; }
.stagger .reveal:nth-child(8) { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .rise { animation: none; }
  .btn, .card, .slider-arrow { transition: none; }
  .slide { transition: opacity .01s linear; transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 960px) {
  .hero-grid, .mtd-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid, .reviews-grid { grid-template-columns: 1fr; gap: 28px; }
  .trustbar-inner { grid-template-columns: repeat(2, 1fr); }
  .trustbar-inner span:nth-child(3) { border-left: 0; }
  .trustbar-inner span:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .section { padding-block: 64px; }
  .mtd-band { padding-block: 64px; }
  .hero { padding-block: 56px 48px; }

  /* Mobile menu: full-screen ivory overlay.
     backdrop-filter would trap the fixed overlay inside the nav's
     containing block, so the nav goes solid on mobile instead. */
  .nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--paper);
  }
  .nav-burger { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    font-size: 1.3rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 55;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links > a:not(.btn) { font-size: 1.35rem; font-family: var(--font-display); }
  .nav-burger { position: relative; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 520px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .slide { padding: 28px 24px; }
  .slide p { font-size: 1.02rem; }
}
