/* Sullivan Financing — Base & variables */
:root {
  --color-bg: #fafbfc;
  --color-bg-alt: #fff;
  --color-text: #1a1d21;
  --color-text-muted: #5c6166;
  --color-accent: #0d5c8c;
  --color-accent-hover: #094770;
  --color-border: #e4e6e9;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);
  --header-height: 72px;
  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-sticky {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--color-accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.main-nav a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.main-nav a:hover {
  color: var(--color-accent);
}

.main-nav .cta-link {
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-accent);
  color: #fff !important;
  border-radius: var(--radius-md);
}

.main-nav .cta-link:hover {
  background: var(--color-accent-hover);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius-sm);
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s ease;
}

.nav-toggle::before {
  top: 16px;
}

.nav-toggle::after {
  bottom: 16px;
}

.nav-toggle[aria-expanded="true"]::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 100%);
}

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

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  text-align: center;
}

.hero-content h1 {
  margin: 0 0 var(--space-md);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-tagline {
  margin: 0 0 var(--space-md);
  font-size: 1.375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.hero-desc {
  margin: 0 0 var(--space-xl);
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: #fff;
  color: var(--color-accent);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

/* Sections common */
section {
  padding: var(--space-4xl) 0;
}

section h2 {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0 0 var(--space-2xl);
  max-width: 56ch;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.main-nav a.current {
  color: var(--color-accent);
  font-weight: 600;
}

.main-nav a.cta-link.current {
  color: #fff !important;
}

/* Inner page hero (title block) */
.page-hero {
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-2xl);
  background: var(--color-bg-alt);
}

.page-hero h1 {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.page-hero .section-intro {
  margin-bottom: 0;
}

/* Home page teasers */
.teasers {
  padding: var(--space-4xl) 0;
  background: var(--color-bg-alt);
}

.teasers h2 {
  margin-bottom: var(--space-xl);
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.teaser h2,
.teaser h3 {
  margin: 0 0 var(--space-sm);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.teaser p {
  margin: 0 0 var(--space-md);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.teaser-link {
  font-weight: 600;
  font-size: 0.9375rem;
}

.teaser-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
}

.teaser-cta .btn {
  margin-right: var(--space-sm);
}

/* Home: intro block */
.intro-section {
  padding: var(--space-4xl) 0;
  background: var(--color-bg);
}

.intro-section h2 {
  margin-bottom: var(--space-xl);
}

.intro-content {
  max-width: 65ch;
}

.intro-content p {
  margin: 0 0 var(--space-lg);
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.intro-content p:last-child {
  margin-bottom: 0;
}

/* Home: solutions preview */
.solutions-preview {
  padding: var(--space-4xl) 0;
  background: var(--color-bg-alt);
}

.solutions-preview h2,
.home-why h2 {
  margin-bottom: var(--space-md);
}

.solutions-list,
.why-list {
  margin: 0 0 var(--space-xl);
  padding-left: 1.35rem;
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.solutions-list li,
.why-list li {
  margin-bottom: var(--space-md);
}

.solutions-list strong,
.why-list strong {
  color: var(--color-text);
}

/* Home: why block */
.home-why {
  padding: var(--space-4xl) 0;
  background: var(--color-bg);
}

/* Home: final CTA */
.home-cta {
  padding: var(--space-4xl) 0;
  background: var(--color-accent);
  color: #fff;
  text-align: center;
}

.home-cta h2 {
  margin: 0 0 var(--space-md);
  color: #fff;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
}

.home-cta p {
  margin: 0 0 var(--space-xl);
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
}

.home-cta .btn-primary {
  background: #fff;
  color: var(--color-accent);
}

.home-cta .btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
}

.section-cta {
  margin: var(--space-2xl) 0 0;
  padding-top: var(--space-xl);
}

/* Products */
.products {
  background: var(--color-bg-alt);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-2xl);
}

.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(13, 92, 140, 0.2);
}

.product-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-border);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.04);
}

.product-body {
  padding: var(--space-xl);
}

.product-body h3 {
  margin: 0 0 var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.product-desc {
  margin: 0 0 var(--space-md);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.product-body ul {
  margin: 0 0 var(--space-lg);
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.product-body li {
  margin-bottom: var(--space-xs);
}

.product-cta {
  font-weight: 600;
  font-size: 0.9375rem;
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.step {
  text-align: center;
  padding: var(--space-lg);
}

.step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  background: var(--color-accent);
  border-radius: 50%;
}

.step h3 {
  margin: 0 0 var(--space-sm);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.step p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Why us */
.why-us {
  background: var(--color-bg-alt);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.feature {
  padding: var(--space-xl);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  border-color: rgba(13, 92, 140, 0.25);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-md);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
}

.feature h3 {
  margin: 0 0 var(--space-sm);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.feature p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Apply / Typeform */
.apply-section {
  background: var(--color-bg);
  padding: var(--space-4xl) 0;
}

body.page-apply .apply-section {
  padding-top: calc(var(--header-height) + var(--space-3xl));
}

.apply-section h1 {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.typeform-embed {
  margin-top: var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.typeform-embed iframe,
.typeform-embed [data-tf-widget] {
  min-height: 600px;
}

/* FAQ */
.faq {
  background: var(--color-bg-alt);
}

.accordion {
  max-width: 720px;
  margin-top: var(--space-xl);
}

.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-item:first-child {
  border-top: 1px solid var(--color-border);
}

.accordion-trigger {
  width: 100%;
  padding: var(--space-lg) var(--space-md) var(--space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.accordion-trigger:hover {
  color: var(--color-accent);
}

.accordion-trigger::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform 0.25s ease;
}

.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(45deg);
  color: var(--color-accent);
}

.accordion-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.accordion-panel[data-open="true"] {
  max-height: 500px;
}

.accordion-panel p {
  margin: 0 0 var(--space-lg);
  padding: 0 var(--space-md) var(--space-lg) 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.site-footer .logo {
  color: #fff;
}

.site-footer .logo:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-brand {
  margin-bottom: var(--space-xl);
}

.footer-tagline {
  margin: var(--space-xs) 0 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
}

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

.footer-legal {
  margin: 0 0 var(--space-md);
  max-width: 60ch;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Scroll-triggered reveal (optional) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Responsive */
@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-lg);
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-lg);
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav a {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav a:last-child {
    border-bottom: none;
    margin-top: var(--space-sm);
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: 1fr;
  }

  section {
    padding: var(--space-3xl) 0;
  }
}

@media (max-width: 480px) {
  :root {
    --space-4xl: 4rem;
  }

  .hero {
    min-height: 85vh;
  }
}
