/*
 * ShieldedLandlord Waitlist — Stylesheet
 *
 * Design tokens from the ShieldedLandlord Design System (colors_and_type.css).
 * Primary brand colour is Sapphire (#004080) — gold was removed in design v2.
 * Typography: Roboto (loaded via Google Fonts in base.html).
 */

/* ── Design tokens ─────────────────────────────────────────────────────── */

:root {
  /* Brand */
  --sapphire:          #004080;
  --sapphire-light:    #0D5A9E;
  --sapphire-dark:     #003366;
  --navy-dark:         #001F3D;
  --silver-grey:       #A9A9A9;
  --silver-light:      #F0F2F5;
  --silver-border:     #E0E4EA;
  --white:             #FFFFFF;
  --error:             #B00020;
  --error-bg:          #FFF3F3;
  --amber:             #E65100;
  --amber-bg:          #FFF8F0;

  /* Text */
  --text-dark:         #0A1628;
  --text-body:         #2C3345;
  --text-muted:        #5A6375;

  /* Status */
  --status-green:      #4CAF50;
  --status-amber:      #FF9800;
  --status-red:        #F44336;

  /* Spacing */
  --space-xs:          0.5rem;
  --space-sm:          1rem;
  --space-md:          1.5rem;
  --space-lg:          2.5rem;
  --space-xl:          4rem;
  --space-2xl:         6rem;

  /* Layout */
  --container-max:     1160px;
  --container-pad:     1.5rem;
  --container-narrow:  640px;

  /* Radii */
  --radius:            6px;
  --radius-lg:         12px;
  --radius-pill:       100px;

  /* Shadows */
  --shadow-sm:         0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md:         0 6px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg:         0 12px 40px rgba(0, 0, 0, 0.18);
  --shadow-sapphire:   0 4px 16px rgba(0, 64, 128, 0.30);

  /* Transitions */
  --transition:        0.2s ease;
  --transition-slow:   0.4s ease;

  /* Typography */
  --font-sans:         'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --line-height:       1.65;
}

/* ── Reset & base ──────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-body);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* sl-base is applied to body in base.html — alias for the class-based design system */
.sl-base {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-body);
  background-color: var(--white);
}

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

a {
  color: var(--sapphire);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Focus ring — gold-adjacent: use sapphire to match brand */
:focus-visible {
  outline: 3px solid var(--sapphire);
  outline-offset: 3px;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.sl-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.sl-container--narrow {
  max-width: var(--container-narrow);
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.sl-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--navy-dark);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.sl-header__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sl-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.sl-header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.sl-header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.sl-header__nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.sl-section {
  padding: var(--space-xl) 0;
}

.sl-section--silver {
  background: var(--silver-light);
}

.sl-section--white {
  background: var(--white);
}

.sl-section--navy {
  background: var(--sapphire-dark);
  color: var(--white);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.sl-hero {
  background: var(--navy-dark);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.sl-hero::after {
  /* Sapphire accent border at the bottom of the hero */
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--sapphire);
}

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

.sl-hero__title {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--white);
  margin: 1.5rem 0;
  font-family: var(--font-sans);
}

.sl-hero__title--accent {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--silver-grey);
  text-underline-offset: 8px;
  text-decoration-thickness: 3px;
}

.sl-hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

/* ── Trust badge ─────────────────────────────────────────────────────────── */

.sl-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  font-size: 12.8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  white-space: nowrap;
  max-width: 100%;
}

/* Light-background variant — sapphire text on white/silver */
.sl-trust-badge--light {
  background: rgba(0, 64, 128, 0.06);
  border-color: rgba(0, 64, 128, 0.25);
  color: var(--sapphire);
}

/* ── Card (signup form wrapper) ──────────────────────────────────────────── */

.sl-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--sapphire);
  padding: 2.5rem;
  /* Ensure the card is fully self-contained in its narrow column */
  overflow: hidden;
}

.sl-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 1rem 0 0.375rem;
  font-family: var(--font-sans);
}

.sl-card__sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

/* ── Flash messages ──────────────────────────────────────────────────────── */

