/* ═══════════════════════════════════════════════
   PettisAI — Main Stylesheet
   Dark minimalist, high-end, Lighthouse 100 target
   ═══════════════════════════════════════════════ */

/* ── Reset & tokens ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:    #0a0a0a;
  --surface:  #111111;
  --card:     #161616;
  --border:   #242424;
  --gold:     #c9a84c;
  --gold-dim: #9a7933;
  --text:     #e8e3d8;
  --muted:    #888880;
  --serif:    'Playfair Display', Georgia, serif;
  --sans:     'Inter', system-ui, -apple-system, sans-serif;
  --radius:   6px;
  --max-w:    1160px;
  --nav-h:    68px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

ul[role="list"] { list-style: none; }

/* ── Typography ─────────────────────────────────── */
h1 { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
h2 { font-family: var(--serif); font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }

em { font-style: italic; color: var(--gold); }

/* ── Layout helpers ─────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.section { padding: clamp(4rem, 8vw, 8rem) 0; }

.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;
}

/* ── Scroll animations ──────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
  transition-delay: var(--delay, 0s);
}
.fade-up.visible { opacity: 1; transform: none; }

/* ── Navigation ─────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(10,10,10,0);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
#nav.scrolled {
  background: rgba(10,10,10,.92);
  border-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--gold);
  color: var(--black);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.logo-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: .02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 400;
  color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-size: .875rem !important;
  font-weight: 500 !important;
  color: var(--gold) !important;
  border: 1px solid var(--gold-dim);
  padding: .45rem 1.1rem;
  border-radius: var(--radius);
  transition: background .2s, color .2s !important;
}
.nav-cta:hover { background: var(--gold); color: var(--black) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 500;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  background: var(--gold);
  color: var(--black);
}
.btn--primary:hover { background: #dbb95a; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--text); }
.btn--full { width: 100%; }

/* ── Hero ───────────────────────────────────────── */
.section--hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: 5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 20%, #1a1408 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 70%, #0d1a26 0%, transparent 60%);
  pointer-events: none;
}
/* Subtle geometric grid */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .18;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, transparent 100%);
}
.hero-content {
  position: relative;
  max-width: 860px;
}
.eyebrow {
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.hero-content h1 { margin-bottom: 1.5rem; }
.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Problem section ────────────────────────────── */
.section--problem { background: var(--surface); }
.section-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.section-heading { margin-bottom: 1rem; }
.section-intro {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 3.5rem;
  line-height: 1.75;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2px;
  margin-top: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.problem-card {
  background: var(--card);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.problem-card:not(:last-child) { border-right: 1px solid var(--border); }
.problem-icon { width: 40px; height: 40px; }
.problem-card h3 { margin: 0; }
.problem-card p { color: var(--muted); font-size: .9375rem; line-height: 1.7; }

/* ── What We Do ─────────────────────────────────── */
.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0;
  margin-top: 4rem;
}
.step {
  flex: 1 1 220px;
  padding: 2.5rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-connector {
  flex: 0 0 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
  margin-top: 3.5rem;
  align-self: flex-start;
}
.step-num {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--gold);
  opacity: .35;
  line-height: 1;
  margin-bottom: 1rem;
}
.step h3 { margin-bottom: .75rem; }
.step p { color: var(--muted); font-size: .9375rem; line-height: 1.7; }

/* ── Services ───────────────────────────────────── */
.section--services { background: var(--black); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5px;
  margin-top: 3.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pricing-card {
  background: var(--card);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}
.pricing-card:not(:last-child) { border-right: 1px solid var(--border); }
.pricing-card--featured {
  background: #131108;
  border-right: none;
  border-left: none;
  box-shadow: inset 0 0 0 1px var(--gold-dim);
}
.pricing-badge {
  position: absolute;
  top: -1px; right: 2rem;
  background: var(--gold);
  color: var(--black);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border-radius: 0 0 var(--radius) var(--radius);
}
.pricing-tier {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
}
.pricing-mode {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.pricing-price {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pricing-note { font-size: .8125rem; color: var(--muted); margin-top: -.75rem; }
.pricing-features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  list-style: none;
}
.pricing-features li {
  font-size: .9rem;
  color: var(--muted);
  padding-left: 1.25rem;
  position: relative;
}
.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0; top: .55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .6;
}

/* ── Quiz ───────────────────────────────────────── */
.section--quiz { background: var(--surface); }
.quiz-wrapper {
  max-width: 640px;
  margin: 3rem auto 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.quiz-progress {
  height: 3px;
  background: var(--border);
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transition: width .4s ease;
}

.quiz-step {
  display: none;
  padding: 2.5rem 2rem 1.5rem;
  border: none;
}
.quiz-step.active { display: block; }
.quiz-step legend {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 1.75rem;
  float: left;
  width: 100%;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  clear: both;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.quiz-option:hover { border-color: var(--gold-dim); }
.quiz-option input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.quiz-option span { font-size: .9375rem; font-weight: 400; }
.quiz-option:has(input:checked) {
  border-color: var(--gold);
  background: #1a1408;
}

/* Email gate */
.quiz-email-gate { padding: 0 0 .5rem; }
.quiz-gate-note {
  font-size: .8125rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.email-field-wrap { margin-bottom: 1rem; }
.email-field-wrap input[type="email"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  padding: .85rem 1rem;
  transition: border-color .2s;
  outline: none;
}
.email-field-wrap input[type="email"]:focus { border-color: var(--gold); }
.email-field-wrap input[type="email"]::placeholder { color: var(--muted); }

.quiz-submit-btn { position: relative; overflow: hidden; }
.btn-loader {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,.3);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.quiz-submit-btn.loading .btn-text { opacity: 0; }
.quiz-submit-btn.loading .btn-loader { display: block; }

.quiz-error {
  color: #e06c75;
  font-size: .85rem;
  margin-top: .5rem;
  min-height: 1.2rem;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}
.quiz-back { font-size: .875rem; padding: .65rem 1.25rem; }
.quiz-next { padding: .65rem 1.75rem; }

/* Results */
.quiz-results {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.result-score-wrap { text-align: center; }
.result-score-label {
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .75rem;
}
.result-score {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
}
.result-assessment {
  font-size: .9375rem;
  color: var(--muted);
  line-height: 1.8;
  border-left: 2px solid var(--gold-dim);
  padding-left: 1.25rem;
}
.result-assessment p + p { margin-top: 1rem; }
.result-cta { text-align: center; }
.result-note {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .75rem;
}

/* ── About ──────────────────────────────────────── */
.section--about { background: var(--black); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}
.about-text p + p { margin-top: 1rem; }
.about-profile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.profile-avatar svg { width: 80px; height: 80px; border-radius: 4px; }
.profile-info h3 { margin-bottom: .25rem; }
.profile-title {
  font-size: .8125rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}
.profile-bio { color: var(--muted); font-size: .9rem; line-height: 1.75; }

/* ── Footer ─────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.footer-inner {
  padding-top: 3rem;
  padding-bottom: 3rem;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: center;
}
.footer-tagline {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: .5rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.footer-links a {
  font-size: .875rem;
  color: var(--muted);
  transition: color .2s;
}
.footer-links a:hover { color: var(--text); }
.footer-contact {
  text-align: right;
}
.footer-contact a {
  font-size: .875rem;
  color: var(--muted);
  transition: color .2s;
}
.footer-contact a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}
.footer-bottom p {
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
}

/* ── Animations ─────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Media queries ──────────────────────────────── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-contact { text-align: center; }
  .step-connector { display: none; }
  .steps { flex-direction: column; }
  .step { flex: none; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(10,10,10,.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.25rem; }
  .nav-toggle { display: flex; }
  .problem-card:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); }
  .pricing-card:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); }
  .pricing-card--featured { box-shadow: none; }
  .cta-group { flex-direction: column; }
  .cta-group .btn { width: 100%; justify-content: center; }
  .quiz-step { padding: 1.75rem 1.25rem 1.25rem; }
  .quiz-nav { padding: .75rem 1.25rem 1.25rem; }
}

@media (max-width: 480px) {
  .quiz-results { padding: 1.75rem 1.25rem; }
}
