/* ==========================================================================
   Startup Autobahn Expo 2027 – landing page
   Order: fonts → tokens → base → layout → hero → glow → newsletter →
          footer → utilities → media queries (min-width only, mobile first)
   ========================================================================== */

/* ---------- Fonts (self-hosted, IBM Plex, Latin-1 subset) ---------- */
@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexSansCondensed-Regular-Latin1.woff2")
    format("woff2");
  unicode-range:
    U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153,
    U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022,
    U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212,
    U+FB01-FB02;
}
@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexSansCondensed-Medium-Latin1.woff2")
    format("woff2");
  unicode-range:
    U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153,
    U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022,
    U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212,
    U+FB01-FB02;
}
@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexSansCondensed-Bold-Latin1.woff2")
    format("woff2");
  unicode-range:
    U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153,
    U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022,
    U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212,
    U+FB01-FB02;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
  unicode-range:
    U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153,
    U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022,
    U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212,
    U+FB01-FB02;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
  unicode-range:
    U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153,
    U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022,
    U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212,
    U+FB01-FB02;
}

/* ---------- Design tokens ---------- */
:root {
  --navy: #14222b;
  --red: #bc0202;
  --red-hover: #9e0202;
  --white: #fff;
  --input-bg: #ebebeb;
  --input-border: #dedede;
  --placeholder: rgba(117, 117, 117, 0.5);
  --text: #14222b;
  /* Design used .3; raised to .65 for legal readability / WCAG contrast. */
  --disclaimer: rgba(20, 34, 43, 0.65);
  --date: rgba(255, 255, 255, 0.18);

  --font-condensed:
    "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-sans:
    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 29px;
  --ease: 150ms ease;
  /* Hero card radius: fluid 19px @320px → 49px @1200px (desktop) */
  --hero-radius: clamp(19px, 8.09px + 3.409vw, 49px);
  --glow-end: rgba(231, 0, 0, 0);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-condensed);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.41;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}

button,
input {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  padding-inline: var(--gutter);
}

/* ---------- Hero card ---------- */
.hero {
  /* --u = one design pixel; scales with card width (design card = 382px) */
  --u: calc(100cqw / 382);
  position: relative;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  /* The hero is the signature element: at least 75% of the viewport */
  min-height: 75vh;
  min-height: 75svh;
  margin: 20px 10px 0;
  padding-top: 84px; /* logo offset from card top (mobile/tablet) */
  border-radius: var(--hero-radius) var(--hero-radius) 0 0;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-inline: 19px;
  /* room for the arc; --u resolves against the card (cqw) */
  padding-bottom: calc(var(--u) * 144);
  align-items: center;
}

.hero__logo {
  width: 250px;
  height: auto;
  margin-bottom: 139px; /* minimum gap logo → headline */
}

/* Logo stays on top, content sits at the bottom; extra height goes between */
.hero__content {
  margin-top: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__title {
  max-width: 10.45em;
  font-size: clamp(
    2.625rem,
    2.036rem + 2.342vw,
    4.25rem
  ); /* 42px @402 → 68px @1512 */
  font-weight: 700;
  line-height: 1.06;
}

.hero__date {
  color: var(--date);
  white-space: nowrap;
  font-weight: 500;
}

.hero__text {
  max-width: 36em;
  margin-top: 17px;
  font-size: 0.9125rem;
  text-wrap: pretty;
  font-family: var(--font-sans);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 189px;
  height: 51px;
  margin-top: 32px;
  border-radius: 44px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1.3125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--ease);
}
.btn:hover {
  background: var(--red-hover);
}
.btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}
.btn[aria-busy="true"] {
  cursor: progress;
  opacity: 0.8;
}

/* ---------- Glow (pure CSS ellipses; hero overflow + radius clip them) ----------
   Mobile: values are design px × --u, measured from the card's bottom edge
   (design y = 645) and horizontal center (design x = 191). */
.hero__glow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__glow .g {
  position: absolute;
  border-radius: 50%;
}

