/* ============================================
   Corefrax — Design System & Styles
   ============================================ */

:root {
  /* Core palette */
  --color-steel: #0D1A26;
  --color-graphite: #1A1A1A;
  --color-silver: #C0C3C7;
  --color-infrared: #E34234;

  /* Backgrounds — silver theme */
  --color-bg: #C0C3C7;
  --color-bg-elevated: #B0B3B8;
  --color-bg-card: #F4F5F6;
  --color-bg-card-hover: #EAEBEC;
  --color-surface: #A8ABAF;
  --color-border: #9EA1A6;
  --color-border-subtle: #AAADB1;

  /* Text */
  --color-text: #0D1A26;
  --color-text-secondary: #2D3740;
  --color-text-tertiary: #5A6370;

  /* Brand */
  --color-primary: var(--color-infrared);
  --color-primary-hover: #F05545;
  --color-primary-glow: rgba(227, 66, 52, 0.18);
  --color-accent: #FF6B5A;
  --color-success: #22C55E;

  /* Service card accent colors */
  --color-blue: #2563EB;
  --color-purple: #7C3AED;
  --color-green: #16A34A;
  --color-orange: #D97706;
  --color-pink: #DB2777;
  --color-cyan: #0891B2;

  /* Tokens */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 60px var(--color-primary-glow);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1200px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 0 20px var(--color-primary-glow);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 0 40px var(--color-primary-glow);
  transform: translateY(-1px);
}

.btn--outline {
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
}

.btn--outline:hover {
  border-color: var(--color-text-secondary);
  background: var(--color-bg-elevated);
  color: var(--color-text);
}

.btn--white {
  background: white;
  color: var(--color-graphite);
}

.btn--white:hover {
  background: #F0F0F0;
  transform: translateY(-1px);
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn--full { width: 100%; justify-content: center; }

.btn--nav {
  padding: 10px 20px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-sm);
}

.btn--nav:hover {
  background: var(--color-primary-hover);
}

.btn--success {
  background: var(--color-success);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
}

.btn .spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 300ms ease;
  background: transparent;
}

.nav--scrolled {
  background: rgba(192, 195, 199, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav__logo-img {
  height: 36px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a:not(.btn) {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  transition: color var(--transition);
  font-weight: 500;
}

.nav__links a:not(.btn):hover {
  color: var(--color-text);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 300ms ease;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 26, 38, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 26, 38, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.hero__glow--1 {
  width: 600px;
  height: 600px;
  background: var(--color-primary);
  top: -200px;
  right: -100px;
  opacity: 0.07;
}

.hero__glow--2 {
  width: 400px;
  height: 400px;
  background: var(--color-steel);
  bottom: -100px;
  left: -100px;
  opacity: 0.06;
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-infrared);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(227, 66, 52, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(227, 66, 52, 0); }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__title--gradient {
  background: linear-gradient(135deg, var(--color-infrared), var(--color-accent), #FF8A75);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero__stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--color-infrared), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: 120px 0;
}

.section--dark {
  background: var(--color-bg-elevated);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section__tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================================
   Steps (How It Works)
   ============================================ */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.step {
  position: relative;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
  transition: all 300ms ease;
}

.step:hover {
  border-color: var(--color-border);
  background: var(--color-bg-card);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.step__number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.step__icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.step__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.step__desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ============================================
   Service Cards
   ============================================ */

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
  transition: all 300ms ease;
}

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

.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  padding: 10px;
}

.service-card__icon svg { width: 100%; height: 100%; }

.service-card__icon--blue { background: rgba(59, 130, 246, 0.12); color: var(--color-blue); }
.service-card__icon--purple { background: rgba(139, 92, 246, 0.12); color: var(--color-purple); }
.service-card__icon--green { background: rgba(34, 197, 94, 0.12); color: var(--color-green); }
.service-card__icon--orange { background: rgba(245, 158, 11, 0.12); color: var(--color-orange); }
.service-card__icon--pink { background: rgba(236, 72, 153, 0.12); color: var(--color-pink); }
.service-card__icon--cyan { background: rgba(6, 182, 212, 0.12); color: var(--color-cyan); }

.service-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.service-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ============================================
   Why Us
   ============================================ */

.why-us__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.why-card {
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
  transition: all 300ms ease;
}

.why-card:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.why-card__icon {
  width: 44px;
  height: 44px;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.why-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.why-card p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ============================================
   CTA Banner
   ============================================ */

.cta-banner {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.cta-banner__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-infrared), #c42a1e);
}

.cta-banner__glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: white;
  border-radius: 50%;
  filter: blur(200px);
  opacity: 0.1;
  top: -200px;
  right: -100px;
}

.cta-banner__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 660px;
  margin: 0 auto;
}

.cta-banner__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: white;
}

.cta-banner__desc {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: 32px;
}

/* ============================================
   FAQ
   ============================================ */

.faq__list {
  max-width: 720px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--color-border-subtle);
}

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

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--transition);
}

.faq__question:hover {
  color: var(--color-primary-hover);
}

.faq__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-tertiary);
  transition: transform 300ms ease;
}

.faq__question[aria-expanded="true"] .faq__chevron {
  transform: rotate(180deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1), padding 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq__answer p {
  padding-bottom: 24px;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================================
   Contact
   ============================================ */

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__desc {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  margin-top: 16px;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__detail {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.contact__detail svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form__optional {
  color: var(--color-text-tertiary);
  font-weight: 400;
}

.form__input {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  transition: all var(--transition);
  outline: none;
}

.form__input::placeholder {
  color: var(--color-text-tertiary);
}

.form__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--color-border-subtle);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 64px;
  margin-bottom: 48px;
}

.footer__tagline {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-top: 16px;
  max-width: 320px;
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-bottom: 4px;
}

.footer__col a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

.footer__col a:hover {
  color: var(--color-text);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--color-border-subtle);
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
}

/* ============================================
   Animations
   ============================================ */

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.4, 0, 0.2, 1), transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */

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

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-bg-card);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 24px;
    border-left: 1px solid var(--color-border-subtle);
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    transition: right 300ms ease;
  }

  .nav__links.is-open {
    right: 0;
  }

  .nav__toggle {
    display: flex;
    z-index: 1001;
  }

  .nav__toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    min-height: auto;
    padding: 140px 0 80px;
  }

  .hero__stats {
    gap: 24px;
  }

  .hero__stat-number {
    font-size: 1.375rem;
  }

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

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

  .why-us__grid {
    grid-template-columns: 1fr;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__links {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .section {
    padding: 80px 0;
  }

  .section__header {
    margin-bottom: 48px;
  }

  .cta-banner {
    padding: 72px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    justify-content: center;
  }

  .hero__stats {
    flex-direction: column;
    gap: 16px;
  }

  .hero__stat-divider {
    width: 40px;
    height: 1px;
  }

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