:root {
  --bg: #ffffff;
  --panel: #fafafa;
  --line: #eaeaea;
  --line-strong: #d1d1d1;
  --text: #111111;
  --muted: #6b7280;
  --accent: #0070f3;
  --accent-2: #7c3aed;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  color: var(--text);
  background: #ffffff;
  overflow-x: hidden;
}

.noise,
.ambient {
  display: none;
}

.site-header,
.hero,
.grid,
.service,
.strip,
.proof,
.blog-section,
.footer {
  width: min(980px, 92vw);
  margin: 0 auto;
}

.site-header {
  width: 100%;
  padding: 14px 4vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.brand img {
  width: 148px;
  height: auto;
  display: block;
}

.top-nav {
  display: flex;
  gap: 20px;
  justify-self: center;
}

.top-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 150ms ease, background 150ms ease;
  padding: 4px 10px;
  border-radius: 6px;
}

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

.top-nav a[aria-current="page"] {
  color: #ffffff;
  font-weight: 700;
  background: var(--text);
}

/* Hamburger toggle button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 150ms ease;
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 220ms ease, opacity 180ms ease;
}

.site-header.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.site-header.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  padding: 82px 0 68px;
  text-align: center;
}

.kicker {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 14px;
  font-size: 0.8rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6.2vw, 4.8rem);
  line-height: 0.95;
  text-wrap: balance;
  max-width: 12ch;
  color: var(--text);
}

.lede {
  max-width: 60ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-carousel {
  position: relative;
  margin-top: 2px;
  width: 100%;
  max-width: 100%;
}

.hero-carousel-frame {
  position: relative;
  min-height: clamp(10rem, 24vw, 18rem);
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-message {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.45rem, 4.1vw, 3.6rem);
  line-height: 1;
  text-wrap: balance;
  max-width: 20ch;
  text-align: center;
  margin-inline: auto;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 320ms ease, transform 320ms ease;
  pointer-events: none;
  position: absolute;
  inset: 0;
  padding: clamp(22px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-message.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-carousel-nav {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 150ms ease;
}

.hero-arrow:hover {
  border-color: var(--line-strong);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 26px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  transition: all 150ms ease;
}

.hero-dot.is-active {
  background: var(--text);
  border-color: var(--text);
}

.cta-row {
  margin-top: 38px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 160ms ease, transform 160ms ease;
  display: inline-flex;
  align-items: center;
}

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

.btn--small {
  padding: 8px 14px;
  font-size: 0.88rem;
}

.btn--primary {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.btn--primary:hover {
  background: #333333;
  border-color: #333333;
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: #ffffff;
}

.btn--ghost:hover {
  background: #f5f5f5;
}

.lang-switch {
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: transparent;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.88rem;
  background: #ffffff;
  position: relative;
  min-width: 3.8rem;
  text-align: center;
}

.lang-switch::before,
.lang-switch::after {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
  color: var(--text);
  line-height: 1;
}

.lang-switch::before {
  content: attr(data-current);
  opacity: 1;
}

.lang-switch::after {
  content: attr(data-next);
  opacity: 0;
  transform: translate(-50%, -36%);
}

.lang-switch:hover::before {
  opacity: 0;
  transform: translate(-50%, -64%);
}

.lang-switch:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.metrics {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.metrics strong {
  color: var(--text);
  font-size: 1.15rem;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 40px;
}

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transform: translateY(12px);
  opacity: 0;
  animation: rise 0.6s ease forwards;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05), 0 6px 24px rgba(0, 0, 0, 0.04);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 12px 36px rgba(0, 0, 0, 0.07);
}

.card:nth-child(2) {
  animation-delay: 0.12s;
}

.card:nth-child(3) {
  animation-delay: 0.2s;
}

.card-tag {
  margin: 0 0 8px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: var(--text);
}

.card p {
  margin: 0;
  color: var(--muted);
  margin-inline: auto;
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-link:hover {
  text-decoration: underline;
}

.home-grid {
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 72px;
}

.home-grid .card {
  padding: clamp(22px, 4vw, 42px);
  border-radius: 16px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  position: relative;
}

.home-grid .card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-visual {
  width: calc(100% + 2 * clamp(22px, 4vw, 42px));
  margin-left: calc(-1 * clamp(22px, 4vw, 42px));
  margin-right: calc(-1 * clamp(22px, 4vw, 42px));
  margin-top: calc(-1 * clamp(22px, 4vw, 42px));
  margin-bottom: clamp(18px, 3vw, 28px);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: #f0f2f5;
  border-bottom: 1px solid var(--line);
}

.home-grid .card h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  margin-bottom: 14px;
}

.home-grid .card p {
  max-width: 42ch;
}

.home-grid .card-link {
  margin-top: 18px;
}

.service {
  margin-bottom: 40px;
}

.service h2,
.blog-section h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  color: var(--text);
}

.service > p {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 75ch;
  margin-inline: auto;
}

.service-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card,
.blog-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 200ms ease;
  text-align: left;
}

.service-card:hover,
.blog-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 8px 28px rgba(0, 0, 0, 0.06);
}

.blog-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.service-card h3,
.blog-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--text);
}

.service-card ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.service-card li + li {
  margin-top: 7px;
}

.service-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.strip-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.strip-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Breadcrumb */
.breadcrumb {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 10px 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

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

.breadcrumb span.bc-current {
  color: var(--text);
  font-weight: 500;
}

.blog-section {
  margin-bottom: 60px;
}

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

.blog-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.blog-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.strip {
  margin-bottom: 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  background: #fafafa;
}

.strip h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  color: var(--text);
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.strip-grid p {
  margin: 0;
  color: var(--muted);
}

.proof {
  margin-bottom: 80px;
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
}

.footer {
  padding: 12px 0 48px;
  text-align: center;
}

.footer-logo {
  width: 180px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
}

.footer h2 {
  font-size: 2rem;
  margin: 0 0 8px;
  color: var(--text);
}

.footer p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.article-wrap {
  width: min(980px, 92vw);
  margin: 40px auto 80px;
}

.article-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-wrap h1 {
  max-width: none;
  text-align: center;
}

.article-wrap h2 {
  margin: 28px 0 8px;
  font-size: 1.5rem;
  color: var(--text);
}

.article-wrap p {
  color: var(--muted);
  line-height: 1.62;
  max-width: 75ch;
  margin-left: auto;
  margin-right: auto;
}

.article-wrap ul {
  color: var(--muted);
  line-height: 1.62;
  max-width: 75ch;
  margin: 0 auto;
  padding-left: 1.4em;
}

.article-wrap li + li {
  margin-top: 7px;
}

.article-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin: 10px 0 18px;
  display: block;
}

.article-back {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.article-lede {
  font-size: 1.1rem;
  text-align: center;
  color: var(--muted);
}

.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;
}

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

.hero-dot:focus-visible {
  outline-offset: 2px;
  border-radius: 999px;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0px);
  }
}

@media (max-width: 840px) {
  .site-header {
    grid-template-columns: 1fr auto;
    position: relative;
  }

  .top-nav {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px 20px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
    z-index: 19;
  }

  .site-header.is-open .top-nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .top-nav a {
    padding: 10px 12px;
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

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

  .service-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

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

  .metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero {
    padding-top: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-message {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
