/*
Theme Name: A Thriving Company
Theme URI: https://athrivingcompany.com
Author: A Thriving Company, LLC
Description: Custom theme for A Thriving Company — accounting and fractional CFO advisory in West Palm Beach. Rooted in clarity, built to grow.
Version: 1.2.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: a-thriving-company
*/

/* ============ Tokens ============ */
:root {
  --orange: #FF5A00;
  --orange-deep: #E04E00;
  --orange-soft: #FFF1E8;
  --orange-tint: #FFF8F3;
  --ink: #171310;
  --ink-2: #3E3730;
  --muted: #6B6259;
  --line: #EFE6DE;
  --paper: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 19, 16, .08);
  --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1140px;
}

/* ============ Reset / base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

.section { padding: 88px 0; }
.section--tint { background: var(--orange-tint); }
.section--ink { background: var(--ink); }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: #CFC7BF; }

.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-deep); color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--orange); color: #fff; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--orange);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.15rem;
  flex: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--ink);
  line-height: 1.1;
}
.brand-tag { font-size: .72rem; color: var(--muted); letter-spacing: .02em; }

.site-nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; align-items: center; }
.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink-2);
}
.site-nav a:hover { color: var(--orange); text-decoration: none; }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--orange); }
.nav-cta { white-space: nowrap; }
.nav-cta .btn { padding: 11px 22px; font-size: .9rem; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; position: absolute; left: 10px;
  width: 24px; height: 2.5px; border-radius: 2px; background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -8px; left: 0; }
.nav-toggle span::after { top: 8px; left: 0; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 18px 24px 26px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 18px; }
  .nav-cta { display: none; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 88% -10%, var(--orange-soft) 0%, transparent 60%),
    radial-gradient(600px 400px at -8% 110%, var(--orange-soft) 0%, transparent 55%),
    var(--paper);
  padding: 110px 0 96px;
}
.hero .kicker { margin-bottom: 20px; }
.hero h1 { max-width: 15ch; }
.hero h1 em {
  font-style: normal;
  color: var(--orange);
  position: relative;
  white-space: nowrap;
}
.hero .lead { margin: 22px 0 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 60px;
  align-items: center;
}
.hero-art { max-width: 480px; justify-self: end; width: 100%; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-art { justify-self: center; max-width: 400px; }
}

/* ============ Photo slots ============ */
.photo-slot svg { width: 100%; height: auto; display: block; }
.photo-slot--hero { filter: drop-shadow(0 26px 44px rgba(255, 90, 0, .16)); }
.photo-slot-img {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow);
  object-fit: cover;
}
.photo-slot--hero .photo-slot-img { aspect-ratio: 1 / 1; }
.photo-slot--about .photo-slot-img { aspect-ratio: 13 / 10; }

.hero-points {
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.hero-points li {
  border-top: 3px solid var(--orange);
  background: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
}
@media (max-width: 720px) {
  .hero { padding: 72px 0 64px; }
  .hero-points { grid-template-columns: 1fr; }
}

/* ============ Cards / grids ============ */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { margin-top: 18px; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .98rem; }
.card .card-link {
  display: inline-block; margin-top: 16px;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  color: var(--orange-deep);
}
.icon-dot {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--orange-soft);
  display: grid; place-items: center;
  font-size: 1.5rem;
  color: var(--orange-deep);
}
.icon-dot svg { width: 26px; height: 26px; display: block; transition: color .25s ease; }
.service-row .icon-dot svg { width: 32px; height: 32px; }
.card:hover .icon-dot svg,
.service-row:hover .icon-dot svg { color: #fff; }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }

/* ============ Split (about teaser) ============ */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.split-figure {
  background: linear-gradient(150deg, var(--orange) 0%, #FF8A3D 100%);
  border-radius: 22px;
  color: #fff;
  padding: 44px 40px;
  box-shadow: var(--shadow);
}
.split-figure blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.4;
}
.split-figure cite {
  display: block; margin-top: 18px;
  font-style: normal; font-size: .9rem; opacity: .85;
}
.checklist { list-style: none; margin: 26px 0 0; padding: 0; }
.checklist li {
  position: relative;
  padding: 0 0 0 36px;
  margin-bottom: 14px;
  color: var(--ink-2);
}
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--orange); color: #fff;
  font-size: .8rem; font-weight: 700;
  display: grid; place-items: center;
}