.g3 {
  left: calc(var(--u) * -590);
  top: calc(var(--u) * -44);
  width: calc(var(--u) * 1180);
  height: calc(var(--u) * 1180);
  background: radial-gradient(
    calc(var(--u) * 161) calc(var(--u) * 161) at calc(var(--u) * 590)
      calc(var(--u) * 13.5),
    #ab0000 0%,
    var(--glow-end) 100%
  );
}
.g5 {
  left: calc(var(--u) * -386);
  top: calc(var(--u) * -358);
  width: calc(var(--u) * 772);
  height: calc(var(--u) * 1350);
  background: radial-gradient(
    calc(var(--u) * 334.4) calc(var(--u) * 472.1) at calc(var(--u) * 375)
      calc(var(--u) * 641.7),
    #ab0000 0%,
    var(--glow-end) 100%
  );
}
.g6 {
  left: calc(var(--u) * -592);
  top: calc(var(--u) * -144);
  width: calc(var(--u) * 1184);
  height: calc(var(--u) * 1199);
  background: radial-gradient(
    calc(var(--u) * 512.8) calc(var(--u) * 440.5) at calc(var(--u) * 575.1)
      calc(var(--u) * 474.5),
    rgba(200, 0, 0, 0.78) 0%,
    var(--glow-end) 100%
  );
}
.g7 {
  left: calc(var(--u) * -416);
  top: calc(var(--u) * -515);
  width: calc(var(--u) * 832);
  height: calc(var(--u) * 984);
  background: radial-gradient(
    calc(var(--u) * 369.85) calc(var(--u) * 766) at calc(var(--u) * 406.2)
      calc(var(--u) * 869),
    rgba(171, 0, 0, 0.76) 0%,
    var(--glow-end) 100%
  );
}
/* White dome that cuts the card bottom into the arc */
.g4 {
  left: calc(var(--u) * -593);
  top: calc(var(--u) * -32);
  width: calc(var(--u) * 1186);
  height: calc(var(--u) * 1187);
  background: var(--white);
}

