/* Public landing + staff login — scoped; does not affect authenticated shell */

:root {
  --ll-primary: #0071a2;
  --ll-primary-deep: #00567c;
  --ll-teal: #089bab;
  --ll-teal-soft: #0db5c8;
  --ll-ink: #123243;
  --ll-muted: #4d6572;
  --ll-line: #c5d8e0;
  --ll-surface: #f4fafb;
  --ll-white: #ffffff;
  --ll-danger: #b42318;
  --ll-danger-bg: #fef3f2;
  --ll-success: #067647;
  --ll-success-bg: #ecfdf3;
  --ll-radius: 14px;
  --ll-font-display: "Epilogue", "Segoe UI", sans-serif;
  --ll-font-body: "Karla", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body.ll-body {
  margin: 0;
  min-height: 100%;
  font-family: var(--ll-font-body);
  color: var(--ll-ink);
  background: var(--ll-surface);
  -webkit-font-smoothing: antialiased;
}

.ll-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ll-white);
  color: var(--ll-ink);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.ll-skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.ll-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

/* —— Brand / hero plane —— */
.ll-hero {
  position: relative;
  overflow: hidden;
  color: var(--ll-white);
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(13, 181, 200, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(0, 86, 124, 0.45), transparent 50%),
    linear-gradient(145deg, var(--ll-primary-deep) 0%, var(--ll-primary) 42%, var(--ll-teal) 100%);
}

.ll-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
  animation: ll-grid-drift 28s linear infinite;
}

.ll-hero::after {
  content: "";
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  right: -18vmax;
  bottom: -22vmax;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 68%);
  pointer-events: none;
  animation: ll-glow-breathe 9s ease-in-out infinite;
}

.ll-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.ll-brand {
  margin: 0 0 1.75rem;
  font-family: var(--ll-font-display);
  font-weight: 700;
  font-size: clamp(2.15rem, 4.2vw, 3.15rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  animation: ll-rise 0.7s ease both;
}

.ll-headline {
  margin: 0 0 0.85rem;
  font-family: var(--ll-font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 22ch;
  animation: ll-rise 0.7s ease 0.08s both;
}

.ll-lede {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  max-width: 34ch;
  animation: ll-rise 0.7s ease 0.16s both;
}

.ll-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  animation: ll-rise 0.7s ease 0.24s both;
}

.ll-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.35rem;
  border-radius: 10px;
  background: var(--ll-white);
  color: var(--ll-primary-deep);
  font-family: var(--ll-font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.ll-cta-primary:hover,
.ll-cta-primary:focus-visible {
  background: #eef8fa;
  transform: translateY(-1px);
  outline: none;
}

.ll-cta-secondary {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.ll-cta-secondary:hover,
.ll-cta-secondary:focus-visible {
  color: #fff;
}

.ll-visual {
  position: relative;
  z-index: 1;
  margin-top: clamp(2rem, 6vh, 3.5rem);
  max-width: 34rem;
  animation: ll-rise 0.85s ease 0.3s both;
}

.ll-visual svg {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.95;
}

.ll-hero-foot {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

/* —— Login panel —— */
.ll-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background:
    linear-gradient(180deg, #f7fcfd 0%, #eef6f8 48%, #e8f2f5 100%);
  position: relative;
}

.ll-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(8, 155, 171, 0.08), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(0, 113, 162, 0.07), transparent 45%);
  pointer-events: none;
}

.ll-form-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24rem;
  background: var(--ll-white);
  border: 1px solid rgba(0, 113, 162, 0.12);
  border-radius: var(--ll-radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 1px 2px rgba(18, 50, 67, 0.04);
}

.ll-form-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ll-teal);
}

.ll-form-title {
  margin: 0 0 0.35rem;
  font-family: var(--ll-font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ll-ink);
}

.ll-form-sub {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  color: var(--ll-muted);
  line-height: 1.45;
}

.ll-alert {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.ll-alert--error {
  background: var(--ll-danger-bg);
  color: var(--ll-danger);
  border: 1px solid #fecdca;
}

.ll-alert--success {
  background: var(--ll-success-bg);
  color: var(--ll-success);
  border: 1px solid #abefc6;
}

.ll-field {
  margin-bottom: 1rem;
}

.ll-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ll-ink);
}

.ll-field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--ll-line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ll-ink);
  background: #fbfefe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ll-field input:hover {
  border-color: #9bbdca;
}

.ll-field input:focus {
  outline: none;
  border-color: var(--ll-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 162, 0.18);
  background: var(--ll-white);
}

.ll-field input[aria-invalid="true"] {
  border-color: var(--ll-danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.ll-field-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--ll-danger);
}

.ll-field.is-invalid .ll-field-error {
  display: block;
}

.ll-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--ll-primary);
  color: var(--ll-white);
  font-family: var(--ll-font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.ll-submit:hover,
.ll-submit:focus-visible {
  background: var(--ll-primary-deep);
  outline: none;
}

.ll-submit:active {
  transform: translateY(1px);
}

.ll-form-meta {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ll-muted);
}

.ll-form-links {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
}

.ll-form-links a {
  color: var(--ll-primary);
  text-decoration: none;
  font-weight: 600;
}

.ll-form-links a:hover,
.ll-form-links a:focus-visible {
  text-decoration: underline;
  outline: none;
}