/* ============ Steps ============ */
.steps { counter-reset: step; }
.step { position: relative; padding: 30px 28px; }
.step-num {
  font-family: var(--font-display);
  font-size: 2.6rem; font-weight: 800;
  color: var(--orange);
  line-height: 1;
}
.step h3 { margin-top: 14px; }
.step p { color: var(--muted); font-size: .97rem; margin-bottom: 0; }

/* ============ CTA band ============ */
.cta-band {
  background: linear-gradient(135deg, var(--orange) 0%, #FF7A26 100%);
  border-radius: 24px;
  padding: 64px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.9); margin: 0; font-size: 1.1rem; }
@media (max-width: 720px) { .cta-band { padding: 44px 30px; } }

/* ============ Page hero (interior pages) ============ */
.page-hero {
  background:
    radial-gradient(700px 380px at 90% -20%, var(--orange-soft) 0%, transparent 60%),
    var(--orange-tint);
  border-bottom: 1px solid var(--line);
  padding: 84px 0 64px;
}
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 14px; }

/* ============ Service detail rows ============ */
.service-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-row .icon-dot { width: 64px; height: 64px; font-size: 1.8rem; }
.service-row h3 { font-size: 1.45rem; margin-bottom: 8px; }
.service-row p { color: var(--muted); max-width: 62ch; margin-bottom: 10px; }
.service-fits { font-size: .9rem; color: var(--ink); font-weight: 600; }
.service-fits span { color: var(--orange-deep); }
@media (max-width: 720px) {
  .service-row { grid-template-columns: 1fr; gap: 16px; }
}

