/*
Theme Name:   TodoSoftware
Description:  Standard (non-headless) WordPress theme for TodoSoftware — plain PHP + CSS + vanilla JS, no build step. Built to TodoSoftware's Brand Profile v1.0 (Jane) and Web Development Brief v1.0 (Josh).
Author:       Josh, Web Developer — TodoSoftware
Version:      1.0.0
Requires PHP: 7.4
Text Domain:  todosoftware
*/

/* =========================================================================
   1. BRAND TOKENS  (from TodoSoftware Brand Profile v1.0)
   ========================================================================= */
:root {
  --navy:        #1A2E4A;
  --navy-mid:    #152540;
  --navy-dark:   #0D1A2E;
  --teal:        #00A898;
  --teal-light:  #00C4B2;
  --teal-dark:   #008F81;
  --slate:       #6B7C93;
  --off-white:   #F5F7FA;
  --amber:       #F5A623;
  --charcoal:    #2D2D2D;
  --white:       #FFFFFF;

  --font-sans: 'Inter', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --container-max: 1280px;
  --site-max:      1440px;

  --radius: 8px;
  --shadow-card: 0 4px 24px rgba(26, 46, 74, 0.06);
}

/* =========================================================================
   2. RESET & BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--navy);
  background: var(--white);
  line-height: 1.5;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* Skip link — WCAG 2.4.1 */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  background: var(--teal);
  color: var(--navy);
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* =========================================================================
   3. TYPOGRAPHY SCALE
   ========================================================================= */
.text-display { font-size: 3.25rem; line-height: 1.08; }
.text-h1      { font-size: 2.5rem;  line-height: 1.1; }
.text-h2      { font-size: 2rem;    line-height: 1.15; }
.text-h3      { font-size: 1.375rem; line-height: 1.3; }
.text-h4      { font-size: 1.0625rem; line-height: 1.4; }
@media (min-width: 768px) {
  .text-display { font-size: 5.375rem; }
  .text-h1      { font-size: 3.5rem; }
  .text-h2      { font-size: 2.75rem; }
}

/* =========================================================================
   4. LAYOUT
   ========================================================================= */
.site-container { max-width: var(--container-max); margin: 0 auto; padding: 0 2rem; }
.section-pad    { padding: 5rem 0; }
@media (min-width: 1024px) { .section-pad { padding: 7rem 0; } }

.bg-navy       { background: var(--navy); color: var(--white); }
.bg-white      { background: var(--white); }
.bg-off-white  { background: var(--off-white); }
.bg-charcoal   { background: var(--charcoal); color: var(--white); }

.section-label {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;
}
.section-label::before {
  content: ''; display: block; width: 2.5rem; height: 3px;
  background: var(--teal); border-radius: 999px; flex-shrink: 0;
}
.section-label span {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--teal); text-transform: uppercase;
}
.section-heading { font-weight: 700; color: var(--navy); }
.bg-navy .section-heading, .bg-charcoal .section-heading { color: var(--white); }
.section-body { margin-top: 1rem; font-size: 1.125rem; color: var(--slate); max-width: 42rem; line-height: 1.6; }

