/* ============================================
   CONSTRUCTION ACCOUNTANTS TOOLBOX
   Susan Marinaccio — Construction Financial Strategist
   
   Design Direction: Editorial Luxury + Construction Grit
   Warm greige, dark navy, gold accent, bold serif headings
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
  --greige: #DFE0DA;
  --greige-light: #EAEBE6;
  --greige-dark: #CBCCC5;
  --navy: #1B2A4A;
  --navy-light: #2A3F6B;
  --gold: #B8860B;
  --gold-light: #D4A017;
  --gold-dark: #996515;
  --slate: #1B2A4A;
  --charcoal: #1A1A1A;
  --off-white: #F5F3EF;
  --white: #FFFFFF;
  --text-body: #3D3D3D;
  --text-muted: #6B6B6B;
  --border: rgba(44, 51, 69, 0.12);
  
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
  
  --max-width: 1280px;
  --section-pad: clamp(80px, 10vw, 140px);
  --gutter: clamp(20px, 4vw, 40px);
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--greige);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: clamp(1.05rem, 1.6vw, 1.2rem); }

p { max-width: 680px; }
p + p { margin-top: 1.2em; }

.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-muted { color: var(--text-muted); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}

/* --- LAYOUT --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-pad) 0;
}

.section--dark {
  background: #152240;
  color: var(--greige-light);
}
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--off-white); }

.section--navy {
  background: var(--navy);
  color: var(--greige-light);
}
.section--navy h2,
.section--navy h3 { color: var(--off-white); }

.section--light {
  background: var(--off-white);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--gutter) * 1.2);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.4rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn--navy {
  background: var(--navy);
  color: #FFFFFF;
}
.btn--navy:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(27,42,74,0.3);
  color: #FFFFFF;
}

.btn--gold {
  background: var(--gold);
  color: var(--charcoal);
}
.btn--gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200,168,78,0.3);
}

.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn--outline:hover {
  background: var(--navy);
  color: var(--off-white);
  transform: translateY(-2px);
}

.btn--outline-light {
  background: transparent;
  color: var(--off-white);
  border: 2px solid rgba(255,255,255,0.3);
}
.btn--outline-light:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(214, 210, 201, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.8rem 0;
  box-shadow: 0 1px 0 var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav__logo span {
  color: var(--gold);
  font-weight: 900;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.4s var(--ease-out);
}

.nav__links a:hover { color: var(--charcoal); }
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  padding: 0.7rem 1.6rem !important;
  font-size: 0.85rem !important;
  color: #FFFFFF !important;
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  transition: all 0.3s;
}

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 var(--section-pad);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 80% 20%, rgba(200,168,78,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(44,51,69,0.06) 0%, transparent 50%),
    var(--greige);
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero h1 {
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero__badge {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}

.hero__badge-item {
  text-align: center;
}

.hero__badge-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
}

.hero__badge-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__visual {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__book-mockup {
  position: relative;
  width: 340px;
  height: 460px;
  perspective: 1200px;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.6s forwards;
}

.hero__book-cover {
  width: 100%;
  height: 100%;
  border-radius: 4px 16px 16px 4px;
  box-shadow: 
    -6px 6px 20px rgba(0,0,0,0.15),
    -2px 2px 6px rgba(0,0,0,0.1),
    inset -2px 0 8px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
  transform: rotateY(-8deg);
  transition: transform 0.6s var(--ease-out);
  background: none;
  padding: 0;
}

.hero__book-cover:hover {
  transform: rotateY(-2deg);
}

.hero__book-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(165deg, #722F37 0%, #5B1A21 40%, #3D0F14 100%);
  border-radius: 2px 14px 14px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
}

.hero__book-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 18px;
  background: linear-gradient(90deg, #D4A017, #B8860B, #D4A017);
}

.hero__book-stripe--bottom {
  top: auto;
  bottom: 0;
}

.hero__book-rule {
  width: 50px;
  height: 2px;
  background: #D4A017;
  margin: 0.8rem 0;
  border-radius: 1px;
}

.hero__book-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero__book-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: #FFFFFF;
  line-height: 1.25;
  margin-bottom: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero__book-sub {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.hero__book-author {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: #D4A017;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero__book-spine {
  position: absolute;
  left: -6px;
  top: 6px;
  width: 24px;
  height: calc(100% - 2px);
  background: linear-gradient(90deg, #0E1A30 0%, #3D0F14 100%);
  border-radius: 4px 0 0 4px;
  transform: rotateY(-8deg);
  z-index: -1;
}

/* --- TOOLS SECTION --- */
.tools__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.tool-card {
  background: var(--off-white);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
  border: 1px solid transparent;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  border-color: var(--gold);
}

