/* ==========================================================================
   CastleTax — colors and type taken from the business card
   ========================================================================== */
:root {
  --navy-950: #081521;
  --navy-900: #0B1B2B;
  --navy-800: #10263A;
  --navy-700: #1A3651;
  --gold: #C4A26A;          /* gold on dark backgrounds (7:1 on navy) */
  --gold-soft: #D9C094;
  --gold-deep: #7E5F2C;     /* gold text on light backgrounds (5:1 on cream) */
  --gold-line: #B8955A;     /* decorative rules only */
  --cream: #F6F1E6;
  --paper: #FFFDF8;
  --ink: #13202D;
  --ink-muted: #4A5663;
  --line: #E4DCCB;
  --on-dark: #F3EEE3;
  --on-dark-muted: #B9C2CC;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --radius: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(11, 27, 43, .06), 0 2px 8px rgba(11, 27, 43, .05);
  --shadow-md: 0 8px 28px rgba(11, 27, 43, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
  color-scheme: only light; /* opt out of browsers' forced/auto dark mode */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.2; text-wrap: balance; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
section[id], main { scroll-margin-top: calc(var(--header-h) + 8px); }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 780px; }
.center { text-align: center; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--gold); color: var(--navy-900);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); color: var(--navy-900); }
h3 { font-size: 1.25rem; font-weight: 700; color: var(--navy-900); }

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-deep); margin-bottom: 1rem;
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.center .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow-light { color: var(--gold); }

.lede { font-size: 1.2rem; color: var(--ink-muted); }
.gold { color: var(--gold); }
.on-dark-muted { color: var(--on-dark-muted); font-size: 1.125rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font: 700 1rem/1.2 var(--font-body); letter-spacing: .02em;
  text-decoration: none; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; touch-action: manipulation;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-lg { min-height: 56px; padding: 14px 26px; font-size: 1.0625rem; }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: .95rem; }

.btn-gold { background: var(--gold); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-soft); box-shadow: 0 6px 20px rgba(196, 162, 106, .3); }

.btn-outline-light { border-color: rgba(243, 238, 227, .55); color: var(--on-dark); }
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold-soft); }

.btn-navy { background: var(--navy-900); color: var(--on-dark); }
.btn-navy:hover { background: var(--navy-700); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row-center { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 27, 43, .96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(196, 162, 106, .22);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-dark); }
.brand-crest { width: 62px; height: 62px; --logo-a: url(#gold-grad); --logo-b: url(#gold-grad); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .04em; text-transform: uppercase; }
.wordmark-accent { color: var(--gold); }
.brand-tag { font-size: .62rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-muted); margin-top: 6px; }

.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: .98rem;
  border-radius: var(--radius); transition: color .2s var(--ease);
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="true"] { color: var(--gold); }
.nav-cta-item { margin-left: 8px; }

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px;
  background: transparent; color: var(--on-dark);
  border: 1px solid rgba(243, 238, 227, .35); border-radius: var(--radius);
  font: 600 .95rem var(--font-body); cursor: pointer;
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; inset: 100% 0 auto 0;
    background: var(--navy-900); border-bottom: 1px solid rgba(196, 162, 106, .22);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 20px; gap: 0; }
  .site-nav a:not(.btn) { width: 100%; padding: 0 4px; min-height: 52px; border-bottom: 1px solid rgba(243, 238, 227, .08); }
  .nav-cta-item { margin: 16px 0 0; }
  .nav-cta-item .btn { width: 100%; min-height: 52px; }
}
@media (max-width: 420px) {
  .brand-tag { display: none; }
  .wordmark { font-size: 1.3rem; }
  .brand-crest { width: 52px; height: 52px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(26, 54, 81, .9), transparent 70%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: var(--on-dark);
  padding: clamp(56px, 8vw, 110px) 0 clamp(64px, 9vw, 120px);
}
.hero-watermark {
  position: absolute; left: 50%; top: 50%; width: 680px; height: 680px;
  transform: translate(-50%, -50%);
  --logo-a: rgba(196, 162, 106, .07); --logo-b: rgba(196, 162, 106, .07);
  pointer-events: none;
}
.hero-grid { position: relative; text-align: center; }
.hero-copy { max-width: 880px; margin-inline: auto; }
.hero .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1 {
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.9rem);
  font-weight: 600; line-height: 1.12; color: var(--on-dark); margin-bottom: .45em;
}
.hero h1 .gold { display: block; }
.hero-lede { font-size: 1.2rem; color: var(--on-dark-muted); max-width: 36em; margin: 0 auto 2rem; }
.hero .btn-row { justify-content: center; }
.hero-sig { margin: 1.75rem 0 0; font-size: .95rem; color: var(--on-dark-muted); letter-spacing: .02em; }
.hero-sig strong { color: var(--on-dark); font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; }

