/* ========================================
   Jonny Bender — R&D Tax Advisory
   Global Stylesheet
   ======================================== */

/* --- Variables --- */
:root {
  --primary: #1D4ED8;
  --primary-dark: #1E40AF;
  --primary-light: #DBEAFE;
  --accent: #0D9488;
  --accent-light: #CCFBF1;
  --heading: #0F172A;
  --text: #334155;
  --muted: #64748B;
  --border: #E2E8F0;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-dark: #0F172A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 1120px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  color: var(--heading);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { line-height: 1.75; }

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.75;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

.section-header {
  max-width: 680px;
  margin-bottom: 3.5rem;
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header h2 { margin-bottom: 1rem; }
.section-header p { color: var(--muted); font-size: 1.05rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary-light); transform: translateY(-1px); }

.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-white:hover { background: var(--primary-light); transform: translateY(-1px); }

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* --- Navigation --- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
}

.nav-links a:hover, .nav-links a.active {
  background: var(--bg-alt);
  color: var(--primary);
}

.nav-cta { margin-left: 0.75rem; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  gap: 0.25rem;
}

.mobile-menu a {
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
}

.mobile-menu a:hover { background: var(--bg-alt); color: var(--primary); }

.mobile-menu .btn { margin-top: 0.5rem; width: 100%; justify-content: center; }

/* --- Cards --- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

.card h3 { margin-bottom: 0.75rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* --- Grid helpers --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* --- Hero --- */
.hero {
  padding: 6rem 0 5rem;
  background: linear-gradient(135deg, #F0F4FF 0%, #F8FAFC 60%, #F0FDFA 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(29,78,216,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 700px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: var(--primary); }

.hero .lead { margin-bottom: 2rem; max-width: 580px; }

/* --- Stats strip --- */
.stats-strip {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.stats-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.stat { text-align: center; }
.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label { font-size: 0.9rem; color: var(--muted); font-weight: 500; }

/* --- Why Jonny --- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.why-list { display: flex; flex-direction: column; gap: 1.5rem; }

.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.why-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.why-item h4 { margin-bottom: 0.25rem; }
.why-item p { color: var(--muted); font-size: 0.93rem; }

.why-visual {
  background: linear-gradient(135deg, var(--primary) 0%, #0D9488 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.why-visual::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.why-quote {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.why-quote::before {
  content: '"';
  font-size: 4rem;
  line-height: 1;
  opacity: 0.3;
  display: block;
  margin-bottom: -0.5rem;
}

.why-attr { font-size: 0.9rem; opacity: 0.8; position: relative; z-index: 1; }

/* --- How it works --- */
.how-it-works { background: var(--bg-alt); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; }

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.67% + 14px);
  right: calc(16.67% + 14px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.step { text-align: center; padding: 2rem 1.5rem; }

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;
}

.step h3 { margin-bottom: 0.75rem; }
.step p { color: var(--muted); font-size: 0.93rem; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0D9488 100%);
  padding: 5rem 0;
  text-align: center;
  color: #fff;
}

.cta-banner h2 { color: #fff; margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }

/* --- Footer --- */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}

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

.footer-brand .nav-logo { color: #fff; margin-bottom: 1rem; display: block; }
.footer-brand p { font-size: 0.92rem; line-height: 1.7; max-width: 280px; }

.footer-col h5 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }

.footer-col a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom a { color: rgba(255,255,255,0.6); transition: color 0.15s; }
.footer-bottom a:hover { color: #fff; }

/* --- Page hero (inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, #F0F4FF 0%, #F8FAFC 100%);
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.page-hero .section-label { display: block; margin-bottom: 0.75rem; }
.page-hero h1 { margin-bottom: 1rem; font-size: clamp(1.75rem, 4vw, 2.75rem); }
.page-hero .lead { max-width: 600px; }

/* --- About page --- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.about-avatar {
  background: linear-gradient(135deg, var(--primary) 0%, #0D9488 100%);
  border-radius: var(--radius-lg);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}

.about-avatar-placeholder {
  font-size: 5rem;
}

.about-text h2 { margin-bottom: 1.25rem; }
.about-text p { color: var(--muted); margin-bottom: 1rem; }
.about-text p:last-of-type { margin-bottom: 1.5rem; }

.credentials {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.credential {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--heading);
}

.credential-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* --- Industries --- */
.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tag {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.tag.featured { background: var(--primary-light); border-color: #BFDBFE; color: var(--primary); }

/* --- Services page --- */
.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.service-card .card-icon { background: var(--primary-light); }

.service-card h3 { margin-bottom: 0.75rem; }
.service-card > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; flex: 1; }

.service-includes {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: auto;
}

.service-includes h5 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.service-includes li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.service-includes li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.pricing-note {
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  text-align: center;
  max-width: 640px;
  margin: 3rem auto 0;
}

.pricing-note h4 { margin-bottom: 0.5rem; color: var(--primary); }
.pricing-note p { color: var(--text); font-size: 0.95rem; }

/* --- FAQ page --- */
.faq-list { max-width: 780px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--heading);
  gap: 1rem;
  transition: background 0.15s;
  user-select: none;
}

.faq-question:hover { background: var(--bg-alt); }

.faq-question.open { background: var(--primary-light); color: var(--primary); }

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq-question.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.open { max-height: 500px; }

.faq-answer-inner {
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* --- Contact page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 { margin-bottom: 1rem; }
.contact-info p { color: var(--muted); margin-bottom: 2rem; }

.contact-details { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-detail-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.contact-detail-text a, .contact-detail-text p {
  font-weight: 500;
  color: var(--heading);
}

.booking-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 1.5rem;
}

.booking-box h4 { margin-bottom: 0.5rem; }
.booking-box p { color: var(--muted); font-size: 0.93rem; margin-bottom: 1.25rem; }

/* Contact Form */
.contact-form { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); }

.contact-form h3 { margin-bottom: 0.5rem; }
.contact-form > p { color: var(--muted); font-size: 0.93rem; margin-bottom: 2rem; }

.form-group { margin-bottom: 1.25rem; }

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

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.4rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--heading);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
}

textarea { resize: vertical; min-height: 130px; }

.form-submit { width: 100%; margin-top: 0.5rem; justify-content: center; }

.form-success {
  display: none;
  background: var(--accent-light);
  border: 1px solid #99F6E4;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  margin-top: 1rem;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .steps::before { display: none; }
  .why-grid, .about-intro, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { justify-content: center; }
}

@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.open { display: flex; }

  section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0; }
  .grid-2, .grid-3, .grid-4, .steps, .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stats-grid { flex-direction: column; gap: 1.5rem; }
}