.tool-card__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tool-card h4 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tool-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.tool-card:hover .tool-card__accent {
  transform: scaleX(1);
}

/* --- ABOUT SECTION --- */
.about__portrait {
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--greige-dark) 0%, var(--navy) 100%);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.about__portrait-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  gap: 0.5rem;
}

.about__portrait-placeholder .initials {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
}

.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text h2 {
  margin-bottom: 1.5rem;
}

.about__text p {
  margin-bottom: 1.2rem;
  color: var(--text-body);
}

.about__credentials {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.about__cred-item {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about__cred-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--navy);
  font-weight: 700;
}

/* --- PRODUCTS / BOOK --- */
.product-showcase {
  background: var(--off-white);
  border-radius: 16px;
  padding: 3rem;
  border: 1px solid var(--border);
}

.product-showcase h3 {
  margin-bottom: 1rem;
}

.product-showcase p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.product-features {
  list-style: none;
  margin-bottom: 2rem;
}

.product-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-body);
}

.product-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* --- TESTIMONIALS --- */
.testimonial-card {
  background: var(--off-white);
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  opacity: 0.4;
}

.testimonial-card blockquote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

.testimonial-card cite {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.testimonial-card cite strong {
  display: block;
  color: var(--navy);
  font-weight: 600;
}

/* --- STATS BAR --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  padding: 3rem 0;
}

.stat__number {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.stat__label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

/* --- CONTACT FORM --- */
.contact-form {
  display: grid;
  gap: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--off-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-body);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,168,78,0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* --- FOOTER --- */
.footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.5);
  padding: 4rem 0 2rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--off-white);
  margin-bottom: 1rem;
}

.footer__brand span { color: var(--gold); }

.footer__desc {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer h4 {
  color: var(--off-white);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.footer__links {
  list-style: none;
}

.footer__links li { margin-bottom: 0.6rem; }

.footer__links a {
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer__links a:hover { color: var(--gold); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* --- DIVIDER --- */
.divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1.5rem 0;
  border-radius: 2px;
}

/* --- CTA BANNER --- */
.cta-banner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-banner h2 {
  margin-bottom: 1rem;
}

.cta-banner p {
  margin: 0 auto 2rem;
  color: rgba(255,255,255,0.65);
}

/* --- SCROLL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- KEYFRAMES --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- PAGE HEADERS --- */
.page-header {
  padding: 160px 0 80px;
  position: relative;
}

.page-header .eyebrow {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; gap: 3rem; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .tools__grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr; }
  .bundle-grid { grid-template-columns: 1fr !important; }
  .bundle-books { justify-content: center !important; margin-top: 2rem; }
}

@media (max-width: 768px) {
  .nav__links { 
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--greige);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 999;
  }
  .nav__links.open { display: flex; }
  .nav__links a { font-size: 1.3rem; }
  .nav__toggle { display: flex; z-index: 1001; }
  
  .grid-3, .tools__grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  
  .hero { min-height: auto; padding: 140px 0 80px; }
  .hero .grid-2 { text-align: center; }
  .hero__actions { justify-content: center; }
  .hero__badge { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__book-mockup { width: 240px; height: 320px; }
  .hero__book-placeholder { padding: 1.5rem 1.2rem; }
  .hero__book-title { font-size: 0.95rem; }
  
  .about__credentials { flex-direction: column; gap: 1rem; }
  
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero__badge { flex-wrap: wrap; gap: 1.5rem; }
  .btn { padding: 0.85rem 1.8rem; font-size: 0.9rem; }
}
