/* Coat of Armour Enterprises — gateway + refined cinematic UI */

:root {
  --bg-deep: #ffffff;
  --bg-page: #f6f9fc;
  --bg-elevated: rgba(255, 255, 255, 0.92);
  --bg-card: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 251, 255, 0.96) 45%,
    rgba(241, 247, 253, 0.98) 100%
  );
  --border-subtle: rgba(30, 60, 100, 0.1);
  --border-glow: rgba(50, 120, 200, 0.28);
  --text-primary: #0f172a;
  --text-muted: rgba(51, 65, 85, 0.82);
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-glow: rgba(37, 99, 235, 0.22);
  --gold-mist: rgba(255, 200, 120, 0.12);
  --radius: 20px;
  --radius-lg: 28px;
  --transition: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Outfit", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-deep);
  background-image: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 55%, #eef4f9 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ——— Cinematic background ——— */
.cinematic-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #ffffff;
  isolation: isolate;
}

.cinematic-bg__solid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fc 50%, #e8f0fa 100%);
}

/* Edge depth only — must stay UNDER aurora / orbs / grid / particles */
.cinematic-bg__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 105% 90% at 50% 55%,
    transparent 48%,
    rgba(148, 163, 184, 0.07) 78%,
    rgba(100, 116, 139, 0.12) 100%
  );
}

.cinematic-bg__video {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  z-index: 2;
  opacity: 0.22;
  filter: saturate(1.15) contrast(1.05) brightness(1.08);
}

.cinematic-bg__beam {
  position: absolute;
  top: -40%;
  left: -40%;
  width: 55%;
  height: 180%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(37, 99, 235, 0.07) 38%,
    rgba(59, 130, 246, 0.18) 50%,
    rgba(37, 99, 235, 0.07) 62%,
    transparent 100%
  );
  transform: rotate(18deg);
  animation: beam-sweep 22s ease-in-out infinite;
  z-index: 3;
}

@keyframes beam-sweep {
  0%,
  100% {
    transform: rotate(18deg) translateX(-25%) translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: rotate(18deg) translateX(45%) translateY(3%);
    opacity: 1;
  }
}

.cinematic-bg__aurora {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(ellipse 100% 70% at 50% -8%, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(ellipse 85% 65% at 100% 25%, rgba(96, 165, 250, 0.32), transparent 50%),
    radial-gradient(ellipse 75% 60% at 0% 85%, rgba(37, 99, 235, 0.22), transparent 48%),
    radial-gradient(ellipse 50% 42% at 75% 95%, rgba(251, 191, 36, 0.14), transparent 55%);
  animation: aurora-shift 24s ease-in-out infinite alternate;
}

@keyframes aurora-shift {
  0% {
    filter: hue-rotate(0deg) saturate(1);
    transform: scale(1) translate(0, 0);
  }
  50% {
    filter: hue-rotate(10deg) saturate(1.08);
    transform: scale(1.03) translate(-0.5%, 0.8%);
  }
  100% {
    filter: hue-rotate(-6deg) saturate(1.02);
    transform: scale(1.01) translate(0.5%, -0.3%);
  }
}

.cinematic-bg__orbs {
  position: absolute;
  inset: -20%;
  z-index: 5;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.95;
  will-change: transform;
}

.orb--1 {
  width: min(58vw, 500px);
  height: min(58vw, 500px);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.42) 0%, rgba(147, 197, 253, 0.35) 38%, transparent 70%);
  top: 2%;
  left: 8%;
  animation: float-1 30s ease-in-out infinite;
}

.orb--2 {
  width: min(62vw, 540px);
  height: min(62vw, 540px);
  background: radial-gradient(circle, rgba(14, 165, 233, 0.32) 0%, rgba(125, 211, 252, 0.38) 40%, transparent 70%);
  bottom: -8%;
  right: -8%;
  animation: float-2 34s ease-in-out infinite;
}

.orb--3 {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  background: radial-gradient(
    circle,
    rgba(251, 191, 36, 0.28) 0%,
    rgba(59, 130, 246, 0.28) 42%,
    transparent 68%
  );
  top: 38%;
  left: 42%;
  animation: float-3 27s ease-in-out infinite;
}

/* WebGL particles — above orbs, under grid so structure + colour both read */
.cinematic-bg__particles {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
  opacity: 0.82;
}

@keyframes float-1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(6%, 10%) scale(1.06);
  }
  66% {
    transform: translate(-3%, 5%) scale(0.96);
  }
}

@keyframes float-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(-8%, -6%) scale(1.08);
  }
  80% {
    transform: translate(4%, -10%) scale(0.94);
  }
}

@keyframes float-3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-10%, -8%) scale(1.1);
  }
}

.cinematic-bg__grid {
  position: absolute;
  inset: 0;
  z-index: 7;
  background-image:
    linear-gradient(rgba(30, 58, 138, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 138, 0.09) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 92% 85% at 50% 45%, black 18%, transparent 78%);
  animation: grid-drift 48s linear infinite;
  opacity: 0.9;
}

@keyframes grid-drift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 56px 56px, 56px 56px;
  }
}

.cinematic-bg__grain {
  position: absolute;
  inset: 0;
  z-index: 8;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.45s steps(2) infinite;
}