@keyframes ll-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ll-grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 48px 48px, 48px 48px;
  }
}

@keyframes ll-glow-breathe {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ll-brand,
  .ll-headline,
  .ll-lede,
  .ll-cta-group,
  .ll-visual,
  .ll-hero::before,
  .ll-hero::after {
    animation: none !important;
  }
}

/* Tablet landscape / small desktop: keep split, slightly tighter */
@media (min-width: 901px) and (max-width: 1024px) {
  .ll-shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  }

  .ll-hero {
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
  }

  .ll-brand {
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    margin-bottom: 1.25rem;
  }

  .ll-headline {
    font-size: 1.25rem;
  }

  .ll-lede {
    font-size: 0.98rem;
    margin-bottom: 1.25rem;
  }

  .ll-visual {
    margin-top: 1.5rem;
    max-width: 28rem;
  }

  .ll-panel {
    padding: 1.5rem;
  }

  .ll-form-wrap {
    max-width: 22rem;
    padding: 1.5rem;
  }
}

/* Mobile + tablet portrait: brand first, then login — one stacked composition */
@media (max-width: 900px) {
  .ll-shell {
    grid-template-columns: 1fr;
  }

  .ll-hero {
    min-height: auto;
    padding: 1.35rem 1.25rem 1.5rem;
    justify-content: flex-start;
  }

  .ll-brand {
    margin-bottom: 0.85rem;
    font-size: clamp(1.7rem, 6vw, 2.15rem);
  }

  .ll-headline {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    max-width: none;
  }

  .ll-lede {
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
    max-width: none;
  }

  .ll-cta-group {
    margin-bottom: 0;
  }

  .ll-visual {
    display: none; /* free fold space so Login stays in first viewport */
  }

  .ll-hero-foot {
    margin-top: 1rem;
    font-size: 0.75rem;
  }

  .ll-panel {
    padding: 0 1rem 1.5rem;
    margin-top: -0.85rem;
    align-items: flex-start;
    background: transparent;
  }

  .ll-panel::before {
    display: none;
  }

  .ll-form-wrap {
    box-shadow: 0 8px 28px rgba(18, 50, 67, 0.1);
    padding: 1.2rem 1.15rem;
  }

  .ll-form-title {
    font-size: 1.3rem;
  }

  .ll-form-sub {
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }

  .ll-field {
    margin-bottom: 0.8rem;
  }

  .ll-field input {
    padding: 0.7rem 0.85rem;
  }

  .ll-submit {
    padding: 0.8rem 1rem;
  }

  .ll-form-links {
    margin-top: 0.85rem;
  }

  .ll-form-meta {
    margin-top: 0.75rem;
  }

  .ll-cta-primary {
    display: none; /* login is immediately below */
  }
}

/* Short phones (~390×844): brand + form + Login above the fold */
@media (max-width: 900px) and (max-height: 900px) {
  .ll-hero {
    padding: 1rem 1.1rem 1.15rem;
  }

  .ll-brand {
    margin-bottom: 0.55rem;
    font-size: 1.65rem;
  }

  .ll-headline {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
  }

  .ll-lede {
    display: none; /* supporting copy scrolls; brand + Login stay first */
  }

  .ll-hero-foot {
    display: none;
  }

  .ll-panel {
    margin-top: -0.55rem;
    padding: 0 0.95rem 1.1rem;
  }

  .ll-form-wrap {
    padding: 1rem 1rem 1.05rem;
  }

  .ll-form-kicker {
    margin-bottom: 0.2rem;
    font-size: 0.72rem;
  }

  .ll-form-title {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
  }

  .ll-form-sub {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .ll-field {
    margin-bottom: 0.65rem;
  }

  .ll-field label {
    margin-bottom: 0.28rem;
    font-size: 0.82rem;
  }

  .ll-field input {
    padding: 0.62rem 0.75rem;
  }

  .ll-submit {
    margin-top: 0.2rem;
    padding: 0.72rem 0.9rem;
  }

  .ll-form-links {
    margin-top: 0.7rem;
  }

  .ll-form-meta {
    display: none;
  }
}

/* Tablet portrait (768–900): restore small visual when height allows */
@media (min-width: 768px) and (max-width: 900px) and (min-height: 901px) {
  .ll-visual {
    display: block;
    max-width: 18rem;
    margin: 1.15rem auto 0;
  }

  .ll-lede {
    display: block;
  }

  .ll-hero {
    padding: 1.75rem 1.75rem 2rem;
  }

  .ll-panel {
    padding: 0 1.5rem 2rem;
  }

  .ll-form-wrap {
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .ll-brand {
    font-size: 1.7rem;
  }

  .ll-form-wrap {
    padding: 1.05rem;
  }
}

/* Tablet landscape (~901–1024): two-column, large taps */
@media (min-width: 901px) and (max-width: 1024px) {
  .ll-shell {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .ll-brand {
    font-size: clamp(2rem, 3.4vw, 2.55rem);
  }

  .ll-field input,
  .ll-submit {
    min-height: 48px;
    font-size: 1.05rem;
  }

  .ll-form-wrap {
    padding: 1.65rem 1.5rem;
  }
}

@media (max-width: 900px) and (min-width: 600px) {
  .ll-field input,
  .ll-submit,
  .ll-cta-secondary {
    min-height: 48px;
    font-size: 1.02rem;
  }
}
