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

:root {
  --brand: #144c51;
  --white: #ffffff;
}

html,
body {
  width: 100%;
}

body {
  background-color: var(--brand);
  color: var(--white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Prevent scrolling by default for the home page */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  position: relative;
}

/* Override for pages that need scrolling */
.legal-page {
  height: auto;
  min-height: 100vh;
  overflow: auto;
}

.legal-content {
  padding: clamp(32px, 5vh, 64px) clamp(20px, 5vw, 48px);
  max-width: 800px;
  margin: 0 auto;
  flex: 1;
}

.legal-content h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.legal-content h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.legal-content p,
.legal-content li {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.8;
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.header {
  /* Dynamic vertical padding based on screen height to prevent pushing content down */
  padding: clamp(16px, 3vh, 36px) clamp(20px, 5vw, 48px);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.logo {
  height: clamp(20px, 3.5vw, 32px);
  width: auto;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(20px, 5vw, 48px);
  max-width: 900px;
  /* Allow the main content to shrink if needed, though overflow is hidden */
  min-height: 0;
  position: relative;
  z-index: 1;
}

.content {
  display: flex;
  flex-direction: column;
  /* Shrink gap on shorter screens */
  gap: clamp(16px, 3vh, 24px);
  max-width: min(720px, 48vw);
}

.title {
  /* Scale font size based on viewport width AND height (using vmin is a good trick, or just vw with a sensible clamp) */
  font-size: clamp(32px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.description {
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.8;
  max-width: 600px;
}

.preview-visual {
  position: fixed;
  top: 50%;
  right: max(-26vw, -60px);
  width: clamp(320px, 56vw, 840px);
  max-width: 92vw;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

.preview-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90vh;
}

@media (max-width: 1100px) {
  .preview-visual {
    width: clamp(280px, 60vw, 700px);
    right: clamp(-80px, -8vw, -20px);
  }
}

.actions {
  /* Shrink margin on shorter screens */
  margin-top: clamp(8px, 2vh, 16px);
}

.btn-primary {
  display: inline-block;
  background-color: var(--white);
  color: var(--brand);
  padding: clamp(10px, 2vh, 14px) clamp(20px, 4vw, 28px);
  font-weight: 600;
  font-size: clamp(14px, 1.5vw, 16px);
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.announcement {
  /* Drastically reduce top margin on short screens to keep everything in view */
  margin-top: clamp(24px, 6vh, 64px);
  font-size: clamp(12px, 1.2vw, 16px);
  opacity: 0.6;
}

.footer {
  /* Dynamic vertical padding */
  padding: clamp(16px, 3vh, 24px) clamp(20px, 5vw, 48px);
  font-size: clamp(12px, 1.2vw, 14px);
  opacity: 0.5;
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.footer a {
  color: var(--white);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .content {
    max-width: none;
  }

  .preview-visual {
    display: none;
  }
}