/*
 * inablink theme frontend layer.
 *
 * Global design decisions should stay in theme.json whenever possible.
 * This file contains component-level styling and progressive enhancements.
 */

:root {
  --ib-shadow-soft: 0 24px 70px rgb(51 51 51 / 8%);
  --ib-radius-card: 28px;
  --ib-radius-small: 16px;
  --ib-transition: 180ms ease;
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

.ib-site-header {
  border-bottom: 1px solid var(--wp--preset--color--border);
  backdrop-filter: blur(18px);
}

.ib-site-header .wp-block-site-title a {
  text-decoration: none;
}

.ib-site-header {
  position: relative;
  z-index: 100;
}

.ib-site-header .wp-block-navigation {
  position: relative;
  z-index: 110;
}

.ib-site-header .wp-block-navigation .has-child {
  position: relative;
}

.ib-site-header .wp-block-navigation .has-child > .wp-block-navigation__submenu-container {
  margin-top: 0;
  min-width: 240px;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ib-radius-small);
  background: #fff;
  box-shadow: var(--ib-shadow-soft);
  padding: 0.45rem;
  z-index: 120;
}

.ib-site-header .wp-block-navigation .has-child > .wp-block-navigation__submenu-container::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 12px;
}

.ib-site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  border-radius: calc(var(--ib-radius-small) - 6px);
  padding: 0.65rem 0.8rem;
}

.ib-site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.ib-site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus {
  background: var(--wp--preset--color--soft);
}

.ib-site-footer {
  border-top: 1px solid var(--wp--preset--color--border);
}

.ib-section {
  padding-top: var(--wp--preset--spacing--2-xl);
  padding-bottom: var(--wp--preset--spacing--2-xl);
}

.ib-section--tight {
  padding-top: var(--wp--preset--spacing--xl);
  padding-bottom: var(--wp--preset--spacing--xl);
}

.ib-eyebrow {
  color: var(--wp--preset--color--inablink-green);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ib-hero {
  overflow: hidden;
  position: relative;
}

.ib-hero::before {
  content: "";
  position: absolute;
  inset: 8% -20% auto auto;
  width: clamp(260px, 42vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgb(63 187 119 / 18%);
  border-radius: 999px;
  pointer-events: none;
}

.ib-hero-visual {
  position: relative;
  min-height: 340px;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ib-radius-card);
  background:
    radial-gradient(circle at 35% 38%, rgb(63 187 119 / 18%) 0 14%, transparent 15%),
    linear-gradient(135deg, #fff 0%, var(--wp--preset--color--soft) 100%);
  box-shadow: var(--ib-shadow-soft);
  overflow: hidden;
}

.ib-hero-visual::before,
.ib-hero-visual::after {
  content: "";
  position: absolute;
  border: 2px solid rgb(51 51 51 / 12%);
  border-radius: 999px;
}

.ib-hero-visual::before {
  inset: 18% 22%;
}

.ib-hero-visual::after {
  inset: 33% 38%;
  background: var(--wp--preset--color--inablink-green);
  border-color: transparent;
  opacity: 0.85;
}

.ib-service-card,
.ib-reference-card,
.is-style-ib-card {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--ib-radius-card);
  background: #fff;
  box-shadow: 0 1px 0 rgb(51 51 51 / 4%);
  transition: transform var(--ib-transition), box-shadow var(--ib-transition), border-color var(--ib-transition);
}

.ib-service-card:hover,
.ib-reference-card:hover,
.is-style-ib-card:hover {
  border-color: rgb(63 187 119 / 38%);
  box-shadow: var(--ib-shadow-soft);
  transform: translateY(-4px);
}

.ib-icon-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: var(--wp--preset--color--inablink-green);
}

.ib-process-step {
  border-left: 2px solid var(--wp--preset--color--inablink-green);
  padding-left: var(--wp--preset--spacing--m);
}

.ib-cta-band {
  border-radius: calc(var(--ib-radius-card) + 12px);
  background:
    radial-gradient(circle at 85% 15%, rgb(63 187 119 / 20%) 0 18%, transparent 19%),
    var(--wp--preset--color--inablink-dark);
  color: #fff;
  overflow: hidden;
}

.ib-cta-band a {
  color: inherit;
}

.wp-block-button.is-style-ib-outline .wp-block-button__link {
  border: 1px solid currentColor;
  background: transparent;
  color: var(--wp--preset--color--inablink-dark);
}

.ib-cta-band .wp-block-button.is-style-ib-outline .wp-block-button__link {
  color: #fff;
}

.ib-muted {
  color: var(--wp--preset--color--muted);
}

.ib-motion .ib-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.ib-motion .ib-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 781px) {
  .ib-section {
    padding-top: var(--wp--preset--spacing--xl);
    padding-bottom: var(--wp--preset--spacing--xl);
  }

  .ib-site-header .wp-block-group {
    gap: var(--wp--preset--spacing--s);
  }
}
