/* ==========================================================================
   FactorAI - Redesign based on the Verdentix layout system
   Design tokens are a 1:1 port of the template scale; only the brand hues
   are swapped for the FactorAI palette taken from factor-ai.ch
   ========================================================================== */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Colors - roles from the template, hues from factor-ai.ch */
  --background: #ffffff;
  --foreground: #111118;
  --surface-dark: #16161e;
  --brand-primary: #098acb;
  --brand-primary-dark: #0770a8;
  --brand-secondary: #f1f5f8;
  --text-primary: var(--foreground);
  --text-secondary: color-mix(in srgb, var(--foreground) 85%, var(--background) 15%);
  --border: color-mix(in srgb, var(--foreground) 10%, var(--background) 90%);
  --border-invert: rgba(255, 255, 255, 0.18);

  /* Typography - identical scale to the template */
  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semi: 600;

  --h1-size: 4rem;
  --h1-lh: 1.1;
  --h1-ls: -0.03em;
  --h2-size: 2.5rem;
  --h2-lh: 1.2;
  --h2-ls: -0.02em;
  --h3-size: 2rem;
  --h3-lh: 1.3;
  --h3-ls: -0.015em;
  --h4-size: 1.5rem;
  --h4-lh: 1.3;
  --h4-ls: -0.01em;
  --text-body: 1.25rem;
  --text-large: 1.5rem;
  --text-small: 1.125rem;

  /* Sizing */
  --container: 1440px;
  --section-pad-x: 24px;
  --section-pad-y: 80px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 64px;
  --space-2xl: 80px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 100vw;

  /* Workspaces list - read by main.js to place the indicator */
  --ws-item-h: 56px;
  --ws-item-h-active: 112px;
  --ws-indicator-h: 122px;

  /* Motion - eases lifted from the template's interactions */
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-roll: cubic-bezier(0.625, 0.05, 0, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--background);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: var(--text-body);
  font-weight: var(--fw-normal);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1 {
  font-size: var(--h1-size);
  line-height: var(--h1-lh);
  letter-spacing: var(--h1-ls);
  font-weight: var(--fw-medium);
}
h2 {
  font-size: var(--h2-size);
  line-height: var(--h2-lh);
  letter-spacing: var(--h2-ls);
  font-weight: var(--fw-medium);
}
h3 {
  font-size: var(--h3-size);
  line-height: var(--h3-lh);
  letter-spacing: var(--h3-ls);
  font-weight: var(--fw-medium);
}
h4 {
  font-size: var(--h4-size);
  line-height: var(--h4-lh);
  letter-spacing: var(--h4-ls);
  font-weight: var(--fw-medium);
}

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

::selection { background: var(--brand-primary); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--foreground);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Layout shell: every section sits in a 16px frame with a rounded box inside
   -------------------------------------------------------------------------- */
.section-inner {
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow: hidden;
}
.section-inner--full { min-height: 100vh; }

.section-box {
  position: relative;
  border-radius: var(--radius-lg);
  background-color: var(--brand-secondary);
  overflow: hidden;
}
.section-box--dark {
  background-color: var(--foreground);
  color: var(--background);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

.section-padding { padding: var(--section-pad-y) 0; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 20px 8px 16px;
  border: 0;
  border-radius: var(--radius-full);
  background-color: var(--brand-primary);
  color: var(--background);
  font-family: inherit;
  font-size: var(--text-small);
  font-weight: var(--fw-normal);
  line-height: 150%;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.4s var(--ease-out-quart), background-color 0.4s var(--ease-out-quart);
}
.button:hover { background-color: var(--brand-primary-dark); }

.button--ghost {
  border: 1px solid var(--border);
  background-color: transparent;
}
.button--ghost:hover {
  background-color: var(--background);
  color: var(--foreground);
}
.button--ghost-light {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.button--white {
  background-color: var(--background);
  color: var(--foreground);
}
.button--white:hover { background-color: #e9edf1; }

/* "special" variant carries the expanding circle behind the icon */
.button--special { padding: 4px 4px 4px 16px; }

.button__layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px;
  border-radius: var(--radius-full);
  pointer-events: none;
}
.button__layer-bg {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--background);
}

.button--special.button--white .button__layer-bg { background-color: var(--foreground); }
.button--special.button--white .button__icon { color: var(--background); }

.button__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.button__text {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;
  letter-spacing: -0.03em;
}
.button__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}
.button__icon-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 16px;
  height: 16px;
  overflow: hidden;
}
.button__icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--brand-primary);
  transition: transform 0.5s var(--ease-out-quart);
}
.button--special:hover .button__icon { transform: translateX(100%); }

