/* ===========================================================
   KAT Advisory Group — Design System
   Brand: Papaya Orange #F25912 · Monsoon #898989 · Gainsboro #DCDCDC
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root{
  /* --- Brand colors --- */
  --papaya: #F25912;
  --papaya-dark: #C7470C;
  --papaya-light: #FDE8DC;
  --monsoon: #898989;
  --gainsboro: #DCDCDC;

  /* --- Neutrals built to pair with brand colors --- */
  --ink: #333333;           /* primary text / dark backgrounds — deep dark gray, not pure black */
  --ink-soft: #3D3D3D;
  --text-secondary: #5F5A55; /* accessible secondary text (warm gray, AA-compliant) */
  --cream: #EFEFEF;          /* page background */
  --white: #FFFFFF;
  --border: #E2E2E2;

  /* --- Type --- */
  --font-head: 'Plus Jakarta Sans', 'Trebuchet MS', Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Trebuchet MS', Arial, sans-serif;

  /* --- Spacing / layout --- */
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(3.5rem, 8vw, 7rem);
  --radius: 14px;
  --radius-sm: 8px;

  /* --- Motion --- */
  --ease: cubic-bezier(.22,1,.36,1);
  --fast: 180ms;
  --med: 420ms;
}

/* ===== Reset ===== */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg{ display: block; max-width: 100%; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4{
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
p{ margin: 0 0 1em; color: var(--text-secondary); }
button{ font-family: inherit; }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link */
.skip-link{
  position: absolute; left: -999px; top: auto;
  background: var(--ink); color: var(--white);
  padding: .75rem 1.25rem; z-index: 999; border-radius: var(--radius-sm);
}
.skip-link:focus{ left: 1rem; top: 1rem; }

:focus-visible{ outline: 3px solid var(--papaya); outline-offset: 3px; }

/* ===== Layout helpers ===== */
.container{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section{ padding-block: var(--section-pad); }
.section--tight{ padding-block: calc(var(--section-pad) * .6); }
.section--dark{ background: var(--ink); color: var(--white); }
.section--dark p{ color: #C9C3BC; }
.section--cream{ background: var(--cream); }
.section--about{ padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.eyebrow{
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--papaya);
  margin-bottom: 1rem;
}
.eyebrow::before{
  content: "";
  width: 22px; height: 2px;
  background: var(--papaya);
  display: inline-block;
}

.section-head{
  max-width: 660px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head.center{ max-width: 920px; }
.section-head.center{ margin-inline: auto; text-align: center; }
.section-head h2{ font-weight: 800; }
.section-head .lede{ font-weight: 700; color: var(--ink-soft); }

h1{ font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2{ font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3{ font-size: 1.25rem; }

.lede{ font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-secondary); }
.accent{ color: var(--papaya); }

/* ===== Buttons ===== */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
  padding: .9rem 1.6rem;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
  white-space: nowrap;
}
.btn-primary{
  background: var(--papaya);
  color: var(--white);
  box-shadow: 0 8px 20px -8px rgba(242,89,18,.55);
}
.btn-primary:hover{ background: var(--papaya-dark); transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(242,89,18,.6); }
.btn-ghost{
  background: transparent;
  border-color: currentColor;
  color: var(--ink);
}
.btn-ghost:hover{ background: var(--ink); color: var(--white); }
.section--dark .btn-ghost{ color: var(--white); }
.section--dark .btn-ghost:hover{ background: var(--white); color: var(--ink); }
.btn-arrow{ transition: transform var(--fast) var(--ease); }
.btn:hover .btn-arrow{ transform: translateX(3px); }

/* ===== Header ===== */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(239,239,239,.92);
  backdrop-filter: saturate(180%) blur(10px);
}
.site-header .container{
  display: flex; align-items: center; justify-content: space-between;
  padding-block: .9rem;
}
.brand{ display: inline-flex; align-items: center; color: var(--ink); }
.brand-logo{ width: 108px; height: auto; display: block; }

.header-right{ display: flex; align-items: center; gap: 2rem; }

.nav-desktop{ display: none; }
.nav-desktop ul{ display: flex; align-items: center; gap: 2.2rem; }
.nav-desktop a{
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .93rem;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
}
.nav-desktop a::after{
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--papaya);
  transition: width var(--fast) var(--ease);
}
.nav-desktop a:hover::after{ width: 100%; }
.header-cta{ display: none; }

.nav-toggle{
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
}
.nav-toggle svg{ width: 20px; height: 20px; }

.mobile-nav{
  position: fixed; inset: 0; top: 0;
  background: var(--cream);
  z-index: 99;
  padding: 6rem 1.5rem 2rem;
  transform: translateY(-100%);
  transition: transform var(--med) var(--ease);
}
.mobile-nav.is-open{ transform: translateY(0); }
.mobile-nav ul{ display: flex; flex-direction: column; gap: 1.5rem; }
.mobile-nav a{ font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; }
.mobile-nav .btn{ margin-top: 2rem; width: 100%; }

@media (min-width: 900px){
  .nav-desktop{ display: block; }
  .header-cta{ display: inline-flex; }
  .nav-toggle{ display: none; }
  .brand-logo{ width: 128px; }
}

/* ===== Hero ===== */
.hero{
  padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(2.5rem, 6vw, 4rem);
}
.hero-card{
  position: relative;
  overflow: hidden;
  border-radius: clamp(16px, 2.4vw, 28px);
  min-height: clamp(420px, 62vw, 640px);
  display: flex;
  align-items: center;
  isolation: isolate;
}
.hero-photo{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 32% 30%;
  z-index: 0;
}
.hero-scrim{
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(18,16,15,.88) 0%, rgba(18,16,15,.78) 34%, rgba(18,16,15,.5) 58%, rgba(18,16,15,.22) 80%, rgba(18,16,15,.12) 100%);
}
.hero-copy{
  position: relative; z-index: 2;
  max-width: 1000px;
  padding: clamp(1.75rem, 5vw, 3.5rem);
}
.hero-copy h1{
  color: var(--white);
  margin-bottom: .7em;
  font-size: clamp(1.4rem, 2.5vw, 2.15rem);
  white-space: normal;
}
.hero-copy h1 br{ display: block; content: ""; margin-top: .15em; }
.hero-copy h1 .accent{ color: var(--papaya); }
.hero-copy p{ color: rgba(255,255,255,.92); font-size: clamp(1rem, 1.5vw, 1.1rem); }
.hero-copy .accent-strong{ color: var(--papaya); font-weight: 700; }
.hero-copy .btn{ margin-top: 1.25rem; }

/* ===== Problem / Solution flip cards ===== */
/* Explicit column counts (not auto-fit) so 4 cards always split into even
   rows — 1 / 2 always divide evenly, so no lone card ever stretches
   full-width on its own row. Capped at 2 columns (2x2 on desktop) rather
   than 4-across so each card stays wide enough for its copy to sit
   comfortably inside the white box. */
.card-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 640px){
  .card-grid{ grid-template-columns: repeat(2, 1fr); }
}

.flip-card{
  position: relative;
  perspective: 1400px;
}
.flip-card-inner{
  position: relative;
  width: 100%;
  display: grid;
  text-align: left;
  transform-style: preserve-3d;
  transition: transform var(--med) var(--ease);
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
}
.flip-card.is-flipped .flip-card-inner{ transform: rotateY(180deg); }

@media (hover:hover) and (pointer:fine){
  .flip-card:hover .flip-card-inner{ transform: rotateY(180deg); }
  .flip-card:hover .flip-cue{ opacity: .85; transform: rotate(35deg); }
}

.card-face{
  /* Both faces share the same grid cell (instead of position:absolute)
     so the card's height grows to fit whichever face has more copy —
     text can no longer spill out past the white/dark rounded box. */
  position: relative;
  grid-area: 1 / 1 / 2 / 2;
  min-height: 420px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 2rem;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(31,27,24,.04);
  transition: box-shadow var(--fast) var(--ease);
}
.flip-card:hover .card-face{ box-shadow: 0 18px 34px -18px rgba(31,27,24,.22); }
.card-front{
  background: var(--white);
}
.card-back{
  background: var(--ink);
  color: var(--white);
  transform: rotateY(180deg);
  justify-content: center;
}

/* Subtle flip affordance: a small quiet corner icon, not a prominent pill */
.flip-cue{
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--papaya);
  background: var(--papaya-light);
  opacity: .55;
  transition: opacity var(--fast) var(--ease), transform var(--med) var(--ease);
}
.flip-cue svg{ width: 13px; height: 13px; }
.card-back .flip-cue{ color: var(--white); background: rgba(255,255,255,.14); }
.flip-card-inner:focus-visible .flip-cue{ opacity: .9; }

