/* Code Fusion Tech — design system */
:root {
  --color-brand: #0a4db3;
  --color-brand-deep: #063a8a;
  --color-accent: #0d8f9a;
  --color-ink: #142033;
  --color-ink-muted: #4a5568;
  --color-surface: #f7f9fc;
  --color-surface-elevated: #ffffff;
  --color-line: rgba(20, 32, 51, 0.1);
  --color-hero-start: #e8f1fb;
  --color-hero-mid: #d4e8f0;
  --color-hero-end: #f0f4f8;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "Outfit", system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 12px 40px rgba(10, 77, 179, 0.08);
  --shadow-card: 0 8px 28px rgba(20, 32, 51, 0.07);
  --max-width: 1100px;
  --nav-height: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-brand-deep);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Layout —— */
.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.site-header .nav {
  position: relative;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-line);
  box-shadow: 0 4px 20px rgba(20, 32, 51, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--nav-height);
  gap: 0.75rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-decoration: none;
  margin-right: auto;
}

.logo:hover {
  color: var(--color-brand);
}

.logo span {
  color: var(--color-brand);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-ink-muted);
  text-decoration: none;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--color-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-ink);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface-elevated);
}

.lang-switch a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--color-ink-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  line-height: 1;
}

.lang-switch a:hover {
  color: var(--color-ink);
}

.lang-switch a.is-active {
  background: var(--color-brand);
  color: #fff;
}

.lang-switch a.is-active:hover {
  color: #fff;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  background: var(--color-brand);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none !important;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--color-brand-deep);
  color: #fff !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface-elevated);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 1px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.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;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 0 5rem;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(13, 143, 154, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 15% 80%, rgba(10, 77, 179, 0.16), transparent 50%),
    linear-gradient(165deg, var(--color-hero-start) 0%, var(--color-hero-mid) 45%, var(--color-hero-end) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230a4db3' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.9;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  color: var(--color-ink);
}

.hero-brand .accent {
  color: var(--color-brand);
}

.hero-headline {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 0.85rem;
  color: var(--color-ink);
}

.hero-support {
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  color: var(--color-ink-muted);
  margin: 0 0 2rem;
  max-width: 34rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-brand-deep);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-ink);
  border-color: rgba(20, 32, 51, 0.2);
}

.btn-secondary:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

/* Platform strip */
.platform-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.platform-strip-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.platform-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink);
}

.platform-icon svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.platform-icon--android svg {
  color: #3ddc84;
}

.platform-icon--ios svg {
  color: var(--color-ink);
}

/* Motion: hero reveal */
.reveal {
  opacity: 1;
  transform: translateY(12px);
  animation: revealUp 0.7s var(--ease-out) forwards;
}

.reveal-delay-1 {
  animation-delay: 0.1s;
}

.reveal-delay-2 {
  animation-delay: 0.2s;
}

.reveal-delay-3 {
  animation-delay: 0.3s;
}

.reveal-delay-4 {
  animation-delay: 0.4s;
}

@keyframes revealUp {
  from {
    opacity: 0.35;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* —— Sections —— */
.section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.section-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  line-height: 1.15;
}

.section-desc {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: 1.0625rem;
}

/* —— Apps showcase —— */
.apps-section {
  background: var(--color-surface-elevated);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.apps-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .apps-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.app-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(10, 77, 179, 0.25);
}

.app-card-top {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
  box-shadow: 0 4px 12px rgba(20, 32, 51, 0.1);
}

.app-meta h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.app-platforms {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.app-platforms .platform-icon svg {
  width: 18px;
  height: 18px;
}

.app-platforms .platform-icon span {
  display: none;
}

.app-stats {
  font-size: 0.8125rem;
  color: var(--color-ink-muted);
  font-weight: 500;
}

.app-stats strong {
  color: var(--color-ink);
  font-weight: 600;
}

.app-desc {
  margin: 0 0 1.5rem;
  color: var(--color-ink-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  flex-grow: 1;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.store-badge {
  display: inline-block;
  transition: opacity 0.2s, transform 0.2s var(--ease-out);
  line-height: 0;
}

.store-badge:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.store-badge img {
  height: 40px;
  width: auto;
}

.store-badge img[src*="google-play"] {
  height: 60px;
  margin: -10px 0 -10px -10px;
}

/* —— Contact —— */
.contact-section {
  background:
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(10, 77, 179, 0.08), transparent 50%),
    var(--color-surface);
}

.contact-panel {
  display: grid;
  gap: 2rem;
}

@media (min-width: 700px) {
  .contact-panel {
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
  }
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-ink);
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s var(--ease-out), transform 0.2s;
}

.contact-link:hover {
  border-color: rgba(10, 77, 179, 0.35);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  color: var(--color-brand);
}

.contact-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-brand);
}

.contact-link small {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-ink-muted);
  margin-top: 0.15rem;
}

/* —— Footer —— */
.site-footer {
  background: var(--color-ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.75rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
  margin: 0 0 0.35rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
}

.footer-copy a {
  color: rgba(255, 255, 255, 0.9);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-platforms {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
}

.footer-platforms .platform-strip-label {
  color: rgba(255, 255, 255, 0.5);
}

.footer-platforms .platform-icon {
  color: rgba(255, 255, 255, 0.85);
}

.footer-platforms .platform-icon--android svg {
  color: #3ddc84;
}

.footer-platforms .platform-icon--ios svg {
  color: #fff;
}

/* —— Mobile nav —— */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    width: 100vw;
    margin-left: -50vw;
    background: var(--color-surface-elevated);
    border-bottom: 1px solid var(--color-line);
    padding: 1rem 1.25rem 1.25rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-soft);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links li {
    border-bottom: 1px solid var(--color-line);
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 0.75rem;
    justify-content: center;
    width: 100%;
  }

  .lang-switch {
    order: 2;
    margin-left: 0;
  }

  .nav-toggle {
    order: 3;
  }

  .nav-menu {
    order: 4;
  }

  .hero {
    min-height: auto;
    padding: 3rem 0 4rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}
