:root {
  --landing-ink: #f4f1ea;
  --landing-ink-soft: rgba(244, 241, 234, 0.82);
  --landing-navy: #0a1a33;
  --landing-deep: #06101f;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-body);
  color: var(--landing-ink);
  background: var(--landing-deep);
}

.landing {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.landing-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.landing-slide {
  position: absolute;
  inset: 0;
  background-color: var(--landing-navy);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.6s ease, transform 8s ease-out;
}

.landing-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.landing-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 16, 31, 0.55) 0%, rgba(6, 16, 31, 0.22) 38%, rgba(6, 16, 31, 0.72) 100%),
    radial-gradient(ellipse 80% 50% at 50% 18%, rgba(10, 26, 51, 0.15), transparent 70%);
  pointer-events: none;
}

.landing-top,
.landing-main,
.landing-foot {
  position: relative;
  z-index: 1;
}

.landing-top {
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 5vw, 3rem);
}

.landing-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--landing-ink);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35);
}

.landing-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 clamp(1.25rem, 5vw, 3rem) clamp(2.5rem, 8vh, 4.5rem);
  max-width: 40rem;
}

.landing-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.8vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.landing-lead {
  margin: 0 0 1.75rem;
  max-width: 22rem;
  font-size: clamp(1.02rem, 2.2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--landing-ink-soft);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.landing-hint {
  margin: 0;
  max-width: 18rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(244, 241, 234, 0.72);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.landing-hint strong {
  font-weight: 600;
  color: rgba(244, 241, 234, 0.92);
}

.landing-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

/* Apple HIG-aligned Sign in with Apple button (black, minimum height) */
.apple-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  min-width: 240px;
  padding: 0 1.15rem;
  border: none;
  border-radius: 8px;
  background: #000;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.15s ease;
}

.apple-btn:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
  color: #fff;
}

.apple-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.apple-btn:active {
  transform: translateY(0);
}

.apple-btn-icon {
  display: flex;
  line-height: 0;
}

.apple-btn-label {
  line-height: 1;
}

.landing-status {
  margin: 0;
  font-size: 0.92rem;
  color: #f0c4b8;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.landing-status[hidden] {
  display: none;
}

.landing-foot {
  padding: 0 clamp(1.25rem, 5vw, 3rem) 1.1rem;
  font-size: 0.85rem;
}

.landing-foot a {
  color: rgba(244, 241, 234, 0.7);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.landing-foot a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .landing-slide {
    transition: opacity 0.4s ease;
    transform: none !important;
  }

  .apple-btn {
    transition: none;
  }
}

@media (max-width: 560px) {
  .landing-main {
    justify-content: flex-end;
  }

  .apple-btn {
    width: 100%;
    max-width: 320px;
  }
}