.card-icon{
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--papaya);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
}
.card-icon svg{ width: 24px; height: 24px; }

.card-front h3{ margin-bottom: .55rem; font-size: 1.3rem; }
.card-rule{
  display: block;
  width: 46px; height: 3px;
  background: var(--papaya);
  border-radius: 2px;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}
.card-intro{ font-weight: 800; color: var(--ink); font-size: .98rem; margin-bottom: .9rem; }
.card-list{ display: grid; gap: .55rem; }
.card-list li{
  position: relative;
  padding-left: 1.1rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.45;
}
.card-list li::before{
  content: ""; position: absolute; left: 0; top: .5em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--papaya);
}

.card-back-eyebrow{
  font-family: var(--font-head); font-size: .78rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--papaya); margin-bottom: 1.1rem; display: block;
}
.card-back-copy{ color: var(--white); font-weight: 600; font-size: 1.05rem; line-height: 1.55; margin: 0; }
.card-back-copy .accent-strong{ color: var(--papaya); font-weight: 700; }

/* ===== About ===== */
.about-grid{
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}
.about-photo{
  width: 100%; height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}
.about-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: flex; flex-direction: column; justify-content: center;
}
.about-card h2{ margin-bottom: .6rem; }

@media (min-width: 940px){
  .about-grid{ grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ===== CTA band ===== */
.cta-band{
  background: var(--papaya);
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(2.25rem, 6vw, 3.5rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.75rem;
}
.cta-band h2{ margin: 0 0 .25rem; }
.cta-band p{ color: rgba(255,255,255,.9); margin: 0; }
.cta-band .btn-ghost{ border-color: var(--white); color: var(--white); }
.cta-band .btn-ghost:hover{ background: var(--white); color: var(--papaya); }

/* ===== Footer ===== */
.site-footer{
  background: var(--ink);
  color: #CFC9C2;
  padding-top: 3.5rem;
}
.footer-top{
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
  text-align: left;
  margin-bottom: 3.5rem;
}
.footer-logo{ width: 190px; height: auto; display: block; }
.footer-brand h5,
.footer-col h5{
  font-family: var(--font-head); color: var(--white); font-size: 1.05rem; font-weight: 700;
  margin-bottom: .75rem;
}
.footer-brand h5{ margin-top: 1.75rem; }
.footer-email{
  font-family: var(--font-body); font-weight: 600; font-size: .93rem;
  color: var(--white); display: inline-block;
}
.footer-email:hover{ color: var(--papaya); }
.footer-links{ display: flex; align-items: center; gap: .9rem; margin-top: 1rem; }
.footer-social{
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.35);
  color: var(--white);
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.footer-social:hover{ border-color: var(--papaya); background: var(--papaya); color: var(--white); }
.footer-social svg{ width: 18px; height: 18px; }
.footer-col p{ color: #B9B3AC; font-size: .93rem; max-width: 440px; margin: 0 0 1.5rem; }
.footer-bottom{
  background: var(--gainsboro);
  padding-block: 1.1rem;
}
.footer-bottom .container{ font-size: .85rem; color: var(--ink); }
@media (min-width: 940px){
  .footer-top{ grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ===== Contact page ===== */
.contact-grid{
  display: grid; gap: 3rem; grid-template-columns: 1fr;
}
.contact-info{ display: grid; gap: 1.5rem; align-content: start; }
.contact-item{
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.contact-item .icon{
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--papaya-light); color: var(--papaya);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-item .icon svg{ width: 20px; height: 20px; }
.contact-item h4{ font-size: .95rem; margin-bottom: .15rem; }
.contact-item p, .contact-item a{ margin: 0; font-size: .92rem; }
.contact-item a:hover{ color: var(--papaya); }
.contact-item .contact-sub{ margin-top: .3rem; color: var(--text-secondary); font-size: .82rem; }
.contact-item--muted{ opacity: .72; }
.field-optional{ font-weight: 400; color: var(--text-secondary); text-transform: none; letter-spacing: 0; }

.contact-form{
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.form-row{ display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (min-width: 620px){ .form-row.two{ grid-template-columns: 1fr 1fr; } }
.field label{
  display: block; font-family: var(--font-head); font-weight: 700;
  font-size: .85rem; margin-bottom: .45rem;
}
.field input, .field select, .field textarea{
  width: 100%;
  font-family: var(--font-body);
  font-size: .96rem;
  padding: .8rem .9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--cream);
  color: var(--ink);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline: none; border-color: var(--papaya); background: var(--white);
}
.field textarea{ min-height: 130px; resize: vertical; }
.form-note{ font-size: .8rem; color: var(--text-secondary); margin-top: 1rem; }

.form-status{
  display: none;
  padding: .9rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  margin-bottom: 1.25rem;
}
.form-status.is-visible{ display: block; }
.form-status.success{ background: #E7F4EA; color: #1E5E30; }
.form-status.error{ background: #FBE5DD; color: #8A2C0C; }

/* ===== Health Check assessment questions ===== */
.assess-q{ margin-bottom: 1.5rem; }
.assess-q .q-label{
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: .65rem;
  color: var(--ink);
}
.assess-options{ display: grid; gap: .6rem; }
.assess-option{
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.assess-option:hover{ border-color: var(--papaya); }
.assess-option input[type="radio"]{
  margin-top: .2rem; accent-color: var(--papaya); flex-shrink: 0;
  width: 16px; height: 16px;
}
.assess-option span{ font-size: .92rem; color: var(--ink); line-height: 1.4; }
.assess-option:has(input:checked){ border-color: var(--papaya); background: var(--papaya-light); }

@media (min-width: 940px){
  .contact-grid{ grid-template-columns: .8fr 1.2fr; }
}

/* ===== Utility ===== */
.text-center{ text-align: center; }
.mt-0{ margin-top: 0; }
.visually-hidden{
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ===== Generic WP page content (page.php / index.php fallback) ===== */
.page-content{ font-size: 1.05rem; }
.page-content h2{ margin-top: 2em; }
.page-content a{ color: var(--papaya); text-decoration: underline; }
.page-content img{ border-radius: var(--radius-sm); }

/* Scroll-reveal (progressive enhancement via JS) */
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