/* ============ About ============ */
.about-body { max-width: 720px; }
.about-body p { font-size: 1.08rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 26px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr; } }
.stat {
  border-left: 4px solid var(--orange);
  padding: 6px 0 6px 20px;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 800;
  color: var(--ink);
}
.stat span { color: var(--muted); font-size: .92rem; }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info h3 { margin-top: 26px; font-size: 1.05rem; }
.contact-info h3:first-of-type { margin-top: 0; }
.contact-info a { font-weight: 600; }
.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600; font-size: .9rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  font: inherit;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #FDFBF9;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 90, 0, .15);
}
.form-notice {
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-weight: 600;
}
.form-notice--ok { background: #EDF9EE; color: #1E6B2E; border: 1px solid #BFE5C4; }
.form-notice--err { background: #FDEEEE; color: #9B2226; border: 1px solid #F3C2C2; }
.hp-field { position: absolute !important; left: -9999px !important; }

/* ============ Footer ============ */
.site-footer { background: var(--ink); color: #B9B0A7; padding: 64px 0 34px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand-name { color: #fff; }
.footer-tagline { color: var(--orange); font-family: var(--font-display); font-weight: 600; margin-top: 10px; }
.site-footer h4 {
  color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #B9B0A7; }
.site-footer a:hover { color: var(--orange); text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 26px; font-size: .85rem;
}

/* ============ Generic page content ============ */
.entry-content { max-width: 760px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul { padding-left: 1.3em; }

/* ============ Animations ============ */
.atc-animate .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .7s ease var(--reveal-delay, 0s),
    transform .8s cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.atc-animate .reveal.is-visible { opacity: 1; transform: none; }

/* Gentle drift in the hero glow */
@keyframes atc-glow {
  0%   { background-position: 0% 0%, 100% 100%; }
  50%  { background-position: 6% 3%, 94% 92%; }
  100% { background-position: 0% 0%, 100% 100%; }
}
.atc-animate .hero {
  background:
    radial-gradient(900px 480px at 88% -10%, var(--orange-soft) 0%, transparent 60%),
    radial-gradient(600px 400px at -8% 110%, var(--orange-soft) 0%, transparent 55%),
    var(--paper);
  background-size: 130% 130%, 130% 130%, auto;
  animation: atc-glow 14s ease-in-out infinite;
}

/* Micro-interactions */
.icon-dot { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .25s ease; }
.card:hover .icon-dot,
.service-row:hover .icon-dot { transform: scale(1.1) rotate(-5deg); background: var(--orange); }
.card:hover .icon-dot { filter: grayscale(0); }
.card-link { transition: letter-spacing .2s ease; }
.card:hover .card-link { letter-spacing: .03em; }
.step-num { transition: transform .25s ease; }
.step:hover .step-num { transform: translateY(-3px) scale(1.06); }

/* Section heading underline: draws in when revealed */
.section-head h2::after {
  content: "";
  display: block;
  width: 64px; height: 5px;
  border-radius: 3px;
  background: var(--orange);
  margin-top: 18px;
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform .8s cubic-bezier(.16, 1, .3, 1) .35s;
}
.section-head--center h2::after { margin-left: auto; margin-right: auto; transform-origin: center; }
.atc-animate .section-head.reveal h2::after { transform: scaleX(0); }
.atc-animate .section-head.reveal.is-visible h2::after { transform: scaleX(1); }

/* CTA band: slow gradient sweep */
.atc-animate .cta-band {
  background: linear-gradient(120deg, var(--orange), #FF8A3D, var(--orange-deep), var(--orange));
  background-size: 300% 300%;
  animation: atc-sweep 12s ease-in-out infinite;
}
@keyframes atc-sweep {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============ SVG artwork motion ============ */
.art-bar, .art-leaf, .art-mag, .art-float { transform-box: fill-box; }
.art-bar { transform-origin: 50% 100%; }
.art-leaf { transform-origin: 50% 100%; }

@keyframes atc-bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes atc-pop { 0% { transform: scale(0); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes atc-sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@keyframes atc-float { from { transform: translateY(0); } to { transform: translateY(-9px); } }
@keyframes atc-fade { from { opacity: 0; } to { opacity: 1; } }

.atc-animate .is-visible .art-bar--1 { animation: atc-bar-grow .8s cubic-bezier(.16, 1, .3, 1) .15s both; }
.atc-animate .is-visible .art-bar--2 { animation: atc-bar-grow .8s cubic-bezier(.16, 1, .3, 1) .3s both; }
.atc-animate .is-visible .art-bar--3 { animation: atc-bar-grow .8s cubic-bezier(.16, 1, .3, 1) .45s both; }
.atc-animate .is-visible .art-leaf--1 { animation: atc-pop .5s ease .8s both, atc-sway 3.5s ease-in-out 1.6s infinite alternate; }
.atc-animate .is-visible .art-leaf--2 { animation: atc-pop .5s ease .95s both, atc-sway 3.2s ease-in-out 1.8s infinite alternate; }
.atc-animate .is-visible .art-leaf--3 { animation: atc-pop .5s ease 1.1s both, atc-sway 3.8s ease-in-out 2s infinite alternate; }
.atc-animate .is-visible .art-line,
.atc-animate .is-visible .art-arrow { animation: atc-fade .9s ease 1.2s both; }
.atc-animate .art-dot--a { animation: atc-float 3.4s ease-in-out infinite alternate; }
.atc-animate .art-dot--b { animation: atc-float 2.8s ease-in-out .4s infinite alternate; }
.atc-animate .art-dot--c { animation: atc-float 4s ease-in-out .8s infinite alternate; }
.atc-animate .art-mag { animation: atc-float 3.6s ease-in-out infinite alternate; }
.atc-animate .art-float { animation: atc-float 4.5s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  .atc-animate .reveal { opacity: 1; transform: none; transition: none; }
  .atc-animate .hero { animation: none; }
  .atc-animate .cta-band { animation: none; }
  .atc-animate .is-visible .art-bar--1, .atc-animate .is-visible .art-bar--2, .atc-animate .is-visible .art-bar--3,
  .atc-animate .is-visible .art-leaf--1, .atc-animate .is-visible .art-leaf--2, .atc-animate .is-visible .art-leaf--3,
  .atc-animate .is-visible .art-line, .atc-animate .is-visible .art-arrow,
  .atc-animate .art-dot--a, .atc-animate .art-dot--b, .atc-animate .art-dot--c,
  .atc-animate .art-mag, .atc-animate .art-float { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ Utilities ============ */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}
.mt-0 { margin-top: 0; }