@media (max-width: 900px) {
  .hero-watermark { width: 460px; height: 460px; }
}
@media (max-width: 560px) {
  .btn-row .btn-lg { width: 100%; }
}

/* ---------- Media placeholders ---------- */
.media-placeholder {
  position: relative; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border-radius: var(--radius-lg); text-align: center; overflow: hidden;
}
.ph-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: .04em; }
.ph-note { display: block; font-size: .9rem; margin-top: 4px; }

.media-video {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(196, 162, 106, .14), transparent 45%),
    repeating-linear-gradient(135deg, rgba(243, 238, 227, .03) 0 2px, transparent 2px 14px),
    var(--navy-800);
  border: 1px solid rgba(196, 162, 106, .35);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
  color: var(--on-dark);
}
.media-video .ph-note { color: var(--on-dark-muted); }
.play-badge {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); box-shadow: 0 0 0 10px rgba(196, 162, 106, .18);
}
.play-badge svg { width: 30px; height: 30px; fill: var(--navy-900); margin-left: 4px; }

.media-portrait {
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(135deg, rgba(11, 27, 43, .035) 0 2px, transparent 2px 14px),
    var(--cream);
  border: 2px dashed var(--gold-line);
  color: var(--navy-900);
}
.media-portrait .ph-note { color: var(--ink-muted); }
.ph-icon { width: 56px; height: 56px; fill: none; stroke: var(--gold-deep); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Credential strip ---------- */
.cred-strip { background: var(--navy-800); color: var(--on-dark); border-top: 1px solid rgba(196, 162, 106, .25); }
.cred-list { list-style: none; margin: 0 auto; padding: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cred-list li { display: flex; gap: 14px; align-items: flex-start; font-size: .95rem; color: var(--on-dark-muted); }
.cred-list .icon { width: 26px; height: 26px; color: var(--gold); margin-top: 2px; }
.cred-list strong { display: block; color: var(--on-dark); font-size: 1rem; }
@media (max-width: 760px) { .cred-list { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-cream { background: var(--cream); }
.section-paper { background: var(--paper); }
.section-navy { background: var(--navy-900); color: var(--on-dark); }
.section-navy h2, .section-navy h3 { color: var(--on-dark); }
.section-head { text-align: center; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }

/* Why */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(40px, 5vw, 64px); }
.pillar {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px 28px; box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold-line);
}
.pillar p { color: var(--ink-muted); margin: 0; }
.pillar-icon, .service-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px;
  border-radius: 50%; background: var(--navy-900); color: var(--gold);
}
.pillar-icon .icon, .service-icon .icon { width: 24px; height: 24px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

.nevada-note {
  display: flex; gap: 28px; align-items: center;
  margin-top: 32px; margin-bottom: 0; padding: 32px;
  background: var(--navy-900); color: var(--on-dark); border-radius: var(--radius-lg);
}
.nevada-note blockquote { margin: 0; }
.nevada-note blockquote p {
  margin: 0; color: var(--on-dark);
  font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; line-height: 1.3;
  font-size: clamp(1.35rem, 1rem + 1.4vw, 1.9rem); text-wrap: balance;
}
.nevada-note figcaption {
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
  font-size: .85rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
.nevada-note figcaption::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.nevada-crest { width: 112px; height: 112px; flex: none; --logo-a: url(#gold-grad); --logo-b: url(#gold-grad); }
@media (max-width: 600px) { .nevada-note { flex-direction: column; align-items: flex-start; padding: 26px 22px; } .nevada-crest { width: 88px; height: 88px; } }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px 32px; box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.service-card:hover { box-shadow: var(--shadow-md); border-color: var(--gold-line); }

/* Whole card is a pre-filled email link */
a.service-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; cursor: pointer; }
a.service-card .checks { margin-bottom: 24px; }
a.service-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.service-cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: auto;
  padding-top: 18px; border-top: 1px solid var(--line);
  font-weight: 700; color: var(--gold-deep);
}
.service-cta .cta-arrow { transition: transform .2s var(--ease); }
a.service-card:hover .service-cta, a.service-card:focus-visible .service-cta { color: var(--navy-900); }
a.service-card:hover .cta-arrow, a.service-card:focus-visible .cta-arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .service-cta .cta-arrow { transition: none; } }
.service-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: .01em; }
.service-card > p { color: var(--ink-muted); }
@media (max-width: 800px) { .services-grid { grid-template-columns: 1fr; } .service-card { padding: 28px 22px; } }

.checks { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px;
  background: var(--gold-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.inline-cta {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px 24px;
  margin-top: 40px; text-align: center;
}
.inline-cta p { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--navy-900); }

/* Enrolled Agent band */
.ea-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.ea-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ea-points li { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid rgba(196, 162, 106, .22); }
.ea-points li:last-child { border-bottom: 0; }
.ea-points h3 { margin-bottom: .3em; }
.ea-points p { margin: 0; color: var(--on-dark-muted); }
.ea-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--gold); line-height: 1.1; min-width: 44px; }
@media (max-width: 860px) { .ea-grid { grid-template-columns: 1fr; } }

