:root {
  --ink: #101522;
  --muted: #647083;
  --line: rgba(16, 21, 34, 0.14);
  --surface: #ffffff;
  --surface-soft: #f4f6f8;
  --night: #101522;
  --accent: #1d6f8f;
  --accent-2: #d8a739;
  --hero-overlay: rgba(7, 13, 24, 0.68);
  --hero-overlay-2: rgba(7, 13, 24, 0.25);
  --font:
    Inter,
    "IBM Plex Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: #f4f6f8;
  color-scheme: light;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(29, 111, 143, 0.11), transparent 28rem),
    linear-gradient(180deg, #fbfcfd 0%, #eef2f5 46%, #f8fafc 100%);
}

body.theme-navantia {
  --accent: #39a7d2;
  --accent-2: #f1bc4d;
  --night: #07162b;
  --hero-overlay: rgba(5, 15, 31, 0.72);
  --hero-overlay-2: rgba(3, 27, 46, 0.42);
}

body.theme-mahou {
  --accent: #d9001b;
  --accent-2: #f2bd5b;
  --night: #180c0f;
  --hero-overlay: rgba(31, 10, 14, 0.7);
  --hero-overlay-2: rgba(130, 0, 21, 0.24);
}

body.theme-hub {
  --accent: #0f766e;
  --accent-2: #d8a739;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: 3px;
  background: transparent;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 0 max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(18px);
}

.topbar.glass {
  position: fixed;
  left: 0;
  right: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(7, 13, 24, 0.54), rgba(7, 13, 24, 0.18));
}

.brand,
.nav {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-size: 0.93rem;
  font-weight: 850;
}

.brand img {
  width: auto;
  height: 32px;
}

.topbar.glass .brand img {
  filter: brightness(0) invert(1);
}

.nav {
  gap: 6px;
}

.nav a {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  color: currentColor;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0.72;
  transition:
    background-color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
  transform: translateY(-1px);
}

.theme-hub .nav a:hover {
  background: rgba(15, 118, 110, 0.08);
}

.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: clamp(34px, 6vw, 92px);
  align-items: end;
  min-height: calc(100svh - 68px);
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 124px) 0 clamp(52px, 8vw, 88px);
}

.hub-copy,
.hero-copy,
.section-head,
.video-copy {
  display: grid;
  gap: 18px;
}

.hub-copy h1 {
  max-width: 780px;
  font-size: clamp(3rem, 8vw, 6.6rem);
  font-weight: 850;
  line-height: 0.92;
}

.hub-copy h1 {
  max-width: 700px;
}

.client-hero h1 {
  max-width: 760px;
  font-size: clamp(2.85rem, 4.85vw, 4.85rem);
  font-weight: 850;
  line-height: 0.96;
}

.kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.client-hero .kicker,
.dark .kicker {
  color: color-mix(in srgb, var(--accent) 68%, #fff);
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
  line-height: 1.55;
}

.client-hero .lead {
  color: rgba(255, 255, 255, 0.82);
}

.hub-grid {
  display: grid;
  gap: 18px;
}

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

.hub-card {
  position: relative;
  min-height: 230px;
  display: grid;
  align-content: end;
  gap: 20px;
  padding: 26px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--night);
  color: #fff;
  isolation: isolate;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.hub-card.internal-card::after {
  background:
    linear-gradient(180deg, rgba(7, 13, 24, 0.22), rgba(7, 13, 24, 0.9)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent 9px
    );
}

.hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: saturate(0.96);
  transform: scale(1.02);
  transition: transform 420ms ease;
}

.hub-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 13, 24, 0.1), rgba(7, 13, 24, 0.82)),
    linear-gradient(90deg, rgba(7, 13, 24, 0.64), transparent);
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 58px rgba(16, 21, 34, 0.18);
}

.hub-card:hover::before {
  transform: scale(1.07);
}

.navantia-card::before {
  background-image: url("./assets/navantia-f110.jpg");
}

.mahou-card::before {
  background-image: url("./assets/mahou-hero.jpg");
}

.hub-card img {
  width: min(260px, 72%);
  height: auto;
}

