/* Components — header, footer, buttons, cards, cookie banner */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  background: var(--color-header);
  color: var(--color-text-light);
  transition: box-shadow var(--motion-duration-normal) var(--motion-ease);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-md);
}

.wordmark,
.site-header__brand,
.site-footer__wordmark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(16px, 1.35vw, 20px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text-light);
  white-space: nowrap;
}

.site-header__nav {
  display: none;
  align-items: center;
  gap: var(--space-md);
}

.primary-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: clamp(16px, 2vw, 28px);
}

.primary-menu a {
  font: var(--font-label-nav);
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--color-text-light);
}

.primary-menu a:hover {
  opacity: 1;
  color: var(--color-accent);
}

a.site-header__cta.btn {
  display: none;
  min-height: 48px;
  padding: 12px 26px;
  background: var(--color-accent);
  color: #111111;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255, 196, 0, 0.35);
}

a.site-header__cta.btn:hover {
  background: var(--color-accent-hover);
  opacity: 1;
  transform: translateY(-1px);
}

.site-header__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  margin-left: auto;
}

.site-header__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-light);
  margin-inline: auto;
  transition: transform 200ms var(--motion-ease), opacity 200ms var(--motion-ease);
}

.site-header.is-nav-open .site-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header.is-nav-open .site-header__nav {
  display: flex;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  padding: var(--space-md);
  background: var(--color-header);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header.is-nav-open .primary-menu {
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 900px) {
  .site-header__toggle {
    display: none;
  }

  .site-header__nav {
    display: flex;
    flex: 1;
    justify-content: center;
  }

  a.site-header__cta.btn {
    display: inline-flex;
  }

  .site-header.is-nav-open .site-header__nav {
    position: static;
    flex-direction: row;
    padding: 0;
    border: 0;
  }

  .site-header.is-nav-open .primary-menu {
    flex-direction: row;
  }
}

@media (max-width: 899px) {
  .site-header__brand {
    font-size: 13px;
    letter-spacing: 0.06em;
    max-width: calc(100% - 56px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--radius-button);
  font: var(--font-label-cta);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--motion-duration-normal) var(--motion-ease),
    background-color var(--motion-duration-fast) var(--motion-ease),
    box-shadow var(--motion-duration-normal) var(--motion-ease);
}

.btn--primary {
  background: var(--color-secondary);
  color: var(--color-on-secondary);
}

.btn--primary:hover {
  background: var(--color-secondary-hover);
  opacity: 1;
}

.btn--outline {
  background: transparent;
  color: var(--color-on-primary);
  border-color: var(--color-on-primary);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.platform-button:hover {
  transform: scale(1.02);
}

.platform-button:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .platform-button:hover,
  .platform-button:active {
    transform: none;
  }
}

/* Cards */
.service-card,
.blog-card {
  background: var(--color-surface-lowest);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-soft);
  overflow: hidden;
  transition: transform var(--motion-duration-normal) var(--motion-ease),
    box-shadow var(--motion-duration-normal) var(--motion-ease);
}

.service-card:hover,
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(26, 26, 26, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .service-card:hover,
  .blog-card:hover {
    transform: none;
  }
}

.blog-card__body {
  padding: var(--space-md);
}

.blog-card__title {
  font: var(--font-headline-card);
  margin: 0.5em 0;
}

.blog-card__title a {
  text-decoration: none;
}

.blog-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Footer */
.site-footer {
  background: var(--color-surface-dark);
  color: var(--color-on-surface-dark);
  padding-block: var(--space-xl) var(--space-lg);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  opacity: 0.8;
}

.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.site-footer__heading {
  font: var(--font-label-nav);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 var(--space-sm);
  font-size: 12px;
  opacity: 0.7;
}

.footer-nav__list,
.footer-contacts__list,
.footer-social__list,
.footer-legal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer__tagline {
  margin: var(--space-sm) 0;
  font: var(--font-body-sm);
  opacity: 0.85;
}

.site-footer__badge {
  font: var(--font-body-sm);
  opacity: 0.6;
}

.site-footer__legal {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
  align-items: center;
  font: var(--font-body-sm);
}

.footer-legal__entity {
  opacity: 0.7;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-cookie-banner);
  background: var(--color-surface-dark);
  color: var(--color-on-surface-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--space-md);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  justify-content: space-between;
}

.cookie-banner__text {
  margin: 0;
  flex: 1 1 280px;
  font: var(--font-body-sm);
}

.cookie-banner__text a {
  color: var(--color-secondary);
}

.cookie-banner__accept {
  flex-shrink: 0;
}

/* CTA strip (single) */
.cta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-lg);
  background: var(--color-surface-container);
  border-radius: var(--radius-card);
  margin-block: var(--space-lg);
}

/* Hero — CSS gradient + cutout + skyline (isolated from global .btn) */
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(620px, 74vh, 760px);
  padding-block: 0;
  color: var(--color-text-light);
  overflow: hidden;
  background: var(--color-hero-dark);
}

.hero.section {
  padding-block: 0;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 25% 45%,
      rgba(15, 70, 185, 0.75) 0%,
      rgba(5, 25, 79, 0) 55%
    ),
    linear-gradient(
      110deg,
      var(--color-hero-dark) 0%,
      var(--color-hero-middle) 55%,
      var(--color-hero-bright) 100%
    );
}