.sl-flash {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.sl-flash--amber {
  background: var(--amber-bg);
  border: 1px solid var(--amber);
  color: var(--amber);
}

.sl-flash--red {
  background: var(--error-bg);
  border: 1px solid var(--error);
  color: var(--error);
}

.sl-flash__icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* ── Form elements ───────────────────────────────────────────────────────── */

.sl-form-group {
  margin-bottom: 1.25rem;
}

.sl-form-group--checkbox {
  margin-bottom: 1.5rem;
}

.sl-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 0.375rem;
  font-family: var(--font-sans);
}

.sl-label__required {
  color: var(--sapphire);
  margin-left: 0.2em;
}

.sl-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--silver-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  box-sizing: border-box;
}

.sl-input::placeholder {
  color: var(--silver-grey);
}

.sl-input:focus {
  border-color: var(--sapphire);
  box-shadow: 0 0 0 3px rgba(0, 64, 128, 0.15);
}

.sl-form-group--error .sl-input {
  border-color: var(--error);
}

.sl-field-error {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--error);
}

/* Consent checkbox */
.sl-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.sl-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  accent-color: var(--sapphire);
  cursor: pointer;
}

.sl-checkbox-text {
  flex: 1;
}

.sl-form__legal {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: center;
  margin-top: 0.875rem;
  margin-bottom: 0;
}

.sl-form__legal-link {
  color: var(--sapphire);
  text-decoration: underline;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.sl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition),
              box-shadow var(--transition), transform var(--transition);
}

.sl-btn--sapphire {
  background: var(--sapphire);
  border-color: var(--sapphire);
  color: var(--white);
}

.sl-btn--sapphire:hover {
  background: var(--sapphire-light);
  border-color: var(--sapphire-light);
  box-shadow: var(--shadow-sapphire);
  transform: translateY(-1px);
  color: var(--white);
  text-decoration: none;
}

.sl-btn--outline-sapphire {
  background: transparent;
  border-color: var(--sapphire);
  color: var(--sapphire);
}

.sl-btn--outline-sapphire:hover {
  background: rgba(0, 64, 128, 0.08);
  transform: translateY(-1px);
}

.sl-btn--sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.sl-btn--full {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.0625rem;
}

/* ── Section headers ─────────────────────────────────────────────────────── */

.sl-section-header {
  margin-bottom: var(--space-lg);
}

.sl-section-header--centred {
  text-align: center;
}

.sl-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sapphire);
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

.sl-section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-dark);
  margin: 0;
  font-family: var(--font-sans);
}

/* ── Feature tiles ───────────────────────────────────────────────────────── */

.sl-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: var(--space-lg);
}

.sl-tile {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--silver-border);
  border-top: 4px solid var(--sapphire);
  padding: 2.5rem 2rem 2rem;
  transition: box-shadow var(--transition), transform var(--transition);
  font-family: var(--font-sans);
}

.sl-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.sl-tile__icon {
  font-size: 2.25rem;
  display: block;
  margin-bottom: 0.875rem;
}

.sl-tile__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sapphire);
  margin: 0 0 0.25rem;
}

.sl-tile__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 0.5rem;
}

.sl-tile__body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.sl-footer {
  background: var(--navy-dark);
  color: var(--white);
  padding-top: var(--space-2xl);
  font-family: var(--font-sans);
}

.sl-footer__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.sl-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  padding-bottom: var(--space-xl);
}

.sl-footer__tagline {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--silver-grey);
  margin: 0.5rem 0 0.5rem;
}

.sl-footer__desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin: 0;
}

.sl-footer__col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--silver-grey);
  margin: 0 0 1rem;
}

.sl-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sl-footer__link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition);
}

.sl-footer__link:hover {
  color: var(--white);
  text-decoration: none;
}

.sl-footer__cta-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.sl-footer__badge {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1rem;
  margin-bottom: 0;
}

.sl-footer__divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0;
}

.sl-footer__legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  flex-wrap: wrap;
}

.sl-footer__copyright {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.55;
  margin: 0;
}

.sl-footer__legal-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sl-footer__legal-link {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color var(--transition);
}

.sl-footer__legal-link:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .sl-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .sl-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .sl-header__nav {
    display: none;
  }

  .sl-hero {
    padding: var(--space-xl) 0;
  }

  .sl-tiles {
    grid-template-columns: 1fr;
  }

  .sl-card {
    padding: 1.75rem;
  }

  .sl-footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sl-footer__legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .sl-footer__legal-links {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}