.mahou-card img {
  width: min(270px, 78%);
  padding: 13px 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.hub-card span {
  max-width: 420px;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.15;
}

.client-hero {
  position: relative;
  min-height: 91svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.theme-mahou .hero-media {
  object-position: center 42%;
}

.hero-overlay {
  z-index: -2;
  background:
    linear-gradient(100deg, var(--hero-overlay) 0%, rgba(7, 13, 24, 0.54) 44%, var(--hero-overlay-2) 100%),
    linear-gradient(0deg, rgba(7, 13, 24, 0.74) 0%, transparent 38%);
}

.hero-overlay.warm {
  background:
    linear-gradient(100deg, var(--hero-overlay) 0%, rgba(62, 15, 20, 0.62) 48%, var(--hero-overlay-2) 100%),
    linear-gradient(0deg, rgba(18, 9, 12, 0.78) 0%, transparent 42%);
}

.client-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 26%;
  background: linear-gradient(180deg, transparent, #f4f6f8);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 370px);
  gap: clamp(26px, 4vw, 52px);
  align-items: end;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: 104px 0 clamp(24px, 4vw, 42px);
}

.client-mark {
  grid-column: 1 / -1;
  width: fit-content;
  max-width: min(360px, 68vw);
  padding: 15px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.22);
}

.client-mark.light {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.client-mark img {
  width: min(320px, 62vw);
  max-height: 82px;
  object-fit: contain;
}

.hero-copy {
  max-width: 820px;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 6px;
  font-weight: 850;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

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

.button.primary {
  background: #fff;
  color: var(--night);
}

.button.primary:hover {
  background: var(--accent-2);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.16);
}

.signal-ticket {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 13, 22, 0.52);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.18);
}

.signal-ticket span,
.signal-item span,
.asset-card span,
.question-grid span,
.plan-grid span,
.thread-node span,
.kpi-river span {
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-ticket strong {
  font-size: 1.72rem;
  line-height: 1.05;
}

.signal-ticket p {
  color: rgba(255, 255, 255, 0.75);
}

.signal-section,
.asset-section,
.meeting-section,
.plan-section,
.video-section,
.story-section {
  padding: clamp(70px, 9vw, 120px) 0;
}

.section-head,
.signal-grid,
.asset-layout,
.video-section,
.question-grid,
.plan-grid,
.digital-thread,
.kpi-river {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.section-head {
  max-width: 830px;
  margin-bottom: clamp(34px, 5vw, 56px);
}

.section-head h2,
.video-copy h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 850;
  line-height: 0.98;
}

.section-head p,
.video-copy p {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-head a,
.video-copy a,
.asset-card a,
.signal-item a {
  width: fit-content;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

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

.signal-item {
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 60px rgba(16, 21, 34, 0.06);
}

.signal-item.strong {
  background: var(--night);
  color: #fff;
}

.signal-item h3,
.asset-card h3,
.plan-grid h3 {
  font-size: 1.35rem;
  line-height: 1.12;
}

.signal-item p,
.asset-card p,
.question-grid p,
.plan-grid p,
.thread-node p {
  color: var(--muted);
}

.signal-item.strong p {
  color: rgba(255, 255, 255, 0.74);
}

.story-section.dark {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--night) 94%, var(--accent)) 0%, var(--night) 100%);
  color: #fff;
}

.story-section.dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 82%, transparent);
  pointer-events: none;
}

.dark .section-head p {
  color: rgba(255, 255, 255, 0.7);
}

.digital-thread {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.thread-node {
  min-height: 250px;
  display: grid;
  align-content: end;
  gap: 14px;
  padding: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.thread-node:last-child {
  border-right: 0;
}

.thread-node:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.thread-node strong {
  font-size: 1.5rem;
}

.thread-node p {
  color: rgba(255, 255, 255, 0.68);
}

.kpi-river {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.kpi-river div {
  min-height: 210px;
  display: grid;
  align-content: end;
  gap: 14px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.kpi-river div:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.1);
}

.kpi-river strong {
  font-size: 1.1rem;
  line-height: 1.12;
}

.asset-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: stretch;
}

.asset-layout.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.82fr);
}