/* inline text link with a nudging arrow */
.button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-md);
  padding: 8px 0;
  font-size: var(--text-small);
}
.button-link__icon {
  width: 16px;
  height: 16px;
  transition: transform 0.5s var(--ease-out-expo);
}
.button-link:hover .button-link__icon { transform: translateX(8px); }

/* --------------------------------------------------------------------------
   Chips + badges
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 6px;
  border: 1px solid var(--border);
  border-radius: 50vh;
  font-size: var(--text-small);
  line-height: 1.5;
}
.chip--dark { border-color: var(--foreground); color: var(--foreground); }
.chip--light { border-color: var(--background); color: var(--background); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background-color: var(--background);
  color: var(--foreground);
  font-size: var(--text-body);
}
.badge__icon { width: 20px; height: 20px; color: var(--brand-primary); }

.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--brand-primary);
  color: #fff;
  flex: 0 0 auto;
}
.icon-circle svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Navbar - floating dark pill
   -------------------------------------------------------------------------- */
/* the template never hides the bar, it only pulls it 16px closer once scrolled */
.navbar {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  width: 100%;
  transition: transform 0.5s var(--ease-out-expo);
}
.navbar.is-scrolled { transform: translateY(-16px); }

.navbar__island {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-full);
  background-color: var(--foreground);
  color: var(--background);
}
.navbar__inner {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.navbar__left {
  display: flex;
  align-items: center;
  padding-left: 16px;
}
.navbar__logo { height: 30px; width: auto; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
}
.nav-link__mask {
  position: relative;
  display: block;
  overflow: hidden;
}
.nav-link__text {
  display: block;
  opacity: 0.7;
  transition: transform 0.5s var(--ease-roll), opacity 0.5s var(--ease-roll);
}
.nav-link__text--clone {
  position: absolute;
  inset: 0;
  transform: translateY(100%) skewY(8deg);
  opacity: 0;
}
.nav-link:hover .nav-link__text {
  transform: translateY(-100%) skewY(8deg);
  opacity: 0;
  transition-duration: 0.25s;
}
.nav-link:hover .nav-link__text--clone {
  transform: translateY(0) skewY(0deg);
  opacity: 1;
  transition-delay: 0.12s;
}

.navbar__right { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--background);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.5s var(--ease-out-quart), opacity 0.3s;
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(2) { opacity: 0; transform: translateX(-100%); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { overflow: hidden; }

.hero__box {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: flex-end;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero__image {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  /* the graded photo is already dark, so the scrim only secures the text side */
  background:
    linear-gradient(100deg, rgba(4, 9, 18, 0.76) 0%, rgba(4, 9, 18, 0.5) 38%, rgba(4, 9, 18, 0.12) 62%, rgba(4, 9, 18, 0) 78%),
    linear-gradient(180deg, rgba(4, 9, 18, 0.45) 0%, rgba(4, 9, 18, 0) 22%);
}
.hero__content { position: relative; z-index: 1; }

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  padding-top: 15vh;
  /* content sits at the bottom, so extra padding lifts the whole block */
  padding-bottom: calc(var(--space-xl) + 30px);
}
.hero__col-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  color: var(--background);
}
.hero__heading { margin-top: var(--space-xl); color: var(--background); }
.hero__description {
  max-width: 34em;
  margin-top: var(--space-md);
  color: rgba(255, 255, 255, 0.88);
}
.hero__buttons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}
.hero__col-right {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: var(--space-sm);
  max-width: 550px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
  color: var(--background);
}
.hero-card__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--space-sm);
  padding: var(--space-xs);
}
.hero-card__stats {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 0 12px;
}
.hero-card__number {
  font-size: var(--h1-size);
  line-height: var(--h1-lh);
  letter-spacing: var(--h1-ls);
  font-weight: var(--fw-medium);
}
.hero-card__text { margin-top: var(--space-xs); }
.hero-card__media {
  position: relative;
  aspect-ratio: 9 / 10;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.hero-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-card__caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(10, 12, 18, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.8125rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Section 01 - about
   -------------------------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-md);
}
.about__heading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
}
.about__lead { color: var(--text-secondary); }

