/* RHK Solutions — SaaS-style corporate site */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --radius: 12px;
  --shadow: 0 1px 3px rgb(15 23 42 / 6%), 0 8px 24px rgb(15 23 42 / 6%);
  --shadow-lg: 0 4px 6px rgb(15 23 42 / 5%), 0 20px 48px rgb(79 70 229 / 12%);
  --font: "Inter", system-ui, sans-serif;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

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

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

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  padding: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

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

  .nav-desktop {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
  }

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

  .nav-desktop .nav-cta {
    width: 100%;
    text-align: center;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 8px rgb(79 70 229 / 35%);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

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

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(4rem, 10vw, 6rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse, rgb(99 102 241 / 12%) 0%, transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

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

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  margin: 0 0 1.25rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual {
  background: linear-gradient(145deg, var(--surface) 0%, var(--accent-soft) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

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

/* Sections */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

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

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Cards grid */
.grid-3 {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgb(79 70 229 / 25%);
}

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

.card h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Industries pills */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pill {
  padding: 0.5rem 1rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
}

/* Why us */
.why-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.why-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.why-item:last-child,
.why-grid .why-item:nth-last-child(-n + 2) {
  border-bottom: none;
}

@media (min-width: 768px) {
  .why-item:nth-child(odd) {
    padding-right: 1.5rem;
  }

  .why-item:nth-child(even) {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
  }

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

  .why-item:nth-last-child(-n + 2) {
    border-bottom: none;
    padding-bottom: 0;
  }
}

.why-item h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
}

.why-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #312e81 0%, var(--accent) 50%, #6366f1 100%);
  color: #fff;
  padding: clamp(2.5rem, 5vw, 4rem);
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-band p {
  margin: 0 0 1.5rem;
  opacity: 0.95;
  max-width: 520px;
  margin-inline: auto;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--accent);
  box-shadow: none;
}

.cta-band .btn-primary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* Page hero (inner pages) */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 1rem;
}

.page-hero .lead {
  max-width: 52ch;
}

/* Who we are — parallax-ish blocks */
.parallax-section {
  position: relative;
}

.value-cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .value-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s ease-out;
}

.value-card[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}

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

/* Services accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.accordion-item:hover {
  border-color: rgb(79 70 229 / 30%);
}

.accordion-item.is-open {
  box-shadow: var(--shadow);
}

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

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

.accordion-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: transform 0.3s;
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.accordion-item.is-open .accordion-panel {
  grid-template-rows: 1fr;
}

.accordion-panel-inner {
  overflow: hidden;
}

.accordion-panel-inner p {
  margin: 0;
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Work grid */
.work-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
  width: 100%;
}

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

.work-card .tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.work-card h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.work-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgb(15 23 42 / 55%);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.is-open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: flex-end;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--muted);
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 0 1.5rem 1.5rem;
}

.modal-body h2 {
  font-size: 1.375rem;
  margin: 0 0 0.5rem;
}

.modal-meta {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.modal-body p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.modal-outcome {
  padding: 1rem;
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent-hover);
}

/* Contact */
.contact-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.contact-card h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.contact-detail {
  margin-bottom: 1.25rem;
}

.contact-detail dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.contact-detail dd {
  margin: 0;
  font-weight: 500;
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(79 70 229 / 20%);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  display: none;
}

.form-status.is-success {
  display: block;
  background: #ecfdf5;
  color: #047857;
}

.form-status.is-error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

.footer-brand span {
  color: var(--accent);
}

.site-footer p,
.site-footer a {
  font-size: 0.875rem;
  color: var(--muted);
}

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

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Reveal animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

[data-stagger] > *:nth-child(1) {
  transition-delay: 0ms;
}
[data-stagger] > *:nth-child(2) {
  transition-delay: 80ms;
}
[data-stagger] > *:nth-child(3) {
  transition-delay: 160ms;
}
[data-stagger] > *:nth-child(4) {
  transition-delay: 240ms;
}
[data-stagger] > *:nth-child(5) {
  transition-delay: 320ms;
}
[data-stagger] > *:nth-child(6) {
  transition-delay: 400ms;
}

/* Layout shell */
.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}