.hero__skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  /* Full skyline height (asset 2016×515) — avoid object-fit:cover crop line */
  width: 100%;
  height: calc(100vw * 515 / 2016);
  max-height: min(42vh, 420px);
  pointer-events: none;
  line-height: 0;
  opacity: 0.36;
}

.hero__skyline-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  max-width: none;
}

.hero__inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.95fr);
  align-items: center;
  column-gap: clamp(56px, 7vw, 96px);
  min-height: inherit;
  padding-block: 0;
}

.hero__content {
  align-self: center;
  width: 100%;
  max-width: 640px;
  margin: 0;
  padding: 0;
  padding-right: clamp(8px, 1.5vw, 20px);
  transform: translateY(-16px);
  z-index: 5;
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(38px, 4.35vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--color-text-light);
  max-width: 100%;
}

.hero__title-line {
  display: block;
}

@media (min-width: 900px) {
  .hero__title-line {
    white-space: nowrap;
  }
}

.hero__subtitle {
  margin: 0 0 1.5rem;
  font-family: var(--font-body);
  font-size: clamp(18px, 1.15vw, 20px);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  max-width: 620px;
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin: 0;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  min-width: 44px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    transform 200ms var(--motion-ease),
    background-color 200ms var(--motion-ease),
    border-color 200ms var(--motion-ease),
    color 200ms var(--motion-ease);
}

.hero-btn:hover {
  opacity: 1;
}

.hero-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.hero-btn--primary {
  background: var(--color-accent);
  color: #111111;
}

.hero-btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

.hero-btn--primary:active {
  transform: translateY(0);
}

.hero-btn--ghost {
  background: transparent;
  color: var(--color-text-light);
  border-color: rgba(247, 247, 244, 0.9);
}

.hero-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.hero-btn__icon {
  flex-shrink: 0;
}

.hero__figure {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  align-self: end;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin-right: clamp(-8px, -1vw, 0);
  pointer-events: none;
  opacity: 1;
}

.hero__photo,
.hero__photo-fallback {
  display: block;
  width: auto;
  max-width: min(100%, 560px);
  height: clamp(520px, 96%, 780px);
  max-height: 100%;
  margin-bottom: 0;
  object-fit: contain;
  object-position: right bottom;
  filter: none;
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
}

.hero__photo-fallback {
  width: min(100%, 360px);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px 12px 0 0;
}

.hero__canvas,
.hero__banner,
.hero__shade {
  display: none;
}

@media (max-width: 1279px) {
  .hero {
    min-height: clamp(600px, 70vh, 700px);
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.95fr);
    column-gap: clamp(48px, 6vw, 80px);
  }

  .hero__title {
    font-size: clamp(34px, 3.6vw, 56px);
  }

  .hero__content {
    max-width: 580px;
  }

  .hero__photo,
  .hero__photo-fallback {
    max-width: min(100%, 500px);
    height: clamp(420px, 90%, 680px);
  }

  .hero__skyline {
    height: calc(100vw * 515 / 2016);
    max-height: min(38vh, 360px);
  }
}

@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.95fr);
    column-gap: clamp(40px, 5vw, 64px);
  }

  .hero__title {
    font-size: clamp(30px, 3.4vw, 46px);
  }

  .hero__content {
    max-width: 520px;
  }

  .hero__photo,
  .hero__photo-fallback {
    max-width: min(100%, 420px);
    height: clamp(380px, 86%, 580px);
  }

  .hero__skyline {
    height: calc(100vw * 515 / 2016);
    max-height: min(34vh, 300px);
  }
}

@media (max-width: 899px) {
  .hero {
    min-height: 0;
    height: auto;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    padding-top: 28px;
    padding-bottom: 0;
  }

  .hero__content {
    align-self: start;
    width: 100%;
    max-width: none;
    padding-right: 0;
    transform: none;
  }

  .hero__title {
    font-size: clamp(36px, 9.5vw, 48px);
    max-width: none;
  }

  .hero__title-line {
    white-space: normal;
  }

  .hero__subtitle {
    max-width: none;
    font-size: 18px;
  }

  .hero__cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-btn {
    width: 100%;
  }

  .hero__figure {
    justify-content: center;
    z-index: 2;
    min-height: 300px;
    margin-right: 0;
  }

  .hero__photo,
  .hero__photo-fallback {
    max-width: min(78vw, 380px);
    height: clamp(320px, 62vw, 440px);
    margin-inline: auto;
    object-position: center bottom;
  }

  .hero__skyline {
    height: calc(100vw * 515 / 2016);
    max-height: min(32vh, 240px);
    z-index: 1;
    opacity: 0.32;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(32px, 9vw, 42px);
  }

  .hero__skyline {
    height: calc(100vw * 515 / 2016);
    max-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-btn--primary:hover,
  .hero-btn--ghost:hover,
  a.site-header__cta.btn:hover {
    transform: none;
  }
}

/* Section color bands — hard-edge transitions */
[data-section-transition="hard-edge"] {
  /* Visual break handled by adjacent section backgrounds in Page Builder */
}

[data-section-transition="flush"] {
  /* Flush with previous section */
}
