:root {
  --color-background: #ffffff;
  --color-ink: #003561;
  --color-muted: rgba(0, 53, 97, 0.72);
  --color-focus: #003561;

  --font-primary: "Comfortaa", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;

  /* Statement = the changing text in the middle */
  --font-size-statement: clamp(1.4rem, 1.4vw, 1.8rem);

  /* Pay-off is kept for later use, but currently hidden */
  --font-size-payoff: clamp(1.25rem, 2vw, 2.4rem);

  --font-size-footer: 0.72rem;

  --space-page: clamp(1rem, 3vw, 2rem);
  --logo-width: min(360px, 82vw);
  --line-gap: clamp(2.15rem, 6vh, 3.8rem);

  /* Reserved fixed text area: prevents logo/gear movement when text wraps. */
  --statement-area-height: 5.4em;

  --gear-speed-top: 56s;
  --gear-speed-lower: 42s;
  --gear-speed-top-active: 8s;
  --gear-speed-lower-active: 6s;

  /* Fade speed for statement changes */
  --reveal-duration: 1200ms;
}

@font-face {
  font-family: "Comfortaa";
  src:
    url("../fonts/comfortaa-v47-latin-300.woff2") format("woff2"),
    url("../fonts/comfortaa-v47-latin-300.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comfortaa";
  src:
    url("../fonts/comfortaa-v47-latin-regular.woff2") format("woff2"),
    url("../fonts/comfortaa-v47-latin-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comfortaa";
  src:
    url("../fonts/comfortaa-v47-latin-500.woff2") format("woff2"),
    url("../fonts/comfortaa-v47-latin-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--color-background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-ink);
  background: var(--color-background);
  font-family: var(--font-primary);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus-visible {
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-page);
  padding-bottom: calc(var(--space-page) + 3rem);
}

/*
  Fixed three-row layout:
  1. logo/gear
  2. fixed gap
  3. reserved statement area

  This keeps the logo and rotating gears fixed while the text changes between
  1, 2, 3 or 4 lines.
*/
.holding {
  width: var(--logo-width);
  display: grid;
  grid-template-rows: auto var(--line-gap) var(--statement-area-height);
  justify-items: center;
  text-align: center;
  transform: translateY(-2vh);
}

.brand-mark {
  grid-row: 1;
  width: var(--logo-width);
  aspect-ratio: 360 / 168;
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.brand-mark:focus-visible {
  outline: 1px solid var(--color-focus);
  outline-offset: 1rem;
}

.brand-mark__stage {
  position: absolute;
  inset: 0;
  display: block;
}

.brand-mark__logo,
.gear {
  position: absolute;
  display: block;
  user-select: none;
  pointer-events: none;
}

.brand-mark__logo {
  inset: 0 auto auto 0;
  width: 100%;
  height: auto;
  z-index: 2;
}

.gear {
  transform-origin: 50% 50%;
  will-change: transform;
}

.gear--top {
  width: 28.1%;
  height: auto;
  left: 0.3%;
  top: 3.6%;
  z-index: 1;
  animation: rotate-counter var(--gear-speed-top) linear infinite;
}

.gear--lower {
  width: 21.95%;
  height: auto;
  left: -7.78%;
  top: 52.38%;
  z-index: 0;
  opacity: 0.16;
  animation: rotate-clockwise var(--gear-speed-lower) linear infinite;
}

.brand-mark:hover .gear--top,
.brand-mark:focus-visible .gear--top,
.brand-mark.is-active .gear--top {
  animation-duration: var(--gear-speed-top-active);
}

.brand-mark:hover .gear--lower,
.brand-mark:focus-visible .gear--lower,
.brand-mark.is-active .gear--lower {
  animation-duration: var(--gear-speed-lower-active);
}

.holding__statement {
  grid-row: 3;
  align-self: stretch;
  width: 100%;
  max-width: 26rem;
  min-height: var(--statement-area-height);
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--color-ink);
  font-size: var(--font-size-statement);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.012em;
  white-space: pre-line;
  transition: opacity var(--reveal-duration) ease;
}

/* Pay-off remains in the HTML/code for later use, but is visually inactive for now. */
.holding__payoff {
  display: none;
}

.holding.is-switching .holding__statement,
.holding.is-switching .holding__payoff {
  opacity: 0;
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem var(--space-page);
  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.94);
  font-size: var(--font-size-footer);
  line-height: 1.4;
}

.site-footer__nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(0.8rem, 2vw, 1.4rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rotate-clockwise {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate-counter {
  to {
    transform: rotate(-360deg);
  }
}

@media (max-width: 560px) {
  :root {
    --logo-width: min(336px, 86vw);
    --line-gap: 1.9rem;

    /* Extra reserved height on mobile, where 4-line wrapping is more likely. */
    --statement-area-height: 6.2em;

    /* Slightly smaller on mobile */
    --font-size-statement: clamp(1.35rem, 7vw, 2.3rem);
  }

  .holding {
    transform: translateY(-4vh);
  }

  .site-footer {
    position: fixed;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    text-align: center;
  }
}

@media (orientation: landscape) and (max-height: 430px) {
  .holding__statement,
  .holding__payoff {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gear,
  .brand-mark:hover .gear,
  .brand-mark:focus-visible .gear,
  .brand-mark.is-active .gear {
    animation: none;
  }

  .holding__statement,
  .holding__payoff {
    transition: none;
  }
}

/* GDPR / privacy page layout */
#GDPRContainer {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) clamp(1.25rem, 5vw, 2.5rem);
}

#GDPRContainer #logo {
  display: block;
  width: min(360px, 100%);
  height: auto;
  margin: 0 auto clamp(1.75rem, 5vw, 3rem);
}

#GDPRContent {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  font-size: clamp(0.92rem, 2.8vw, 1rem);
  line-height: 1.65;
}

#GDPRContent h1,
#GDPRContent h3 {
  line-height: 1.25;
}

#GDPRContent ul {
  padding-left: 1.25rem;
}

#GDPRContent p,
#GDPRContent ul {
  overflow-wrap: anywhere;
}

body:has(#GDPRContainer) footer {
  position: static;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem 1.25rem;
  justify-content: flex-start;
  background: transparent;
}

@media (max-width: 560px) {
  #GDPRContainer {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  #GDPRContent {
    font-size: 0.92rem;
    line-height: 1.6;
  }
}


/* 404 / error page layout
   Uses the existing logo styling, but forces a single vertical composition.
*/
.holding--error {
  width: min(560px, 88vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.4rem, 7vh, 4.25rem);
  text-align: center;
  transform: translateY(-2vh);
}

.holding--error .brand-mark {
  width: min(360px, 82vw);
  aspect-ratio: 360 / 168;
}

.holding--error .brand-mark__logo {
  width: 100%;
  height: auto;
}

.error-copy {
  width: 100%;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.15rem, 3.2vh, 1.8rem);
}

.error-copy__line {
  margin: 0;
  color: var(--color-ink);
  font-size: clamp(1.16rem, 2vw, 1.52rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.012em;
  text-align: center;
}

.error-copy__line--secondary {
  max-width: 28rem;
}

.error-copy__line--link a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.holding--error .holding__payoff {
  display: none;
}

@media (max-width: 560px) {
  .holding--error {
    width: min(360px, 88vw);
    gap: clamp(2rem, 6vh, 3.2rem);
    transform: translateY(-3vh);
  }

  .holding--error .brand-mark {
    width: min(336px, 86vw);
  }

  .error-copy {
    gap: 1.1rem;
  }

  .error-copy__line {
    font-size: clamp(1.08rem, 5.4vw, 1.35rem);
  }
}
