/* Comptrust Accounting: styles for inner pages and the calculator. Loaded after style.css. */

/* ---------------------------------------------------------------- Brand */
.logo__text { display: grid; line-height: 1; }
.logo__text strong { color: var(--accent); font-weight: 800; }
.logo__text small { font-size: 0.62rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--text); margin-top: 4px; font-weight: 600; }
.logo--light .logo__text small { color: #9fb2cf; }

.btn--portal { display: inline-flex; align-items: center; gap: 8px; }
.btn--portal svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ---------------------------------------------------------------- Inner page hero */
.page-head { position: relative; overflow: hidden; background: var(--navy-deep); padding: 84px 0 92px; color: #c9d5e8; }
.page-head::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1.5px, transparent 2px); background-size: 26px 26px;
}
.page-head::after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
  border: 2px dashed rgba(225, 36, 90, 0.35); animation: spin 50s linear infinite;
}
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { color: var(--white); max-width: 760px; }
.page-head .lead { max-width: 640px; font-size: 1.12rem; margin: 0; }
.crumbs { display: flex; gap: 10px; list-style: none; margin: 0 0 22px; padding: 0; font-size: 0.85rem; }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: 0.5; }
.crumbs a { color: #9fb2cf; }
.crumbs a:hover { color: var(--white); }
.page-head .eyebrow { color: #ff7ea1; }

/* ---------------------------------------------------------------- Generic layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--top { align-items: start; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; transition: box-shadow 0.3s, transform 0.3s var(--ease); }
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card--navy { background: var(--navy); border-color: var(--navy); color: #c9d5e8; }
.card--navy h3 { color: var(--white); }
.tick-list { list-style: none; margin: 0 0 1.4em; padding: 0; }
.tick-list li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.tick-list li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }
.muted { color: var(--text); font-size: 0.9rem; }
.notice { background: #fff3cd; border-left: 4px solid #e0b43a; border-radius: 8px; padding: 16px 18px; color: #4a3800; }
.notice--info { background: #e8f4fa; border-color: var(--teal); color: #10425a; }

a.service { display: block; color: var(--text); }
a.service:hover { color: var(--white); }

/* ---------------------------------------------------------------- Services page */
.service-block { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; padding: 56px 0; border-bottom: 1px solid var(--line); }
.service-block:last-child { border-bottom: 0; }
.service-block__docs { background: var(--tint); border-radius: var(--radius); padding: 26px 28px; }
.service-block__docs h4 { margin: 0 0 10px; color: var(--navy); font-size: 1rem; }
.service-block .btn { margin-top: 8px; }
.service-block .link-more { margin-left: 14px; }
.service-block__docs .muted { margin: 12px 0 0; font-size: 0.92rem; }
.service-jump { margin-top: 18px; font-size: 0.95rem; }
.service-jump a { font-weight: 600; }
.service-group { margin: 72px auto 0; scroll-margin-top: 110px; }
.service-group + .service-block { padding-top: 24px; }
.service-block { scroll-margin-top: 110px; }

/* ---------------------------------------------------------------- How it works flow */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: flow; }
.flow li { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px 26px; }
.flow li::before {
  counter-increment: flow; content: counter(flow);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--white); font-weight: 800; margin-bottom: 16px;
}
.flow li:not(:last-child)::after { content: "\2192"; position: absolute; right: -18px; top: 40px; color: var(--accent); font-weight: 800; font-size: 1.2rem; }
.flow h3 { font-size: 1.08rem; }
.flow p { margin: 0; font-size: 0.95rem; }
.flow .who { display: inline-block; margin-top: 12px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: #e8f4fa; color: #10425a; }
.flow .who--person { background: #fde7ee; color: var(--accent-dark); }

/* Hours comparison */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare__col { border-radius: var(--radius); padding: 30px; }
.compare__col--before { background: var(--tint); }
.compare__col--after { background: var(--navy); color: #c9d5e8; }
.compare__col--after h3 { color: var(--white); }
.bar { height: 12px; border-radius: 999px; background: rgba(31, 58, 104, 0.12); overflow: hidden; margin: 6px 0 14px; }
.compare__col--after .bar { background: rgba(255, 255, 255, 0.15); }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; animation: grow 1.4s var(--ease) both; }
.bar--teal span { background: var(--teal); }
.bar--gold span { background: var(--gold); }
@keyframes grow { from { transform: scaleX(0); } }
.w-5 span { width: 5%; } .w-10 span { width: 10%; } .w-15 span { width: 15%; }
.w-30 span { width: 30%; } .w-55 span { width: 55%; }

/* FAQ */
.faq { max-width: 840px; margin: 0 auto; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 700; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent); transition: transform 0.3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 24px 22px; }

/* ---------------------------------------------------------------- Team */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.person { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px; text-align: center; transition: box-shadow 0.3s, transform 0.3s var(--ease); }
.person:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.person__avatar { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%; font-size: 1.6rem; font-weight: 800; color: var(--white); background: var(--navy); box-shadow: 0 0 0 6px var(--tint); }
.person:nth-child(2) .person__avatar { background: var(--accent); }
.person:nth-child(3) .person__avatar { background: #1d7a96; }
.person:nth-child(4) .person__avatar { background: #7a5af5; }
.person h3 { margin-bottom: 4px; }
.person p { margin: 0; font-size: 0.92rem; }
.person__role { color: var(--accent); font-weight: 600; margin-bottom: 10px !important; }

/* ---------------------------------------------------------------- Articles */
.article { max-width: 780px; margin: 0 auto; }
.article h2 { font-size: 1.6rem; margin-top: 1.6em; }
.article .checklist { margin-bottom: 1.4em; }
.article__meta { color: #9fb2cf; font-size: 0.9rem; margin-top: 16px; }
.post--wide { display: grid; grid-template-columns: 1fr 1.3fr; }
.post--wide .post__media img { height: 100%; aspect-ratio: auto; }

/* ---------------------------------------------------------------- Contact */
.contact-cards { display: grid; gap: 16px; }
.contact-card { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.contact-card .icon-badge { width: 50px; height: 50px; margin: 0; flex: none; }
.contact-card .icon-badge svg { width: 24px; height: 24px; }
.contact-card h3 { font-size: 1rem; margin-bottom: 4px; }
.contact-card p { margin: 0; }
.map-placeholder { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

/* ---------------------------------------------------------------- Calculator (for firms) */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--white); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.calc__inputs { padding: 36px; }
.calc__inputs label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 22px; }
.calc__inputs output { float: right; color: var(--accent); font-weight: 800; }
.calc__inputs input[type="range"] { width: 100%; margin-top: 10px; accent-color: var(--accent); }
.calc__results { background: var(--navy-deep); color: #c9d5e8; padding: 36px; display: grid; gap: 18px; align-content: start; }
.calc__result strong { display: block; font-size: 2.4rem; line-height: 1.1; color: var(--white); font-family: var(--font-head); }
.calc__result--accent strong { color: #ff7ea1; }
.calc__note { font-size: 0.82rem; color: #8ea1bf; margin: 0; }

/* Architecture diagram */
.arch { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: stretch; }
.arch__box { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 16px; text-align: center; font-size: 0.9rem; }
.arch__box strong { display: block; color: var(--navy); margin-bottom: 6px; }
.arch__box:not(:last-child)::after { content: "\2192"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 800; }
.arch__box--accent { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(225, 36, 90, 0.08); }

/* Builders (names) */
.builders { margin-top: 28px; }
.builders__title { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.builders__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.builders__list li { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 20px 8px 8px; box-shadow: 0 6px 16px rgba(20, 40, 70, 0.06); }
.builders__initials { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 800; font-size: 0.9rem; }
.builders__initials--alt { background: var(--accent); }
.builders__name { font-weight: 700; color: var(--ink); }

/* SmartIntake promo band on the home page */
.portal-band { background: linear-gradient(120deg, var(--navy-deep), var(--navy)); color: #c9d5e8; border-radius: 22px; padding: 56px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; overflow: hidden; }
.portal-band::after { content: ""; position: absolute; width: 300px; height: 300px; right: -80px; bottom: -120px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.15); animation: spin 40s linear infinite; }
.portal-band h2 { color: var(--white); }
.portal-band .tick-list li::before { color: #ff7ea1; }
.portal-band__actions { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; position: relative; z-index: 1; }
.mini-stats div { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 20px; }
.mini-stats strong { display: block; font-size: 1.9rem; color: var(--white); font-family: var(--font-head); }
.mini-stats span { font-size: 0.85rem; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
  .cards--4, .team { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li::after { display: none; }
  .entities { grid-template-columns: repeat(3, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .arch { grid-template-columns: 1fr; }
  .arch__box:not(:last-child)::after { content: "\2193"; right: 50%; top: auto; bottom: -15px; transform: translateX(50%); }
}

@media (max-width: 860px) {
  .split, .service-block, .compare, .calc, .portal-band, .post--wide { grid-template-columns: 1fr; gap: 32px; }
  .cards, .cards--2 { grid-template-columns: 1fr; }
  .portal-band { padding: 36px 24px; }
  .review__fields { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .team, .cards--4, .flow, .mini-stats { grid-template-columns: 1fr; }
  .entities { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .calc__inputs, .calc__results { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .bar span { animation: none !important; }
}

/* Elements that slide in from the side must never widen the page on small screens.
   overflow-x: clip (unlike hidden) keeps the sticky header working. */
main { overflow-x: clip; }
@media (max-width: 860px) {
  .anim-ready[data-anim="fade-left"] { transform: translateX(24px); }
  .anim-ready[data-anim="fade-right"] { transform: translateX(-24px); }
}

/* Photos: a soft skeleton shimmer shows until each image has loaded (main.js adds .is-loaded) */
.photo { background: linear-gradient(100deg, #e9eef5 30%, #f6f8fb 50%, #e9eef5 70%) 0 0 / 300% 100%; animation: skeleton 1.4s linear infinite; }
.photo.is-loaded { animation: none; background: none; }
@keyframes skeleton { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .photo { animation: none; } }
.about__media .photo { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; }
.photo-frame { margin: 0 0 22px; }
.photo-frame .photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.photo-band { margin: 0 0 56px; }
.photo-band .photo { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; object-position: center 40%; border-radius: calc(var(--radius) + 6px); }
.article__hero { margin: 0 0 32px; }
.article__hero .photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.photo-credits { columns: 2 260px; padding: 0; list-style: none; font-size: 0.92rem; }
.photo-credits li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 700px) { .photo-band .photo { aspect-ratio: 4 / 3; } }

/* Team credits with roles (For accounting firms page) */
.builders__list li { border-radius: 22px; }
.builders__text { display: grid; gap: 2px; }
.builders__role { font-size: 0.82rem; color: var(--text); line-height: 1.35; }
.builders__detail { margin-top: 14px; font-size: 0.95rem; }

/* Essential Eight status table (Security page) */
.table-wrap { overflow-x: auto; margin: 8px 0 32px; }
.status-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.status-table caption { text-align: left; font-weight: 700; color: var(--navy); padding: 0 0 10px; }
.status-table th, .status-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-top: 1px solid var(--line); }
.status-table thead th { border-top: 0; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); }
.status-table tbody th { color: var(--ink); width: 30%; }
.status { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.status--done { background: #e3f4ea; color: #1b6b3a; }
.status--part { background: #fdf1d8; color: #7a5300; }
.status--plan { background: var(--tint); color: var(--navy); }
.standards-next h3 { margin-top: 0; }