.grid          { display: grid; gap: 1.5rem; }
.grid-2        { grid-template-columns: repeat(1, 1fr); }
.grid-3        { grid-template-columns: repeat(1, 1fr); }
.grid-4        { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================================================
   5. BUTTONS
   ========================================================================= */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 2rem; font-size: 1rem; font-weight: 700; border-radius: var(--radius);
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--teal); color: var(--navy); }
.btn-primary:hover { background: var(--teal-light); }
.btn-ghost { border-color: rgba(107,124,147,0.4); color: var(--navy); background: transparent; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.bg-navy .btn-ghost, .bg-charcoal .btn-ghost { color: var(--off-white); border-color: rgba(255,255,255,0.25); }
.bg-navy .btn-ghost:hover, .bg-charcoal .btn-ghost:hover { color: var(--teal); border-color: var(--teal); }

/* =========================================================================
   6. HEADER / NAV
   ========================================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--navy);
}
.site-header__accent { height: 3px; background: var(--teal); }
.site-header__inner {
  max-width: var(--site-max); margin: 0 auto; padding: 0 2rem;
  height: 77px; display: flex; align-items: center; justify-content: space-between;
}
.site-logo { display: flex; align-items: center; font-size: 1.375rem; font-weight: 700; }
.site-logo span:first-child { color: var(--teal); }
.site-logo span:last-child  { color: var(--white); }

.primary-nav { display: none; align-items: center; gap: 2rem; }
.primary-nav a {
  font-size: 0.9375rem; font-weight: 500; color: var(--off-white); transition: color 0.15s;
}
.primary-nav a:hover, .primary-nav a.is-active { color: var(--teal); }
.primary-nav .has-dropdown { position: relative; }
.primary-nav .dropdown-toggle {
  background: none; border: 0; color: var(--off-white); font: inherit; font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.primary-nav .dropdown-toggle:hover { color: var(--teal); }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 0.75rem; width: 16rem; background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.has-dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; font-size: 0.875rem;
}
.dropdown-menu a:hover { background: rgba(255,255,255,0.05); }
.dropdown-badge {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.05em; color: var(--teal);
  background: rgba(0,168,152,0.1); padding: 0.125rem 0.5rem; border-radius: 4px;
}

.nav-cta {
  display: none; padding: 0.625rem 1.25rem; background: var(--teal); color: var(--navy);
  font-size: 0.875rem; font-weight: 700; border-radius: 6px;
}
.nav-cta:hover { background: var(--teal-light); }

.nav-toggle {
  display: inline-flex; background: none; border: 0; color: var(--white); padding: 0.5rem;
}
.mobile-menu {
  display: none; background: var(--navy-dark); border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 2rem;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a { display: block; padding: 0.5rem 0; font-size: 1rem; color: var(--off-white); }
.mobile-menu .mobile-sub { padding-left: 1rem; border-left: 1px solid rgba(0,168,152,0.3); margin: 0.25rem 0 0.5rem; }
.mobile-menu .mobile-sub a { font-size: 0.875rem; color: var(--slate); padding: 0.25rem 0; }

@media (min-width: 900px) {
  .primary-nav { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

main { padding-top: 83px; }

/* =========================================================================
   7. HERO
   ========================================================================= */
.hero { position: relative; overflow: hidden; padding: 6rem 0; }
.hero__decoration {
  position: absolute; top: 0; right: 0; width: 700px; height: 700px; border-radius: 50%;
  background: rgba(0,168,152,0.06); transform: translate(50%, -50%); pointer-events: none;
}
.hero__divider { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--teal); }
.hero__tag {
  display: inline-block; background: var(--teal); color: var(--navy); font-size: 0.6875rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.375rem 0.875rem;
  border-radius: 4px; margin-bottom: 2rem;
}
.hero__tag--amber { background: var(--amber); }
.hero p.lead { font-size: 1.25rem; color: var(--slate); max-width: 40rem; line-height: 1.6; margin-top: 1.5rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

/* Stats bar */
.stats-bar { background: var(--teal); padding: 2.5rem 0; }
.stats-bar .grid { grid-template-columns: repeat(2, 1fr); text-align: center; }
@media (min-width: 640px) { .stats-bar .grid { grid-template-columns: repeat(4, 1fr); } }
.stats-bar .stat-value { font-size: 2.25rem; font-weight: 700; color: var(--navy); }
.stats-bar .stat-label { font-size: 0.875rem; color: rgba(26,46,74,0.75); margin-top: 0.25rem; }

/* Hero stat columns (sector pages) */
.hero-stats { display: flex; gap: 2rem; margin-top: 2.5rem; }
.hero-stats .stat-value { font-size: 2.5rem; font-weight: 700; }
.hero-stats .stat-label { font-size: 0.875rem; color: var(--slate); margin-top: 0.25rem; }

/* =========================================================================
   8. CARDS
   ========================================================================= */
.card {
  background: var(--white); border: 1px solid var(--off-white); border-radius: 10px;
  padding: 1.75rem; height: 100%;
}
.card--dark { background: var(--navy-mid); border-color: rgba(255,255,255,0.08); color: var(--off-white); }

.sector-card .badge {
  display: inline-block; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.25rem 0.625rem; border-radius: 4px; margin-bottom: 1rem;
}
.badge--teal  { background: rgba(0,168,152,0.12); color: var(--teal-dark); }
.badge--navy  { background: rgba(26,46,74,0.08); color: var(--navy); }
.badge--amber { background: rgba(245,166,35,0.15); color: #9a6a10; }
.sector-card h3 { font-size: 1.25rem; }
.sector-card .subtitle { color: var(--teal); font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.5rem; }
.sector-card p { color: var(--slate); font-size: 0.9375rem; }
.sector-card .card-link { margin-top: 1rem; font-size: 0.875rem; font-weight: 700; color: var(--teal); display: inline-block; }

.service-card .icon {
  width: 3rem; height: 3rem; border-radius: 50%; background: rgba(0,168,152,0.1);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.25rem;
}
.service-card h3 { font-size: 1.25rem; }
.service-card p { color: var(--slate); font-size: 0.9375rem; }
.service-card .features { margin-top: 1rem; font-size: 0.875rem; }
.service-card .features li { display: flex; gap: 0.5rem; padding: 0.2rem 0; color: var(--navy); }
.service-card .features li::before { content: '✓'; color: var(--teal); font-weight: 700; }

.case-card .badge { margin-bottom: 1rem; }
.case-card h3 { font-size: 1.25rem; }
.case-card .stat-value { font-size: 2.25rem; font-weight: 700; color: var(--teal); }
.case-card--amber .stat-value { color: var(--amber); }
.case-card .stat-label { font-size: 0.875rem; color: var(--slate); }
.case-card .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.case-card .tags span { font-size: 0.6875rem; border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; padding: 0.15rem 0.5rem; color: var(--slate); }
.card:not(.card--dark) .tags span { border-color: var(--off-white); }

.process-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--off-white); }
.process-card .num { font-size: 2.5rem; font-weight: 700; color: rgba(0,168,152,0.2); }
.process-card h3 { font-size: 1.0625rem; margin-top: 0.5rem; }
.process-card p { font-size: 0.875rem; color: var(--slate); }