.about__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: 40px 32px;
  border-radius: var(--radius-2xl);
  background-color: var(--brand-secondary);
}
.about__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.about__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-2xl);
}
.about__stat-number {
  font-size: 3rem;
  line-height: 1.5;
  font-weight: var(--fw-medium);
  letter-spacing: -0.02em;
}
.about__stat-label { color: var(--text-secondary); }
.about__description {
  font-size: var(--h2-size);
  line-height: 1.3;
  color: var(--text-secondary);
}

.about__right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-md);
}
.usp-grid {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr 1fr;
  gap: var(--space-sm);
  width: 100%;
}
.usp-grid h3 { grid-column: 1 / -1; }
.usp-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-sm);
  border-radius: var(--radius-lg);
  background-color: var(--foreground);
  color: var(--background);
}
.usp-card__icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background-color: var(--background);
}
.usp-card__text {
  margin-top: var(--space-md);
  font-size: var(--text-small);
}

/* --------------------------------------------------------------------------
   Section 02 - gallery
   -------------------------------------------------------------------------- */
.gallery__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}
.gallery__intro {
  max-width: 44em;
  margin: var(--space-sm) auto 0;
  color: var(--text-secondary);
  text-align: center;
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.gallery-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.gallery-card__media {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gallery-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
.gallery-card__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.8125rem;
}
.gallery-card__title { margin: var(--space-md) 0 0; font-size: var(--h4-size); }
.gallery-card__text {
  margin-top: var(--space-xs);
  color: var(--text-secondary);
}

.gallery__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}
.gallery__footer p { color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Section 03 - workspaces (sticky scroll)
   -------------------------------------------------------------------------- */
.workspaces__track {
  display: flex;
  flex-direction: column;
  padding: 16px;
}
.workspaces__box {
  position: sticky;
  top: 16px;
  display: flex;
  min-height: 723px;
  border-radius: var(--radius-lg);
  background-color: var(--foreground);
  color: var(--background);
  overflow: hidden;
}
.workspaces__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 96px 0 64px;
}
.workspaces__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}
.workspaces__grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  align-items: center;
  gap: var(--space-lg) var(--space-2xl);
  padding-top: 32px;
}

.workspaces__list {
  position: relative;
  padding-left: 16px;
}
/* position comes from main.js, bound directly to the scroll progress */
.ws-indicator {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  gap: var(--space-sm);
  width: calc(100% + 2px);
  height: var(--ws-indicator-h);
  margin-left: -2px;
  pointer-events: none;
}
.ws-indicator__line {
  width: 2px;
  height: 100%;
  background-color: var(--brand-primary);
  flex: 0 0 2px;
}
.ws-indicator__box {
  flex: 1;
  height: 100%;
  border-radius: var(--radius-xl);
  background-color: var(--surface-dark);
}

/* height comes from main.js; the description is simply clipped, not faded */
.ws-item {
  position: relative;
  height: var(--ws-item-h);
  overflow: hidden;
}

.ws-item__box {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-xl);
}
.ws-item__number { color: rgba(255, 255, 255, 0.55); }
.ws-item.is-active .ws-item__number { color: #fff; }
.ws-item__title { font-size: var(--h4-size); }
.ws-item__text {
  padding-top: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-small);
}

