/* INCUBE — one-page site
   Tokens follow the approved brand: one-colour logo, Midnight-led palette,
   Bronze only as an accent on dark grounds, Plus Jakarta Sans throughout. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-VF.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --midnight: #0B1C2C;
  --night: #081521;
  --slate: #485B6B;
  --slate-light: #9AA8B4;
  --stone: #EBE5DF;
  --white: #FFFFFF;
  --bronze: #C9A277;
  --bronze-deep: #9C7444;

  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  /* type scale, roughly a perfect fourth (1.333) */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.6vw, 3.5rem);
  --fs-hero: clamp(3rem, 1rem + 4vw, 4.75rem);

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --section: clamp(88px, 7rem + 4vw, 176px);
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--midnight);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd { margin: 0; }
h2 { font-size: var(--fs-h2); font-weight: 300; line-height: 1.1; letter-spacing: -0.015em; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--gutter); top: -60px; z-index: 100; padding: 10px 16px; background: var(--white); color: var(--midnight); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ── Buttons and links ─────────────────────────────────────────────── */
.button {
  display: inline-block;
  padding: 15px 28px;
  border: 1px solid var(--bronze);
  color: var(--white);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}
.button:hover { background: var(--bronze); color: var(--midnight); }

.text-link {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}
.text-link:hover { color: var(--bronze); }

/* ── Header ────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--white);
  transition: background-color 0.35s, box-shadow 0.35s;
}
.site-header.is-solid { background: rgba(11, 28, 44, 0.94); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(10px); }
/* full width like the hero, so the logo and the headline share one left edge */
.site-header__inner { max-width: none; display: flex; align-items: center; justify-content: space-between; height: 100%; }
.site-header__logo img { width: 140px; height: auto; }

.site-nav { display: flex; gap: clamp(24px, 3vw, 44px); }
.site-nav a { font-size: var(--fs-small); font-weight: 500; letter-spacing: 0.02em; text-decoration: none; opacity: 0.86; padding-block: 6px; }
.site-nav a:hover { opacity: 1; }
.site-nav__contact { color: var(--bronze); opacity: 1 !important; }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; color: inherit; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.2s;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto;
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--midnight);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0s 0.25s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity 0.25s, transform 0.25s var(--ease); }
  .site-nav a { font-size: 1.25rem; font-weight: 300; padding-block: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .site-header.menu-open { background: var(--midnight); }
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: max(640px, 100svh);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--night);
  overflow: hidden;
}
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* crop anchored left so Kingdom Centre stays clear of the headline */
.hero__media img { object-fit: cover; object-position: 0% 42%; }
.hero::after {
  /* keeps text above WCAG contrast on the bright skyline */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(8, 21, 33, 0.92) 0%, rgba(8, 21, 33, 0.55) 38%, rgba(8, 21, 33, 0) 70%),
    linear-gradient(to right, rgba(8, 21, 33, 0.55), rgba(8, 21, 33, 0) 55%);
}
/* pinned to the left gutter at every width so the text never drifts over Kingdom Centre */
.hero__content { max-width: none; position: relative; z-index: 1; padding-block: calc(var(--header-h) + 48px) clamp(56px, 9vh, 112px); }

.hero__title {
  display: flex; flex-direction: column;
  font-size: var(--fs-hero);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: clamp(28px, 4vh, 44px);
}
.hero__line { display: block; padding-left: clamp(18px, 2vw, 28px); }

/* the shared left edge the lines align to */
.hero__edge {
  position: absolute;
  left: var(--gutter);
  width: 1px;
  background: var(--bronze);
  top: calc(var(--header-h) + 48px);
  height: calc(var(--fs-hero) * 3 + 0.1em);
  transform-origin: top;
}

