/* ==========================================================================
   RESET & CSS VARIABLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --color-navy-dark: #123d70;
  --color-navy-footer: #184c85;
  --color-cyan: #2ecdc0;
  --color-cyan-hover: #26AA9C;
  --color-text-white: #ffffff;
  --color-text-dim: #c5d7e8;
  --color-error-text: #FF6B6B;
  --color-success-text: #2ecdc0;
  --header-height: 80px;

  /* Grid Variables */
  --grid-margin: clamp(24px, 10vw, 160px);
  --grid-gutter: 20px;
  --container-max-width: 1440px;
}

body {
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-navy-dark);
  color: var(--color-text-white);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: var(--grid-margin);
  padding-right: var(--grid-margin);
}

/* ==========================================================================
   HEADER & LOGO
   ========================================================================== */
header {
  height: var(--header-height);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.header-container {
  display: flex;
  align-items: center;
}

.logo-container .logo {
  height: 42px;
  width: auto;
  display: block;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
  background-color: #184c85;
  background-image: linear-gradient(125deg, #184c85 0%, #156291 45%, #2ecdc0 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background-image: url('images/bg-waves.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.85;
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 820px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  color: #ffffff;
}

.hero p {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
}

/* ==========================================================================
   FOOTER & FORM
   ========================================================================== */
footer {
  background-color: var(--color-navy-footer);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 40px;
  padding-bottom: 24px;
}

.form-wrapper {
  width: 100%;
}

.form-label {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: block;
  color: #ffffff;
}

.subscribe-form {
  display: flex;
  gap: var(--grid-gutter);
  max-width: 580px;
}

.input-field {
  flex: 1;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 1rem;
  outline: none;
  -webkit-appearance: none; /* Prevents default iOS styling */
  appearance: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field::placeholder {
  color: var(--color-text-dim);
  opacity: 0.8;
}

.input-field:focus {
  border-color: var(--color-cyan);
  background-color: rgba(255, 255, 255, 0.1);
}

/* OVERRIDE MOBILE BROWSER AUTOFILL YELLOW BACKGROUND */
.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover, 
.input-field:-webkit-autofill:focus, 
.input-field:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #1c528e inset !important; /* Matches background tint */
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* INPUT ERROR STATE */
.input-field.input-error {
  border: 2px solid var(--color-error-text) !important;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.25);
}

.submit-btn {
  height: 48px;
  min-height: 48px;
  padding: 0 32px;
  background-color: var(--color-cyan);
  color: #0b3254;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.submit-btn:hover {
  background-color: var(--color-cyan-hover);
  color: #ffffff;
}

.submit-btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   FEEDBACK MESSAGES
   ========================================================================== */
.message-banner {
  margin-top: 14px;
  font-size: 0.95rem;
  max-width: 580px;
  display: none;
  padding: 0;
  background-color: transparent;
  border: none;
}

.message-banner.error {
  display: block;
  color: var(--color-error-text);
  font-weight: 600;
}

.message-banner.success {
  display: block;
  color: var(--color-success-text);
  font-weight: 600;
}

/* ==========================================================================
   LEGAL FOOTER BAR
   ========================================================================== */
.legal-bar {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-text-dim);
}

.legal-bar a {
  color: var(--color-text-dim);
  text-decoration: none;
}

.legal-bar a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (MOBILE & SMALL TABLET)
   ========================================================================== */
@media (max-width: 768px) {
  header {
    height: 64px;
  }

  .logo-container .logo {
    height: 34px;
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero h1 {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
  }

  .hero p {
    font-size: 1.125rem;
  }

  .subscribe-form {
    flex-direction: column;
    max-width: 100%;
  }

  .input-field {
    width: 100%;
    height: 48px;
    min-height: 48px;
  }

  .submit-btn {
    width: 100%;
    height: 48px;
    min-height: 48px;
    border-radius: 24px;
  }

  .legal-bar {
    flex-direction: row;
    justify-content: space-between;
  }
}