/* ===== Rexallar — Design System ===== */

:root {
  --bg: #17161a;
  --surface: #221f24;
  --surface-2: #2a262c;
  --border: #38333b;
  --text: #f5f5f0;
  --text-muted: #a8a29e;
  --accent: #ff7a1a;
  --accent-2: #ffb020;
  --accent-soft: rgba(255, 122, 26, 0.14);
  --accent-ink: #2b1400;
  --radius: 14px;
  --max-width: 1200px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 17px;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
}

.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(255, 122, 26, 0.35);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-block {
  width: 100%;
}

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.logo .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.hero {
  padding: 120px 0 96px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.25), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 760px;
  position: relative;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.page-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}

.page-hero .eyebrow {
  margin-bottom: 18px;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 760px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 640px;
}

/* ===== Cards / Grids ===== */

.grid {
  display: grid;
  gap: 24px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card .card-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 15px;
}

.card ul {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card ul li {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card ul li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* ===== Stats ===== */

.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
}

.stats-bar .grid {
  text-align: center;
}

.stat h3 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
}

.stat p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ===== Tech badges ===== */

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tech-badge {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
}

/* ===== Testimonials ===== */

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.testimonial p.quote {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 24px;
}

.testimonial .person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.person .name {
  font-weight: 700;
  font-size: 15px;
}

.person .role {
  font-size: 13px;
  color: var(--text-muted);
}

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

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.faq-question .plus {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
}

.faq-question .plus::before,
.faq-question .plus::after {
  content: "";
  position: absolute;
  background: var(--accent);
  transition: transform 0.2s ease;
}

.faq-question .plus::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.faq-question .plus::after {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.faq-item.open .faq-question .plus::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

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

.faq-answer p {
  color: var(--text-muted);
  padding-bottom: 24px;
  max-width: 680px;
}

/* ===== CTA banner ===== */

.cta-banner {
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.15), rgba(255, 176, 32, 0.08));
  border: 1px solid var(--border);
  padding: 64px 48px;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Team ===== */

.team-card {
  text-align: center;
}

.team-card .avatar {
  width: 84px;
  height: 84px;
  font-size: 24px;
  margin: 0 auto 20px;
}

.team-card .name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 14px;
  color: var(--accent);
}

/* ===== Case studies (work page) ===== */

.case-card .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.case-card .meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.case-card .meta div {
  font-size: 13px;
  color: var(--text-muted);
}

.case-card .meta strong {
  color: var(--text);
  font-weight: 700;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

.contact-info .card {
  margin-bottom: 20px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-field.error input,
.form-field.error textarea {
  border-color: #ef4444;
}

.form-field .error-msg {
  display: none;
  color: #f87171;
  font-size: 13px;
  margin-top: 6px;
}

.form-field.error .error-msg {
  display: block;
}

.form-success {
  display: none;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 18px 20px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-success.show {
  display: block;
}

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

.site-footer {
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.footer-grid p {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 16px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Scroll reveal ===== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-actions .btn-outline {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

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

  section {
    padding: 64px 0;
  }

  .cta-banner {
    padding: 48px 24px;
  }
}
