/* ===== CSS Custom Properties (Design Tokens from Figma) ===== */
:root {
  /* Colors */
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-bg-dark: #222222;
  --color-bg-input: #222222;
  --color-cta-green: #BDF700;
  --color-cta-text: #222222;
  --color-placeholder: #909090;
  --color-footer-text: #666666;
  --color-divider: rgba(255, 255, 255, 0.85);
  --color-section-bg: #7C6FF0;

  /* Typography */
  --font-heading: 'Open Sans', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --font-footer: 'Roboto', sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 20px;
  --spacing-lg: 24px;
  --spacing-xl: 50px;

  /* Border Radius */
  --radius-form: 20px;
  --radius-button: 14px;
  --radius-divider: 2px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg-dark);
  color: var(--color-white);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ===== Header ===== */
.header {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 16px 24px;
}

.logo-container {
  display: inline-flex;
}

.logo-container a {
  display: inline-flex;
}

.header-logo {
  width: 164px;
  height: 33.66px;
  object-fit: contain;
}

/* ===== Hero Section ===== */
/* Base desktop values follow the 1440w Figma frame; 1920w overrides are in the min-width: 1600px query */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 832px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 65.74px 20px;
  overflow: hidden;
  background-color: var(--color-section-bg);
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/BG-Desktop.webp');
  background-size: cover;
  background-position: center top;
  box-shadow: inset -1px -336px 66.2px rgba(0, 0, 0, 0.23);
}

.hero-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  max-width: 1600px;
  width: 100%;
  height: 665px;
  gap: 50px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: var(--spacing-sm);
}

/* ===== Divider ===== */
.divider-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  gap: var(--spacing-sm);
}

.divider-line {
  flex: 1;
  height: 2px;
  background-color: var(--color-divider);
  border-radius: var(--radius-divider);
}

.divider-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 126.77px;
  flex-shrink: 0;
}

.divider-icon {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ===== Heading ===== */
.heading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-heading {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 46.4px;
  line-height: 53.36px;
  text-align: center;
  text-transform: uppercase;
  color: var(--color-white);
  letter-spacing: 0;
}

.mobile-break {
  display: none;
}

/* ===== Form ===== */
.form-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: var(--spacing-xs);
  margin-bottom: 46px; /* 1440w frame: 30px spacer + 16px gap below the helper text */
}

.email-form {
  width: 100%;
  display: flex;
  justify-content: center;
}

.form-background {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: var(--color-bg-input);
  border-radius: var(--radius-form);
  padding-left: 20px;
  padding-right: 6px;
  gap: var(--spacing-xs);
  max-width: 500px;
  width: 100%;
  height: 60px;
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.email-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 19.5px;
  color: var(--color-white);
  letter-spacing: 0;
}

.email-input::placeholder {
  color: var(--color-placeholder);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
}

.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-cta-green);
  color: var(--color-cta-text);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  text-align: center;
  border: none;
  border-radius: var(--radius-button);
  padding: 0 21px;
  height: 50px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.3s ease-out;
}

.cta-button:hover {
  opacity: 0.9;
}

.form-helper-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 19.5px;
  text-align: center;
  color: var(--color-white);
  letter-spacing: 0;
  width: 100%;
  max-width: 500px;
}

/* ===== Form error (not in Figma; minimal styling) ===== */
.form-error {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  line-height: 19.5px;
  text-align: center;
  color: var(--color-cta-green);
}

.form-error[hidden] {
  display: none;
}

.form-error-suggestion {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.email-input.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.cta-button[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== Annotation (Drop your email) ===== */
/* Anchored to the form: sits just left of the 500px input, aligned near its top */
.annotation-wrapper {
  position: absolute;
  top: 16px;
  right: calc(50% + 267px);
  width: 220.16px;
  height: 157.65px;
  z-index: 3;
  pointer-events: none;
}

.annotation-wrapper picture {
  display: block;
  width: 100%;
  height: 100%;
}

.annotation-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== Main Spacer ===== */
.main-spacer {
  width: 100%;
  height: 48px;
}

/* ===== Footer ===== */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 24px;
  gap: var(--spacing-xs);
}

.rta-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rta-icon {
  width: 58.82px;
  height: 20px;
  object-fit: contain;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.copyright-text {
  font-family: var(--font-footer);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  text-align: center;
  color: var(--color-footer-text);
  letter-spacing: -0.154px;
}

.copyright-link {
  color: var(--color-footer-text);
  text-decoration: underline;
}

/* ===== Large Desktop (1920w Figma frame) ===== */
@media (min-width: 1600px) {
  .hero-section {
    min-height: 1132px;
    padding: 215.74px 20px;
  }

  .hero-bg-image {
    box-shadow: inset -1px -404px 73.2px rgba(0, 0, 0, 0.25);
  }

  .hero-container {
    height: 692px;
  }

  .form-wrapper {
    margin-bottom: 0;
  }

  .annotation-wrapper {
    top: 64px;
    right: calc(50% + 255px);
  }
}

/* ===== 1366w laptops (e.g. 1366 × 768) =====
   The background "Jerkmate" text sits low enough here to touch the divider line.
   Drop the spacer under the form so the divider and heading move 46px down, under the text. */
@media (min-width: 1300px) and (max-width: 1439px) {
  .form-wrapper {
    margin-bottom: 0;
  }
}

/* ===== 2560w screens (e.g. 2560 × 1440) =====
   The background scales with the viewport width, so the "Jerkmate" text lands on the heading.
   Push the divider and heading 200px down, under the text. */
@media (min-width: 2400px) {
  .hero-section {
    min-height: 1224px;
    padding-bottom: 115.74px;
  }

  .hero-container {
    height: 892px;
  }
}

/* ===== Tablet: not enough room beside the form, so the annotation drops below it ===== */
@media (min-width: 769px) and (max-width: 1023px) {
  .annotation-wrapper {
    top: calc(100% + 2px); /* just below the helper text block */
    right: auto;
    left: calc(50% - 270px);
    width: 147.26px;
    height: 105.45px;
  }
}

/* ===== Mobile (430w Figma frame) ===== */
@media (max-width: 768px) {
  .hero-section {
    min-height: 792px;
    padding: 162px 20px 142px;
  }

  .hero-bg-image {
    background-image: url('../images/BG-Mobile.webp');
    background-position: center top;
    box-shadow: inset 0 -334px 188.7px rgba(0, 0, 0, 0.19);
  }

  .hero-container {
    height: 480px;
    gap: 28px;
    justify-content: flex-end;
  }

  .hero-heading {
    font-size: 24px;
    line-height: 28px;
  }

  .mobile-break {
    display: inline;
  }

  .form-wrapper {
    margin-bottom: 0;
  }

  .form-background {
    max-width: 100%;
    height: 55.9px;
  }

  .email-input,
  .email-input::placeholder {
    font-size: 15.5px;
  }

  .annotation-wrapper {
    top: calc(100% + 2px); /* just below the helper text block */
    right: auto;
    left: -15px;
    width: 147.26px;
    height: 105.45px;
  }

  .divider-icon-wrapper {
    width: 62px;
  }

  .form-helper-text {
    font-size: 11px;
    line-height: 19.5px;
  }
}