/* ---------- Newsletter ---------- */
.newsletter {
  padding-top: 54px;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.newsletter__block {
  max-width: 644px;
}

.newsletter__intro {
  padding-inline: 26px;
  font-size: 0.875rem;
  font-family: var(--font-sans);
}

.form {
  margin-top: 13px;
}

.form__field {
  position: relative;
  height: 51px;
  border: 1px solid var(--input-border);
  border-radius: 44px;
  background: var(--input-bg);
  transition: border-color var(--ease);
}
.form__field:focus-within {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.form__field[data-invalid] {
  border-color: var(--red);
}

.form__input {
  width: 100%;
  height: 100%;
  padding: 0 51px 0 25px;
  border: 0;
  border-radius: 44px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  outline: 0;
}
.form__input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.form__submit {
  position: absolute;
  top: 50%;
  right: 4px; /* + 1px border = 5px from the pill edge */
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color var(--ease);
}
.form__submit:hover {
  background: var(--red-hover);
}
.form__submit:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.form__submit:disabled {
  cursor: progress;
}
.form__submit:disabled:not([aria-busy]) {
  opacity: 0.6;
}

/* Loading: arrow replaced by a spinner */
.form[aria-busy="true"] .form__submit img {
  display: none;
}
.form[aria-busy="true"] .form__submit::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form__status {
  padding-inline: 26px;
  font-size: 0.75rem;
  color: var(--red);
}
.form__status:not(:empty) {
  margin-top: 8px;
}

.form__success {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 51px;
  padding: 8px 25px;
  border-radius: 44px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.875rem;
}
.form__success[hidden] {
  display: none;
}
.form__success:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.form__success svg {
  flex: none;
}

.newsletter__disclaimer {
  margin-top: 8px;
  padding-inline: 26px;
  font-size: 0.6875rem;
  color: var(--disclaimer);
}
.newsletter__disclaimer a {
  text-decoration: underline;
}
.newsletter__disclaimer a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 53px;
  padding-bottom: 20px;
  font-size: 0.875rem;
  display: flex;
  justify-content: center;
}

.footer__inner {
  padding-inline: 26px;
  max-width: 644px;
  width: 100%;
}

.footer__legal {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer__company {
  font-weight: 500;
}

.footer__links {
  display: flex;
  gap: 13px;
}
.footer__links a {
  text-decoration: none;
}
.footer__links a:hover,
.footer__links a:focus-visible {
  text-decoration: underline;
}
.footer__links a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.footer__crafted_container {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.flex__crafted_container img {
  width: 0.9em;
  height: 0.9em;
}

.footer__crafted {
  max-width: 213px;
  margin-top: 21px;
  line-height: 1.25;
}

/* ---------- Legal pages (imprint.html, privacy.html) ----------
   Logo + article text share one left edge that equals the landing page's
   hero logo: mobile = gutter (29px); desktop = container edge + 5px + 6px. */
.page-legal .site-header {
  padding-top: 54px; /* = hero margin 20px + hero padding 34px → same logo position as landing */
  max-width: 644px;
  display: flex;
  justify-self: center;
} /* hero margin 20 + padding 64 */

.site-header__home {
  display: block;
  width: fit-content;
}
.site-header__home:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 4px;
}

.site-header__logo {
  width: 250px;
  height: auto;
}

.legal__title {
  margin-top: 80px;
  font-size: clamp(2.625rem, 2.036rem + 2.342vw, 4.25rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.legal {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  max-width: 644px;
  display: flex;
  flex-direction: column;
  justify-self: center;
}

.legal p,
.legal ul,
.legal ol {
  max-width: 85ch;
}

.legal__title + p {
  margin-top: 32px;
}
.legal p + p {
  margin-top: 1em;
}

.legal h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.legal ul,
.legal ol {
  margin-block: 1em;
  padding-left: 1.5em;
}
.legal ul {
  list-style: disc;
}
.legal ol {
  list-style: decimal;
}
.legal li + li {
  margin-top: 0.5em;
}
.legal li::marker {
  color: var(--red);
}

.legal a {
  color: inherit;
  text-decoration: underline;
}
.legal a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.legal p.legal__updated {
  margin-top: 48px;
  font-size: 0.875rem;
  color: rgba(20, 34, 43, 0.65);
}

.divider {
  margin: 72px 10px 0; /* same side margins as the hero card */
  border: 0;
  border-top: 1px solid rgba(20, 34, 43, 0.5);
}

.footer__links a[aria-current="page"] {
  text-decoration: underline;
}

@media (min-width: 1200px) {
  .page-legal .site-header {
    padding-top: 88px;
    max-width: unset;
  } /* hero margin 20 + padding 68 */
  .page-legal .site-header,
  .page-legal .legal {
    padding-left: 11px;
  } /* 5px hero inner + 6px logo margin */

  .site-header__logo {
    width: 276.827px;
  }

  .legal__title {
    margin-top: 120px;
  }
  .legal__title + p {
    margin-top: 40px;
  }

  .legal h2 {
    margin-top: 64px;
    font-size: 1.75rem;
  }

  .divider {
    margin: 112px 20px 0;
  }
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Honeypot: off-screen, not display:none */
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
  .form[aria-busy="true"] .form__submit::after {
    animation: none;
    border-color: var(--white);
    border-right-color: transparent;
  }
}

/* ---------- Tablet (600–1199px): the arc scales with width, so trim the
   space between CTA and arc to keep the card from getting overly tall ---------- */
@media (min-width: 600px) and (max-width: 1199.98px) {
  .hero__inner {
    padding-bottom: calc(var(--u) * 100);
  }
}

/* ---------- Desktop (≥1200px) ---------- */
@media (min-width: 1200px) {
  :root {
    --gutter: 40px;
  }

  .container {
    width: min(100% - 2 * var(--gutter), 1248px);
    margin-inline: auto;
    padding-inline: 0;
  }

  .hero {
    --s: 0.82;
    /* never shorter than the 721px design, otherwise 75% of the viewport */
    min-height: 721px;
    min-height: max(721px, 75vh);
    min-height: max(721px, 75svh);
    margin: 20px 20px 0;
    padding: 68px 0 79px;
    border-radius: var(--hero-radius);
  }

  /* Bottom shade sits ABOVE the glow (below content) so it shades the card
     uniformly at any width — avoids a visible edge of the navy disc (.g4)
     on ultra-wide screens. */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
      to bottom,
      transparent 85%,
      rgba(0, 0, 0, 0.25)
    );
    pointer-events: none;
  }

  .hero__inner {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    /* same x-position as the page container (card is 40px narrower than viewport) */
    width: min(100cqw + 40px - 2 * var(--gutter), 1248px);
    margin-inline: auto;
    padding: 0 0 0 5px;
  }

  .hero__logo {
    width: 276.827px;
    margin-left: 6px;
  }

  .hero__content {
    max-width: 650px;
    margin-top: 0;
    text-align: left;
    display: block;
  }

  .hero__text {
    max-width: 550px;
    margin-top: 13px;
    font-size: 0.975rem;
  }

  .btn {
    margin-top: 39px;
  }

  /* Glow: design stage 1472×721, anchored right, vertically centered */
  .hero__glow {
    left: auto;
    bottom: auto;
    top: 50%;
    right: max(0px, calc((100% - 1472px) / 2 - 15%));
    width: 1472px;
    height: 721px;
    transform: translateY(-50%) scale(var(--s));
    transform-origin: right center;
  }

  .g3 {
    left: 845px;
    top: -229px;
    width: 1180px;
    height: 1180px;
    background: radial-gradient(
      346px 346px at 13.488px 590px,
      #ab0000 0%,
      var(--glow-end) 100%
    );
  }
  .g5 {
    left: 531px;
    top: -25px;
    width: 1350px;
    height: 772px;
    background: radial-gradient(
      472.1px 334.4px at 641.68px 397.006px,
      #ab0000 0%,
      var(--glow-end) 100%
    );
  }
  .g6 {
    left: 745px;
    top: -231px;
    width: 1199px;
    height: 1184px;
    background: radial-gradient(
      440.5px 512.8px at 474.5px 608.88px,
      rgba(200, 0, 0, 0.78) 0%,
      var(--glow-end) 100%
    );
  }
  .g7 {
    left: 374px;
    top: -55px;
    width: 984px;
    height: 832px;
    background: radial-gradient(
      766px 369.85px at 869px 425.827px,
      rgba(171, 0, 0, 0.76) 0%,
      var(--glow-end) 100%
    );
  }
  .g4 {
    left: 857px;
    top: -232px;
    width: 1187px;
    height: 1186px;
    background: var(--navy);
  }

  .legal {
    max-width: unset;
  }

  .newsletter {
    padding-top: 52px;
    align-items: flex-start;
  }

  .newsletter__intro {
    max-width: 454px;
  }

  .form {
    margin-top: 15px;
  }

  .form__input {
    font-size: 1.3125rem;
  }

  .form__success {
    font-size: 1.125rem;
  }

  .footer {
    margin-top: 46px;
    padding-bottom: 30px;
    max-width: unset;
  }

  .footer__inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    max-width: unset;
  }

  .footer__legal {
    flex-direction: row;
    align-items: baseline;
    gap: 13px;
  }

  .footer__crafted {
    max-width: none;
    margin-top: 0;
    text-align: right;
  }
}

@media (min-width: 1350px) {
  .hero {
    --s: 0.9;
  }
}

@media (min-width: 1472px) {
  .hero {
    --s: 1;
  }
}

/* Very large & tall screens (75vh > glow stage): grow the arc with the card */
@media (min-width: 2000px) and (min-height: 1300px) {
  .hero {
    --s: 1.15;
  }
}
@media (min-width: 2000px) and (min-height: 1500px) {
  .hero {
    --s: 1.4;
  }
}