/* small screens: photo on top so the skyline stays visible, text below it */
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; }
  .hero__media { display: block; position: relative; height: 56svh; min-height: 340px; }
  .hero__media img { object-position: 36% 48%; }
  .hero::after { background: linear-gradient(to top, var(--night) 0%, var(--night) calc(100% - 56svh + 40px), rgba(8, 21, 33, 0) calc(100% - 56svh + 200px)); }
  .hero__content { margin-top: -96px; padding-top: 0; padding-bottom: 72px; }
  .hero__edge { top: 0; }
}

.hero__lead { max-width: 34em; padding-left: clamp(18px, 2vw, 28px); font-size: var(--fs-lead); line-height: 1.55; color: rgba(255, 255, 255, 0.86); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 36px; padding-left: clamp(18px, 2vw, 28px); }

/* the single orchestrated moment: lines arrive out of step, then align */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__line { transform: translateX(var(--from)); opacity: 0; }
  .js .hero__edge { transform: scaleY(0); }
  .js .hero__lead, .js .hero__actions { opacity: 0; }
  .js .is-aligned .hero__line {
    transform: none; opacity: 1;
    transition: transform 1.5s var(--ease), opacity 0.9s ease-out;
  }
  .js .is-aligned .hero__line:nth-child(2) { transition-delay: 0.08s; }
  .js .is-aligned .hero__line:nth-child(3) { transition-delay: 0.16s; }
  .js .is-aligned ~ .hero__lead, .js .is-aligned ~ .hero__actions { opacity: 1; transition: opacity 0.8s ease-out 1.2s; }
  .js .hero__content.is-ready .hero__edge { transform: scaleY(1); transition: transform 0.7s var(--ease) 1.15s; }
}