@keyframes grain {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-0.8%, 0.8%);
  }
  100% {
    transform: translate(0.6%, -0.4%);
  }
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.25rem;
  background: var(--accent-deep);
  color: #ffffff;
  font-weight: 600;
  font-family: var(--font);
  border-radius: 10px;
  z-index: 100;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(1.85rem, 4.5vw, 3.5rem) clamp(1.1rem, 3.5vw, 2rem) 2.75rem;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: clamp(2.1rem, 5vw, 3.6rem);
  animation: rise-in 1.05s var(--ease-out-expo) both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-halo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  padding: clamp(1rem, 2.5vw, 1.35rem) clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 120% 100% at 50% 0%, rgba(147, 197, 253, 0.35), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 252, 0.95) 100%);
  border: 1px solid rgba(30, 60, 100, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 20px 48px -24px rgba(37, 99, 235, 0.15),
    0 8px 24px -8px rgba(15, 23, 42, 0.08);
  animation: logo-float 7s ease-in-out infinite;
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.enterprise-logo {
  display: block;
  max-width: min(292px, 80vw);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.12));
}

.site-header .eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.75);
}

.site-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
  background: linear-gradient(125deg, #0f172a 0%, #1e3a5f 42%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}

.site-header .tagline {
  margin: 0 auto;
  max-width: 36ch;
  font-size: clamp(0.94rem, 2.1vw, 1.08rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.site-header .tagline::after {
  content: "";
  display: block;
  width: min(100px, 36vw);
  height: 3px;
  margin: 1.35rem auto 0;
  border-radius: 100px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(37, 99, 235, 0.2) 15%,
    var(--accent) 50%,
    rgba(37, 99, 235, 0.2) 85%,
    transparent
  );
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.2);
  opacity: 0.95;
}

/* Company grid */
.companies {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.1rem, 3vw, 1.5rem);
}

@media (min-width: 640px) {
  .companies {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.15rem, 2.5vw, 1.45rem);
  }
}

.company-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(204px, 33vw, 268px);
  padding: clamp(1.35rem, 3.2vw, 2.1rem);
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 10px 40px -12px rgba(15, 23, 42, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 0 0 1px rgba(226, 232, 240, 0.9) inset;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    filter var(--transition);
  -webkit-tap-highlight-color: transparent;
  animation: card-rise 0.9s var(--ease-out-expo) both;
}

.company-card:nth-child(1) {
  animation-delay: 0.08s;
}

.company-card:nth-child(2) {
  animation-delay: 0.16s;
}

.company-card:nth-child(3) {
  animation-delay: 0.24s;
}

.company-card:nth-child(4) {
  animation-delay: 0.32s;
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.company-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.95) 0%,
    transparent 35%,
    transparent 65%,
    rgba(147, 197, 253, 0.45) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.65;
  transition: opacity 0.4s ease;
}

.company-card:hover::after,
.company-card:focus-visible::after {
  opacity: 1;
}

.company-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -10%, var(--accent-soft), transparent 58%);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 0;
  pointer-events: none;
}

.company-card:hover::before,
.company-card:focus-visible::before {
  opacity: 1;
}

.company-card:hover,
.company-card:focus-visible {
  transform: translateY(-6px) scale(1.012);
  border-color: var(--border-glow);
  filter: brightness(1.01);
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.12),
    0 20px 48px -16px var(--accent-glow),
    0 32px 64px -24px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 #ffffff;
}

.company-card:active {
  transform: scale(0.988);
  transition-duration: 0.15s;
}

.company-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.company-card .brand-block {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  flex: 1;
}

.company-card .logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(90px, 21vw, 124px);
}

.company-card img {
  max-width: min(282px, 90%);
  max-height: clamp(98px, 23vw, 136px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.55s var(--ease-out-expo);
  filter: drop-shadow(0 6px 16px rgba(15, 23, 42, 0.1));
}

.company-card:hover img,
.company-card:focus-visible img {
  transform: scale(1.07);
}

.company-card .company-label {
  margin: 0;
  max-width: 96%;
  font-size: clamp(0.7rem, 1.85vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
  color: rgba(51, 65, 85, 0.88);
}

/* Arrow */
.card-arrow {
  position: absolute;
  top: clamp(0.85rem, 2.2vw, 1.35rem);
  right: clamp(0.85rem, 2.2vw, 1.35rem);
  z-index: 2;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.95), rgba(191, 219, 254, 0.6));
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateX(-12px);
  transition:
    opacity var(--transition),
    transform var(--transition);
  pointer-events: none;
}

.company-card:hover .card-arrow,
.company-card:focus-visible .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.card-arrow svg {
  width: 19px;
  height: 19px;
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

@media (hover: none) {
  .card-arrow {
    opacity: 0.88;
    transform: translateX(0);
  }

  .company-card:active .card-arrow {
    transform: translate(3px, 3px);
  }
}

.site-footer {
  margin-top: clamp(2.5rem, 5.5vw, 3.75rem);
  padding-top: 1.75rem;
  text-align: center;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.6), transparent 65%);
}

.site-footer p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.75);
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-bg__beam,
  .cinematic-bg__aurora,
  .cinematic-bg__orbs .orb,
  .cinematic-bg__grid,
  .cinematic-bg__grain,
  .logo-halo,
  .site-header,
  .company-card {
    animation: none !important;
  }

  .site-header,
  .company-card {
    opacity: 1;
    transform: none;
  }

  .logo-halo {
    transform: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