/* =========================================================================
   9. CTA BAND
   ========================================================================= */
.cta-band { background: var(--navy); padding: 4.5rem 0; text-align: center; }
.cta-band h2 { color: var(--white); font-size: 2rem; white-space: pre-line; }
.cta-band p { color: var(--slate); max-width: 34rem; margin: 1rem auto 2rem; }
.cta-band .hero__actions { justify-content: center; }

/* =========================================================================
   10. FORMS
   ========================================================================= */
.form-label { display: block; font-size: 0.875rem; font-weight: 700; color: var(--navy); margin-bottom: 0.375rem; }
.form-input {
  width: 100%; padding: 0.75rem 1rem; border-radius: 6px; border: 1px solid var(--off-white);
  background: var(--off-white); color: var(--navy); font-size: 0.9375rem;
}
.form-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,168,152,0.15); }
.form-input-error { border-color: #e04b4b; }
.form-error { margin-top: 0.25rem; font-size: 0.75rem; color: #d13f3f; }
.form-row { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.form-consent { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.875rem; color: var(--slate); margin: 1.5rem 0; }
.form-consent input { margin-top: 0.2rem; accent-color: var(--teal); }
.form-card { background: var(--white); border: 1px solid var(--off-white); border-radius: 12px; padding: 2rem; box-shadow: var(--shadow-card); }
.form-success {
  background: var(--white); border: 1px solid rgba(0,168,152,0.2); border-radius: 12px;
  padding: 2.5rem; text-align: center;
}
.form-notice {
  padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.9375rem;
}
.form-notice--error   { background: #fdecec; border: 1px solid #f3c1c1; color: #a3312f; }
.form-notice--success { background: #e9f9f6; border: 1px solid #b7e8de; color: #0b6b5c; }

/* honeypot field — hidden from real users, visible to bots that fill every field */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =========================================================================
   11. FOOTER
   ========================================================================= */
.site-footer { padding-top: 3.5rem; padding-bottom: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(6, 1fr); } }
.footer-brand { grid-column: span 2; }
.footer-brand .site-logo { font-size: 1.25rem; }
.footer-brand p { color: var(--slate); font-size: 0.9375rem; margin-top: 1rem; }
.footer-col h3 { font-size: 0.9375rem; color: var(--white); margin-bottom: 1rem; }
.footer-col .rule { height: 2px; background: rgba(255,255,255,0.1); margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a { font-size: 0.875rem; color: var(--slate); }
.footer-col a:hover { color: var(--teal); }
.footer-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; }
.footer-badges span { font-size: 0.75rem; color: var(--slate); border: 1px solid rgba(255,255,255,0.1); padding: 0.25rem 0.75rem; border-radius: 999px; }
.footer-bottom {
  margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column; gap: 1rem; font-size: 0.75rem; color: var(--slate);
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-bottom a { color: var(--teal); }

/* =========================================================================
   12. COOKIE CONSENT BANNER
   ========================================================================= */
#cookie-consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200;
  max-width: 560px; margin: 0 auto; background: var(--navy); color: var(--off-white);
  border-radius: 12px; padding: 1.5rem; box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  display: none;
}
#cookie-consent.is-visible { display: block; }
#cookie-consent p { font-size: 0.875rem; color: var(--slate); margin-bottom: 1rem; }
#cookie-consent .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
#cookie-consent .btn-primary,
#cookie-consent .btn-ghost { padding: 0.625rem 1.25rem; font-size: 0.875rem; }

/* =========================================================================
   13. WYSIWYG CONTENT
   ========================================================================= */
.entry-content { color: var(--slate); font-size: 1rem; line-height: 1.7; }
.entry-content h2 { color: var(--navy); font-size: 1.75rem; margin-top: 2.5rem; }
.entry-content h3 { color: var(--navy); font-size: 1.375rem; margin-top: 2rem; }
.entry-content a { color: var(--teal); text-decoration: underline; }
.entry-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.entry-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.entry-content blockquote { border-left: 4px solid var(--teal); padding-left: 1.5rem; font-style: italic; margin: 2rem 0; }
.entry-content strong { color: var(--navy); font-weight: 700; }

/* =========================================================================
   14. UTILITIES
   ========================================================================= */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-slate { color: var(--slate); }
.text-teal  { color: var(--teal); }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
