/* =========================================================
   Refocus X — Site Styles
   ========================================================= */

/* ----- Reset & Base ------------------------------------ */

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #0a0c10;
  color: #e2e8f0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

/* ----- Tokens ------------------------------------------ */

:root {
  --accent: #6c63ff;
  --accent-light: #8b85ff;
  --accent-dim: rgba(108, 99, 255, 0.15);
  --surface: #111318;
  --surface-2: #181b22;
  --surface-elevated: #1e2230;
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.35);
  --text-muted: #8b9199;
  --text-body: #b0b8c4;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.25s ease;
  --max-width: 1160px;
}

/* ----- Utilities --------------------------------------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: 6rem;
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1rem;
}

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-body);
  line-height: 1.7;
}

.highlight {
  color: var(--accent-light);
}

/* ----- Buttons ----------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}

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

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-light);
  border-color: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.25);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.05);
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ----- Header / Navigation ----------------------------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--transition), border-bottom var(--transition);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nav__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  border-radius: 8px;
  letter-spacing: 0.01em;
}

.nav__logo-text {
  color: #fff;
}

.nav__logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

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

.nav__link {
  padding: 0.5rem 0.875rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav__link.cta-link {
  color: #fff;
  background: var(--accent);
  padding: 0.5rem 1rem;
}

.nav__link.cta-link:hover,
.nav__link.cta-link:focus-visible {
  background: var(--accent-light);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- Hero -------------------------------------------- */

.hero {
  position: relative;
  padding-top: 64px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__bg::after {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(108, 99, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(108, 99, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 99, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 3rem;
  max-width: 800px;
  margin-inline: auto;
}

.hero__video-wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin-inline: auto;
  margin-bottom: 5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(108, 99, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(108, 99, 255, 0.08), 0 32px 80px rgba(0, 0, 0, 0.5);
}

.hero__video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface);
}

.hero__badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  color: var(--accent-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero__title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----- Cards ------------------------------------------- */

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
  border-color: rgba(108, 99, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card__icon {
  width: 52px;
  height: 52px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
}

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

/* ----- Approach / Steps -------------------------------- */

.approach {
  background: var(--surface);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.step {
  position: relative;
}

.step__number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-light), rgba(108, 99, 255, 0.4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step__title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

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

/* ----- Built with Paperclip ---------------------------- */

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.agent-card:hover {
  border-color: rgba(108, 99, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.agent-card__role {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 0.5rem;
}

.agent-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.paperclip-quote {
  position: relative;
  border-left: 3px solid var(--accent);
  margin-inline: auto;
  max-width: 680px;
  padding: 1.75rem 2rem 1.75rem 2.5rem;
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
}

.paperclip-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem;
  left: 1.25rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
  font-family: Georgia, serif;
  pointer-events: none;
}

.paperclip-quote p {
  font-size: 1.0625rem;
  color: var(--text-body);
  line-height: 1.7;
  font-style: italic;
}

.paperclip-closing {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.6;
}

.paperclip-section {
  background: var(--surface);
}

.nav__link--active {
  color: #fff;
  background: rgba(108, 99, 255, 0.12);
}

/* ----- About ------------------------------------------- */

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

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

.about__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.about__text .section__title {
  text-align: left;
  margin-bottom: 1.25rem;
}

.about__text p {
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

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

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

.stat {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.stat__number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: -0.03em;
}

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

/* ----- Contact ----------------------------------------- */

.contact {
  background: var(--surface);
}

.contact__card {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  padding: 4rem 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(108, 99, 255, 0.12), 0 32px 80px rgba(0, 0, 0, 0.4);
}

.contact__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.contact__subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ----- Footer ------------------------------------------ */

.footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ----- Scroll animations ------------------------------- */

.js [data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ----- Responsive -------------------------------------- */

@media (min-width: 1024px) {
  .hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding-top: 9rem;
    padding-bottom: 4rem;
  }

  .hero__content {
    text-align: left;
    padding-top: 0;
    padding-bottom: 0;
    max-width: none;
    margin-inline: 0;
  }

  .hero__subtitle {
    margin-inline: 0;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__video-wrap {
    margin-bottom: 0;
    margin-inline: 0;
    max-width: none;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .hero__content {
    padding-top: 5rem;
  }

  .hero__video-wrap {
    max-width: 720px;
  }
}

@media (max-width: 1024px) {
  .section {
    padding-block: 5rem;
  }

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

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

@media (max-width: 900px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .stat {
    padding: 1.25rem;
  }

  .stat__number {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: 4rem;
  }

  .nav__links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 12, 16, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__link {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .nav__link.cta-link {
    margin-top: 0.5rem;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__content {
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

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

  .hero__video-wrap {
    margin-bottom: 3.5rem;
    border-radius: var(--radius);
  }

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

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

  .paperclip-quote {
    padding: 1.25rem 1.5rem;
  }

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

  .about__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .stat {
    padding: 1.25rem;
  }

  .stat__number {
    font-size: 1.5rem;
  }

  .contact__card {
    padding: 2.5rem 1.5rem;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .about__stats {
    grid-template-columns: 1fr;
  }

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

/* ----- Focus visible ----------------------------------- */

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 4px;
}