/* the visual overhangs the grid cell by 64px top and bottom, as in the template */
.workspaces__graphics {
  position: relative;
  aspect-ratio: 3 / 2;
  width: 100%;
  margin-top: -64px;
  padding-bottom: 64px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
/* transform comes from main.js; the visuals stack up as you scroll */
.ws-graphic {
  position: absolute;
  inset: 0;
  transform: translateY(100vh);
}
.ws-graphic__card {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ws-graphic__card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ws-graphic__stats {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ws-graphic__title {
  font-size: var(--h3-size);
  line-height: 1.1;
  font-weight: var(--fw-medium);
  letter-spacing: var(--h3-ls);
}
.ws-graphic__text {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-small);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer__wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.footer__upper {
  display: grid;
  grid-template-columns: 1.4fr 0.5fr 0.5fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
  padding: 48px 0 40px;
}
.footer__logo { height: 40px; width: auto; }
.footer__left {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.footer__paragraph {
  font-size: var(--h2-size);
  line-height: 1.3;
  letter-spacing: var(--h2-ls);
}
.footer__subtitle {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.6);
}
.footer__socials { display: flex; gap: var(--space-md); }
.footer__socials a {
  display: flex;
  width: 20px;
  height: 20px;
  transition: opacity 0.3s var(--ease-out-quart), transform 0.4s var(--ease-out-quart);
}
.footer__socials a:hover { opacity: 0.65; transform: translateY(-2px); }

.footer__menus { display: flex; flex-direction: column; gap: 8px; }
.footer__menu {
  display: inline-block;
  width: fit-content;
  /* keeps the mail address on one line instead of breaking after its hyphen */
  white-space: nowrap;
  transition: color 0.3s var(--ease-out-quart), transform 0.4s var(--ease-out-quart);
}
.footer__menu:hover { color: #7cc7ee; transform: translateX(3px); }

.footer__form-label { display: block; margin-bottom: var(--space-md); }
.footer__form-row { display: flex; align-items: center; gap: var(--space-sm); }
.footer__input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: var(--text-body);
  transition: border-color 0.3s var(--ease-out-quart), background-color 0.3s var(--ease-out-quart);
}
.footer__input::placeholder { color: rgba(255, 255, 255, 0.45); }
.footer__input:focus {
  outline: none;
  border-color: var(--brand-primary);
  background-color: rgba(255, 255, 255, 0.1);
}
.footer__form-note {
  min-height: 1.5em;
  margin-top: 12px;
  font-size: var(--text-small);
  color: rgba(255, 255, 255, 0.6);
}
.footer__form-note[data-state='error'] { color: #ff9d8a; }
.footer__form-note[data-state='ok'] { color: #7cc7ee; }

/* hairline that grows out from the centre when the footer comes into view */
.footer__divider {
  width: 0;
  height: 1px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.1);
  transition: width 1.2s var(--ease-out-quart);
}
.footer__divider.is-visible { width: 100%; }

.footer__lower {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 40px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-small);
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.8s var(--ease-out-quart) 0.3s, transform 0.8s var(--ease-out-quart) 0.3s;
}
.footer__lower.is-visible { opacity: 1; transform: translateY(0); }

/* oversized wordmark closing the page, faded out towards the bottom */
.footer__mega {
  /* shrink to the text so main.js measures the wordmark, not the column */
  align-self: flex-start;
  margin-top: var(--space-2xl);
  font-size: 12.5rem;
  line-height: 0.85;
  letter-spacing: -0.03em;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  user-select: none;
  background-image: linear-gradient(180deg,
    #eaf5fc 0%,
    #79c4ec 26%,
    #2183c0 52%,
    rgba(11, 92, 138, 0.45) 76%,
    rgba(9, 138, 203, 0) 97%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(-40vh);
  transition: opacity 1s var(--ease-out-quart) 0.15s, transform 1s var(--ease-out-quart) 0.15s;
}
.footer__mega.is-visible { opacity: 1; transform: translateY(0); }
.footer__legal { display: flex; gap: var(--space-md); }
.footer__legal a { transition: color 0.3s var(--ease-out-quart); }
.footer__legal a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Scroll reveal - mirrors the template's slideInBottom / slideInRight
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 1s var(--ease-out-quart), transform 1s var(--ease-out-quart);
}
.reveal--right { transform: translateX(100px); }
.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* --------------------------------------------------------------------------
   Hero intro - the template runs a GSAP timeline on load:
   image zooms out from 1.1, headline and copy appear letter by letter,
   then buttons, markers, card and navbar follow.
   Everything below only applies once main.js has added .is-animated.
   -------------------------------------------------------------------------- */
:root {
  --ease-intro: cubic-bezier(0.33, 1, 0.68, 1);
  --intro-letter-dur: 430ms;
  --intro-block-dur: 870ms;
}

.split-word,
.split-letter { display: inline-block; }

@keyframes introLetter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes introUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes introCard {
  from { opacity: 0; transform: translateY(80px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes introNav {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes introZoom {
  from { transform: scale(1.1); }
  to { transform: scale(1); }
}

/* hidden until main.js has split them into letters */
.is-animated .hero__heading:not(.is-split),
.is-animated .hero__description:not(.is-split) { opacity: 0; }

.is-animated .split-letter {
  opacity: 0;
  animation: introLetter var(--intro-letter-dur) var(--ease-intro) both;
  animation-delay: var(--d, 0ms);
}
.is-animated .hero__image { animation: introZoom 885ms var(--ease-intro) both; }
.is-animated .hero__buttons {
  opacity: 0;
  animation: introUp var(--intro-block-dur) var(--ease-intro) 1990ms both;
}
.is-animated .hero-card {
  opacity: 0;
  animation: introCard var(--intro-block-dur) var(--ease-intro) 2690ms both;
}
.is-animated .navbar {
  opacity: 0;
  animation: introNav var(--intro-block-dur) var(--ease-intro) 2720ms both;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  :root {
    --h1-size: 3.25rem;
    --h2-size: 2.25rem;
    --section-pad-y: 64px;
  }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__col-right { justify-content: flex-start; }
  .hero-card { max-width: 100%; }
  .about__grid { grid-template-columns: 1fr; }
  .workspaces__grid { grid-template-columns: 1fr; align-items: start; }
  .workspaces__box { min-height: 0; }
  .footer__upper { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}

@media (max-width: 991px) {
  .nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: 80vw;
    margin: 0 auto;
    padding: 24px;
    border-radius: var(--radius-md);
    background-color: var(--foreground);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.4s var(--ease-out-quart), transform 0.4s var(--ease-out-quart), visibility 0.4s;
  }
  .nav-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link { font-size: var(--h4-size); padding-left: 0; }
  .nav-toggle { display: flex; flex-direction: column; }
  .navbar__inner { padding: 0 8px; }
  .navbar__left { padding-left: 8px; }

  .gallery__grid { grid-template-columns: 1fr; }
  .gallery-card__media { height: 320px; }
  .usp-grid { grid-template-columns: 1fr 1fr; }

  /* the visual no longer overhangs once the columns stack */
  .workspaces__graphics { margin-top: 0; padding-bottom: 0; }

  /* narrow screens need a vertical scrim, the sideways one no longer covers the text */
  .hero__scrim {
    background: linear-gradient(180deg,
      rgba(4, 9, 18, 0.72) 0%,
      rgba(4, 9, 18, 0.6) 42%,
      rgba(4, 9, 18, 0.34) 68%,
      rgba(4, 9, 18, 0.55) 100%);
  }
}

@media (max-width: 767px) {
  :root {
    --h1-size: 2.5rem;
    --h2-size: 1.875rem;
    --h3-size: 1.5rem;
    --text-body: 1.0625rem;
    --text-large: 1.25rem;
    --text-small: 1rem;
    --section-pad-y: 56px;
    --section-pad-x: 20px;
  }
  .section-inner { padding: 8px; }
  .workspaces__track { padding: 8px; }
  .navbar { top: 12px; }
  .navbar__island { border-radius: var(--radius-xl); }

  .hero__grid { padding-top: 18vh; gap: var(--space-md); }
  .hero__heading { margin-top: var(--space-md); }
  .hero__buttons { flex-wrap: wrap; margin-top: var(--space-lg); }
  .hero-card { grid-template-columns: 1fr; }
  .hero-card__media { aspect-ratio: 16 / 10; }
  .hero-card__number { font-size: 2.75rem; }

  .about__panel { padding: 28px 20px; gap: var(--space-md); }
  .about__stats { gap: var(--space-md) var(--space-lg); }
  .about__stat-number { font-size: 2.25rem; line-height: 1.2; }
  .about__description { font-size: 1.375rem; }
  .usp-grid { grid-template-columns: 1fr; }

  :root {
    --ws-item-h: 62px;
    --ws-item-h-active: 178px;
    --ws-indicator-h: 188px;
  }
  .workspaces__inner { padding: 56px 0 40px; }
  .workspaces__grid { gap: var(--space-lg); }
  .ws-item__box { grid-template-columns: 28px 1fr; padding: 10px 14px; }
  .ws-item__title { font-size: 1.25rem; }
  .ws-item__text { font-size: 0.9375rem; }

  /* the nav CTA collapses to its icon, label stays for screen readers */
  .navbar__logo { height: 26px; }
  .navbar__right .button__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .navbar__right .button--special { padding: 4px; }
  .navbar__right .button__inner { gap: 0; }

  .footer__upper { grid-template-columns: 1fr; padding-top: 40px; }
  .footer__paragraph { font-size: 1.625rem; }
  .footer__mega { margin-top: var(--space-lg); }
  .footer__form-row { flex-wrap: wrap; }
  .footer__input { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ws-graphic { transition: none; }
}