/* Process */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.step { position: relative; text-align: center; padding: 0 8px; }
.step p { color: var(--ink-muted); margin: 0; }
.step-num {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--gold-line);
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--navy-900);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 32px; left: calc(50% + 40px); right: calc(-50% + 28px);
  height: 1px; background: var(--gold-line);
}
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .step::after { display: none; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .step { text-align: left; padding-left: 84px; min-height: 64px; }
  .step-num { position: absolute; left: 0; top: 0; margin: 0; }
}

/* About */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-photo {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top;
  border-radius: var(--radius-lg);
}
.about-copy h2 { margin-bottom: .2em; }
.about-role { font-size: .85rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 1.5rem; }
.about-copy > p:not(.eyebrow):not(.about-role) { color: var(--ink-muted); }
.contact-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 4px 24px;
  margin-top: 28px; padding: 20px 24px;
  background: var(--cream); border-left: 3px solid var(--gold-line); border-radius: var(--radius);
}
.contact-card a, .contact-card span {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  font-weight: 600; color: var(--navy-900); text-decoration: none; overflow-wrap: anywhere;
}
.contact-card a:hover { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.contact-card .icon { color: var(--gold-deep); }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .media-portrait, .about-photo { max-width: 420px; width: 100%; margin-inline: auto; }
}
@media (max-width: 560px) { .contact-card { grid-template-columns: 1fr; } }

/* Final CTA */
.final-cta {
  position: relative; overflow: hidden;
  background: radial-gradient(700px 400px at 50% 0%, var(--navy-700), var(--navy-900) 70%);
  color: var(--on-dark);
  padding: clamp(72px, 10vw, 128px) 0;
}
.final-cta h2 { color: var(--on-dark); }
.final-watermark {
  position: absolute; left: -80px; bottom: -80px; width: 520px; height: 520px;
  --logo-a: rgba(196, 162, 106, .06); --logo-b: rgba(196, 162, 106, .06);
  pointer-events: none;
}
.final-logo {
  width: min(480px, 100%); margin: -24px auto 4px;
}
.final-logo img { width: 100%; height: auto; }
.final-cta .btn-row { margin-top: 32px; }
.rule-tag {
  margin: 44px auto 0; padding-top: 24px; max-width: 420px;
  border-top: 1px solid var(--gold-line);
  font-size: .85rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--on-dark-muted);
}
.rule-tag span { color: var(--gold); margin: 0 .5em; }

/* Footer */
.site-footer { background: var(--navy-950); color: var(--on-dark-muted); padding: 56px 0 28px; font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 16px; }
.footer-head { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-list a { color: var(--on-dark); text-decoration: none; display: inline-block; padding: 2px 0; }
.footer-list a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.footer-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(243, 238, 227, .1); font-size: .875rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-base p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Scroll reveal (only when JS is on and motion is OK) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