.asset-layout.reverse .asset-image {
  order: 2;
}

.asset-image {
  min-height: 520px;
  position: sticky;
  top: 92px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--night);
}

.asset-image img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.03);
  transition: transform 580ms ease;
}

.asset-image:hover img {
  transform: scale(1.04);
}

.asset-image figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(7, 13, 24, 0.86));
  font-weight: 750;
}

.asset-list {
  display: grid;
  gap: 14px;
}

.asset-card {
  display: grid;
  gap: 15px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(16, 21, 34, 0.06);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.asset-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 24px 62px rgba(16, 21, 34, 0.1);
}

.video-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
}

.video-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: var(--night);
  box-shadow: 0 26px 70px rgba(16, 21, 34, 0.18);
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.question-grid,
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

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

.question-grid article,
.plan-grid article {
  min-height: 205px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.plan-grid article {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.68)),
    var(--surface);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 560ms ease,
    transform 560ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal]:nth-child(2) {
  transition-delay: 80ms;
}

[data-reveal]:nth-child(3) {
  transition-delay: 140ms;
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.08) translate3d(-1.2%, -0.8%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .topbar {
    min-height: 62px;
    padding-inline: 18px;
  }

  .nav {
    overflow-x: auto;
    justify-content: flex-end;
    max-width: 58vw;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .hub-hero,
  .hero-content,
  .signal-grid,
  .asset-layout,
  .asset-layout.reverse,
  .video-section,
  .digital-thread,
  .kpi-river,
  .question-grid,
  .plan-grid,
  .hub-grid.four-pack {
    grid-template-columns: 1fr;
  }

  .hub-hero,
  .section-head,
  .signal-grid,
  .asset-layout,
  .video-section,
  .question-grid,
  .plan-grid,
  .digital-thread,
  .kpi-river {
    width: min(100% - 34px, 720px);
  }

  .client-hero {
    min-height: auto;
  }

  .hero-content {
    width: min(100% - 34px, 720px);
    padding: 104px 0 70px;
  }

  .client-mark {
    max-width: 280px;
  }

  .signal-ticket {
    max-width: 520px;
  }

  .asset-layout.reverse .asset-image {
    order: 0;
  }

  .asset-image {
    position: relative;
    top: auto;
    min-height: 360px;
  }

  .asset-image img {
    min-height: 360px;
  }

  .thread-node,
  .kpi-river div {
    min-height: 170px;
  }

  .thread-node {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .thread-node:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 14px;
  }

  .brand span {
    display: none;
  }

  .brand img {
    height: 28px;
  }

  .topbar {
    gap: 10px;
  }

  .nav {
    max-width: calc(100vw - 78px);
  }

  .nav a {
    padding-inline: 8px;
    font-size: 0.78rem;
  }

  .hub-hero {
    min-height: calc(100svh - 62px);
    padding-top: 56px;
  }

  .client-hero {
    min-height: 88svh;
  }

  .hero-content {
    position: relative;
    padding: 96px 0 136px;
  }

  .hub-copy h1 {
    font-size: clamp(2.65rem, 14vw, 4.5rem);
    line-height: 0.95;
  }

  .client-hero h1 {
    font-size: clamp(2.48rem, 11vw, 3.8rem);
    line-height: 0.98;
  }

  .client-mark {
    padding: 12px 14px;
  }

  .client-mark img {
    max-height: 58px;
  }

  .signal-ticket strong {
    font-size: 1.05rem;
  }

  .signal-ticket {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    gap: 8px;
    padding: 15px 16px;
  }

  .signal-ticket p {
    display: none;
  }

  .signal-section,
  .asset-section,
  .meeting-section,
  .plan-section,
  .video-section,
  .story-section {
    padding: 64px 0;
  }

  .signal-item,
  .asset-card,
  .question-grid article,
  .plan-grid article {
    min-height: auto;
  }

  .asset-image,
  .asset-image img {
    min-height: 310px;
  }

  .video-section {
    gap: 28px;
  }
}
