:root {
  color-scheme: dark;
  --ink: #f5f1e7;
  --muted: #b7b2a7;
  --line: rgba(245, 241, 231, 0.22);
  --orange: #ff8a3d;
  --green: #8fbd68;
  --sky: #78b7d6;
  --black: #11110f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--black);
  color: var(--ink);
}

.hero {
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background-image:
    linear-gradient(90deg, rgba(17, 17, 15, 0.2) 0%, rgba(17, 17, 15, 0.1) 30%, rgba(17, 17, 15, 0.03) 62%, transparent 100%),
    linear-gradient(0deg, rgba(17, 17, 15, 0.42) 0%, rgba(17, 17, 15, 0.06) 42%, transparent 100%),
    url("assets/castle-placeholder-hero.png");
  background-position: center;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255, 138, 61, 0.04), transparent 28%),
    radial-gradient(circle at 24% 82%, rgba(143, 189, 104, 0.06), transparent 24%);
  pointer-events: none;
}

.logo-rotator {
  position: absolute;
  top: clamp(20px, 5svh, 95px);
  left: 50vw;
  z-index: 2;
  width: min(84vw, 920px);
  height: clamp(150px, 22svh, 440px);
  transform: translateX(-50%);
  pointer-events: none;
}

.logo-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: clamp(14px, 1.4vw, 30px);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.38),
    0 8px 20px rgba(0, 0, 0, 0.28);
  opacity: 0;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.24));
  transform: translate(-50%, -50%);
}

html[data-castle-logo="01"] .logo-frame[data-logo="01"],
html[data-castle-logo="02"] .logo-frame[data-logo="02"],
html[data-castle-logo="04"] .logo-frame[data-logo="04"],
html:not([data-castle-logo]) .logo-frame[data-logo="01"] {
  opacity: 1;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: clamp(32px, 6vw, 88px);
  padding-bottom: clamp(140px, 16vw, 210px);
  max-width: 760px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: clamp(12px, 3vw, 34px) clamp(10px, 3vw, 36px);
  z-index: -1;
  background: radial-gradient(
    ellipse at 28% 48%,
    rgba(17, 17, 15, 0.34) 0%,
    rgba(17, 17, 15, 0.18) 44%,
    transparent 72%
  );
  filter: blur(18px);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 22px;
  min-width: 0;
  color: #fff5df;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.78),
    0 0 18px rgba(0, 0, 0, 0.44);
}

h1 {
  margin: 0;
  min-width: 0;
  font-size: 4rem;
  line-height: 0.86;
  letter-spacing: 0;
  max-width: 7ch;
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.32);
}

.lead {
  margin: 28px 0 0;
  width: 100%;
  min-width: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.legal-note {
  position: absolute;
  left: clamp(32px, 6vw, 88px);
  bottom: clamp(28px, 4vw, 54px);
  z-index: 1;
  max-width: min(660px, calc(100vw - 64px));
  padding: 13px 15px;
  border-left: 3px solid var(--orange);
  background: rgba(17, 17, 15, 0.72);
  color: rgba(245, 241, 231, 0.82);
  font-size: 0.78rem;
  line-height: 1.45;
  backdrop-filter: blur(10px);
}

@media (min-width: 821px) {
  .eyebrow {
    font-size: 1.1rem;
  }

  h1 {
    font-size: 7rem;
  }

  .lead {
    font-size: 1.35rem;
  }

  .legal-note {
    max-width: 720px;
    padding: 15px 18px;
    font-size: 0.95rem;
  }
}

@media (min-width: 1440px) {
  .hero-copy {
    max-width: 900px;
  }

  .eyebrow {
    margin-bottom: 28px;
    font-size: 1.45rem;
  }

  h1 {
    font-size: 9rem;
  }

  .lead {
    max-width: 42rem;
    font-size: 1.55rem;
  }

  .legal-note {
    max-width: 780px;
    font-size: 1.08rem;
  }
}

@media (min-width: 2200px) {
  .hero-copy {
    max-width: 1120px;
  }

  .eyebrow {
    margin-bottom: 34px;
    font-size: 2.25rem;
  }

  h1 {
    font-size: 12.5rem;
  }

  .lead {
    max-width: 54rem;
    font-size: 2rem;
  }

  .legal-note {
    max-width: 980px;
    padding: 18px 22px;
    font-size: 1.35rem;
  }
}

@media (min-width: 3400px) {
  .hero-copy {
    max-width: 1380px;
  }

  .eyebrow {
    margin-bottom: 42px;
    font-size: 3.25rem;
  }

  h1 {
    font-size: 15rem;
  }

  .lead {
    max-width: 66rem;
    font-size: 2.45rem;
  }

  .legal-note {
    max-width: 1320px;
    padding: 22px 26px;
    font-size: 1.7rem;
  }
}

@media (max-width: 820px) {
  .hero {
    width: 100vw;
    min-width: 0;
    min-height: 100svh;
    background-position: 58% center;
  }

  .logo-rotator {
    top: 18px;
    width: 92vw;
    height: clamp(120px, 22svh, 190px);
  }

  .hero-copy {
    flex: 0 0 100vw;
    width: 100vw;
    max-width: 100vw;
    min-height: 100svh;
    padding-top: clamp(150px, 28svh, 230px);
    padding-bottom: 180px;
  }

  .lead {
    max-width: calc(100vw - 64px);
  }

  .legal-note {
    left: 24px;
    right: auto;
    width: calc(100vw - 48px);
    max-width: none;
  }
}
