/* ==========================================================================
   Dream — brand launch
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts — ABC Diatype (Light + Medium; woff2 where available, otf fallback)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "ABC Diatype";
  src: url("../fonts/ABCDiatype-Light.woff2") format("woff2"),
       url("../fonts/ABCDiatype-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ABC Diatype";
  src: url("../fonts/ABCDiatype-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "ABC Diatype", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Segoe UI", Roboto, Arial, sans-serif;

  /* Outer page margins — reduced ~15% */
  --page-x: clamp(17px, 1.87vw, 31px);
  --page-y: clamp(17px, 2.04vw, 29px);

  --brand-color: #F2F2F2;
  /* Behind the hero video — dark so white hero text stays legible before it paints */
  --hero-fallback: #0b0b0d;
  --ink-dark: #6f6f6d;
  --ink-dark-strong: #5e5e5c;
  --surface: #f1f1ef;
  --card: #fbfbfa;
  --card-border: #e6e6e3;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--brand-color);
  font-family: var(--font-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Page shell — header / content / footer, edge padded, full viewport
   -------------------------------------------------------------------------- */

.page {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: var(--page-y) var(--page-x);
}

.wordmark,
.wordmark-home {
  margin: 0;
  line-height: 0;
}

.wordmark a {
  display: inline-block;
}

/* The logotype is the link's whole body — an underline under it reads as a stray rule. */
.wordmark a:hover,
.wordmark a:focus-visible {
  text-decoration: none;
  opacity: 0.7;
}

/* Sized so the logotype's cap height matches the type it replaced. */
.wordmark__logo {
  display: block;
  width: clamp(86px, 7.4vw, 114px);
  height: auto;
  color: inherit;
}

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  font-size: clamp(13px, 1vw, 15px);
}

.site-footer__nav {
  display: flex;
  gap: clamp(20px, 2.6vw, 44px);
}

.site-footer__legal {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Homepage
   -------------------------------------------------------------------------- */

.page--home {
  color: #fff;
}

.hero-media {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--hero-fallback);
}

/* Keeps the wordmark, headline and footer legible over any frame. */
.hero-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 22%),
    linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 26%);
}

.moon {
  position: absolute;
  top: 34%;
  left: 50%;
  width: clamp(38px, 3.4vw, 52px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 30%,
    #f2ece6 0%,
    #ded9d5 42%,
    #a9a8aa 100%
  );
  pointer-events: none;
}

/* Home: the hero centres on the full page height, so the header and footer
   float over it rather than squeezing it into the row between them. */
.page--home {
  display: flex;
  align-items: center;
}

.page--home > header,
.page--home > .site-footer {
  position: absolute;
  left: var(--page-x);
  right: var(--page-x);
}

.page--home > header {
  top: var(--page-y);
}

.page--home > .site-footer {
  bottom: var(--page-y);
}

.hero {
  display: flex;
  align-items: center;
  gap: clamp(28px, 9vw, 150px);
}

.hero__logo {
  flex: none;
  width: clamp(76px, 8vw, 128px);
  color: #fff;
}

.hero__headline {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(30px, 4vw, 66px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

/* Two lines from tablet up, three on phones — as drawn. */
.wrap-narrow {
  display: none;
}

@media (max-width: 560px) {
  .wrap-narrow {
    display: inline;
  }

  .hero__headline {
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   Text pages (Privacy Policy, Imprint)
   -------------------------------------------------------------------------- */

.page--text {
  color: var(--ink-dark);
  background: var(--surface);
}

.page--text .wordmark {
  color: var(--ink-dark-strong);
}

.text-page {
  width: min(680px, 100%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-block: clamp(24px, 4vh, 56px);
}

.text-page__title {
  margin: 0 0 clamp(18px, 2.6vh, 30px);
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.text-page__card {
  flex: 1;
  min-height: 0;
  max-height: 68vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 2vw, 28px);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: #c9c9c6 transparent;
}

.text-page__card::-webkit-scrollbar {
  width: 10px;
}

.text-page__card::-webkit-scrollbar-thumb {
  background: #c9c9c6;
  border: 3px solid var(--card);
  border-radius: 999px;
}

.text-page__card > :first-child {
  margin-top: 0;
}

.text-page__card > :last-child {
  margin-bottom: 0;
}

.text-page__card h2 {
  margin: 1.9em 0 0.5em;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-dark-strong);
}

.text-page__card p {
  margin: 0 0 1em;
}

.text-page__card ul {
  margin: 0 0 1em;
  padding-left: 1.15em;
}

.text-page__card li {
  margin-bottom: 0.45em;
}

.text-page__card strong {
  font-weight: 500;
  color: var(--ink-dark-strong);
}

.text-page__card a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #b9b9b5;
  overflow-wrap: anywhere;
}

.text-page__card a:hover,
.text-page__card a:focus-visible {
  text-decoration-color: currentColor;
}

.address {
  line-height: 1.65;
}

@media (max-width: 720px) {
  .text-page__card {
    max-height: none;
    overflow-y: visible;
  }

  .page--text {
    min-height: 100svh;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero,
  .text-page {
    animation: rise 0.7s ease-out both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