/* ── About ─────────────────────────────────────────────────────────── */
.about { padding-block: var(--section); background: var(--stone); }
.about__grid { display: grid; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about__text { max-width: 36em; }
.about__text h2 { margin-bottom: 36px; }
.about__text p + p { margin-top: 1.1em; }
.about__text p { color: #2A3A48; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 42% 50%; }
@media (min-width: 960px) { .about__grid { grid-template-columns: 1.05fr 0.95fr; } }

/* ── Capabilities ──────────────────────────────────────────────────── */
.capabilities { background: var(--midnight); color: var(--white); padding-top: var(--section); }
.capabilities__head { display: grid; gap: 20px 64px; margin-bottom: clamp(48px, 6vw, 88px); }
.capabilities__head p { max-width: 30em; color: var(--slate-light); align-self: end; }
@media (min-width: 960px) { .capabilities__head { grid-template-columns: 1fr 1fr; } }

.capabilities__list { display: grid; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.capability { display: grid; gap: 10px 64px; padding-block: 32px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.capability dt { font-size: var(--fs-h3); font-weight: 300; line-height: 1.25; }
.capability dd { color: var(--slate-light); max-width: 34em; }
@media (min-width: 960px) { .capability { grid-template-columns: 1fr 1fr; align-items: baseline; padding-block: 40px; } }

.band { display: block; margin-top: var(--section); }
.band img { width: 100%; height: clamp(320px, 42vw, 640px); object-fit: cover; object-position: 60% 60%; }

/* ── Group ─────────────────────────────────────────────────────────── */
.group { padding-block: var(--section); }
.group__head { display: grid; gap: 20px 64px; margin-bottom: clamp(48px, 6vw, 88px); }
.group__head p { max-width: 30em; color: var(--slate); align-self: end; }
@media (min-width: 960px) { .group__head { grid-template-columns: 1fr 1fr; } }

.group__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--midnight); }
.brand { padding: 28px 24px 8px 0; }
.brand + .brand { padding-left: 24px; border-left: 1px solid #D9D2CA; }
.brand__name { font-size: var(--fs-h3); font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.brand__role { margin-top: 10px; color: var(--slate); }
@media (max-width: 959px) {
  .group__list { grid-template-columns: 1fr 1fr; }
  .brand, .brand + .brand { padding: 24px 16px 24px 0; border-left: 0; }
  .brand:nth-child(even) { padding-left: 16px; border-left: 1px solid #D9D2CA; }
  .brand:nth-child(n + 3) { border-top: 1px solid #D9D2CA; }
}
@media (max-width: 480px) {
  .group__list { grid-template-columns: 1fr; }
  .brand:nth-child(even) { padding-left: 0; border-left: 0; }
  .brand:nth-child(n + 2) { border-top: 1px solid #D9D2CA; }
}

/* ── Contact ───────────────────────────────────────────────────────── */
.contact { position: relative; color: var(--white); background: var(--night); overflow: hidden; }
.contact__media, .contact__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact__media img { object-fit: cover; object-position: 30% 50%; }
.contact::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(8, 21, 33, 0.9) 0%, rgba(8, 21, 33, 0.6) 45%, rgba(8, 21, 33, 0.15) 100%); }
.contact__content { position: relative; z-index: 1; padding-block: clamp(120px, 16vw, 220px); }
.contact__content h2 { margin-bottom: 24px; }
.contact__content p { max-width: 28em; margin-bottom: 40px; color: rgba(255, 255, 255, 0.84); font-size: var(--fs-lead); }

/* ── Footer ────────────────────────────────────────────────────────── */
.site-footer { background: var(--night); color: var(--slate-light); font-size: var(--fs-small); }
.site-footer__inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px 20px; padding-block: 44px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.site-footer__tagline { color: var(--white); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { color: var(--white); }
@media (min-width: 900px) {
  .site-footer__inner { grid-template-columns: auto 1fr auto auto; gap: 32px; }
}

/* ── 404 ───────────────────────────────────────────────────────────────
   The hero's three lines, deliberately out of step. Hovering or focusing
   "Back to home" slides them onto the bronze edge: the page aligns as you
   head back. */
.nf-page { background: var(--night); }
.nf {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  color: var(--white);
  background: var(--night);
  overflow: hidden;
}
.nf__media { position: absolute; inset: 0 0 0 auto; width: 50%; display: block; }
.nf__media img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.nf__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, var(--night) 0%, rgba(8, 21, 33, 0.35) 45%, rgba(8, 21, 33, 0) 100%);
}
.nf__header { position: relative; z-index: 1; padding: 26px var(--gutter); }
.nf__header img { width: 140px; height: auto; }
.nf__content { position: relative; z-index: 1; align-self: end; padding: 0 var(--gutter) clamp(56px, 10vh, 120px); max-width: 760px; }
.nf__code { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.08em; color: var(--bronze); margin-bottom: 22px; }
/* the bronze edge belongs to the headline, so it stays beside it at every size */
.nf__title::before { content: ""; position: absolute; left: 0; top: 0.08em; bottom: 0.02em; width: 1px; background: var(--bronze); }
.nf__title { position: relative; display: flex; flex-direction: column; font-size: var(--fs-hero); font-weight: 300; line-height: 1; letter-spacing: -0.025em; margin-bottom: 32px; }
.nf__line { display: block; padding-left: clamp(18px, 2vw, 28px); transform: translateX(var(--off)); transition: transform 0.9s var(--ease); }
.nf__line:nth-child(2) { transition-delay: 0.05s; }
.nf__line:nth-child(3) { transition-delay: 0.1s; }
.nf:has(.nf__home:hover, .nf__home:focus-visible) .nf__line { transform: none; }
.nf__lead { max-width: 30em; padding-left: clamp(18px, 2vw, 28px); font-size: var(--fs-lead); line-height: 1.55; color: rgba(255, 255, 255, 0.84); }
.nf__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 34px; padding-left: clamp(18px, 2vw, 28px); }
@media (prefers-reduced-motion: reduce) { .nf__line { transition: none; } }
@media (max-width: 760px) {
  .nf__media { width: 100%; height: 42svh; inset: 0 0 auto 0; }
  .nf__media::after { background: linear-gradient(to top, var(--night) 0%, rgba(8, 21, 33, 0.2) 60%, rgba(8, 21, 33, 0.4) 100%); }
  .nf__content { padding-top: 34svh; }
  .nf__line { transform: translateX(calc(var(--off) * 0.5)); }
}
