/* Landing page — hip + fresh Sunset District design. No PII, no contributor branding. */

:root {
  --ink: hsl(222, 24%, 10%);
  --paper: hsl(36, 40%, 97%);
  --paper-soft: hsla(36, 40%, 97%, 0.86);
  --paper-softer: hsla(36, 40%, 97%, 0.62);
  --tangerine: hsl(16, 92%, 58%);
  --tangerine-soft: hsla(16, 92%, 58%, 0.85);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-accent: "Instrument Serif", ui-serif, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }

.landing-body {
  min-height: 100dvh;
  font-family: var(--font-display);
  color: var(--paper);
  background-color: hsl(210, 18%, 82%);
  position: relative;
  overflow-x: hidden;
}

/* Hero background — fixed-position layer that always fills the viewport,
   even after scroll, and works cross-browser (avoids iOS bg-attachment:fixed bugs). */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: image-set(
    url("/static/img/sunset-hero-f5b1735f-2560.webp") type("image/webp"),
    url("/static/img/sunset-hero-f5b1735f-2560.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
@media (max-width: 800px) {
  .hero-bg {
    background-image: image-set(
      url("/static/img/sunset-hero-f5b1735f-1280.webp") type("image/webp"),
      url("/static/img/sunset-hero-f5b1735f-1280.jpg") type("image/jpeg")
    );
  }
}

/* legibility scrim — soft sunset wash at the bottom, subtle amber whisper bottom-left */
.landing-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(180deg,
      transparent 0%,
      transparent 38%,
      hsla(222, 34%, 8%, 0.18) 62%,
      hsla(222, 34%, 8%, 0.62) 100%),
    radial-gradient(ellipse 80% 60% at 18% 100%, hsla(16, 92%, 40%, 0.22) 0%, transparent 70%);
}
/* fine film grain */
.landing-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.065;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* content anchored bottom-left */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.landing {
  grid-row: 2;
  max-width: min(34rem, 92vw);
}

.landing-title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96, "wght" 620;
  font-size: clamp(1.9rem, 5.2vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: -0.028em;
  margin: 0;
  width: max-content;
  max-width: min(94vw, 60rem);
  color: var(--paper);
  text-shadow: 0 2px 24px hsla(222, 40%, 6%, 0.4);
  text-wrap: balance;
  opacity: 0;
  transform: translateY(12px);
  animation: drift-in 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
}
.landing-title .swap {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--tangerine);
  padding: 0 0.06em;
  display: inline-block;
  transform: translateY(-0.04em);
}

.status {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: clamp(1.25rem, 2.5vw, 1.5rem);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 520;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsla(36, 40%, 97%, 0.88);
  text-shadow: 0 1px 8px hsla(222, 40%, 6%, 0.5);
  opacity: 0;
  animation: drift-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s forwards;
}
.status::before {
  content: "";
  display: inline-block;
  width: 1.8rem;
  height: 1px;
  background: var(--tangerine-soft);
  transform: translateY(-0.3em);
}
.status .blink {
  display: inline-block;
  width: 0.38rem; height: 0.38rem;
  border-radius: 999px;
  background: var(--tangerine);
  margin-right: 0.15rem;
  transform: translateY(0.03em);
  animation: blink 2.4s ease-in-out infinite 1.8s;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding: 0.8rem 1.2rem 0.8rem 1.05rem;
  border: 1px solid hsla(36, 40%, 97%, 0.22);
  border-radius: 999px;
  background: hsla(222, 30%, 8%, 0.5);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 500;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  animation: drift-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s forwards;
}
.login-btn:hover {
  background: var(--tangerine);
  border-color: var(--tangerine);
  color: var(--paper);
  transform: translateY(-1px);
}
.login-btn:focus-visible {
  outline: 2px solid var(--tangerine);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px hsla(16, 92%, 58%, 0.22);
}
.login-btn .gh-mark {
  flex: 0 0 auto;
}
.login-btn span {
  font-variation-settings: "opsz" 14, "wght" 520;
}

.login-help {
  display: inline-block;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding: 0.65rem 1rem;
  border: 1px solid hsla(36, 40%, 97%, 0.22);
  border-radius: 999px;
  background: hsla(222, 30%, 8%, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--paper-soft);
  opacity: 0;
  animation: drift-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s forwards;
}

.credit {
  margin: 0.85rem 0 0;
  text-align: left;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 10, "wght" 440;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsla(36, 40%, 97%, 0.72);
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  opacity: 0;
  animation: drift-in 0.9s ease-out 0.9s forwards;
}
.credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid hsla(36, 40%, 97%, 0.45);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
  border-radius: 2px;
}
.credit a:hover { border-bottom-color: hsla(36, 40%, 97%, 1); }
.credit a:focus-visible {
  outline: 2px solid var(--tangerine);
  outline-offset: 3px;
}

/* sign-in trigger — custom: italic serif word + tangerine dot + tangerine rule */
.signin-trigger {
  position: fixed;
  top: clamp(1rem, 2.5vw, 1.75rem);
  right: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 5;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.5rem 0.2rem 0.45rem;
  border: none;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: color 0.2s ease, transform 0.2s ease;
  animation: drift-down 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s forwards;
  text-shadow: 0 1px 4px hsla(222, 40%, 6%, 0.55);
}
.signin-trigger::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--tangerine);
  box-shadow: 0 0 0 3px hsla(16, 92%, 58%, 0.25);
  transform: translateY(-0.08em);
  animation: blink 2.8s ease-in-out infinite 1.6s;
}
.signin-trigger__label {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12rem;
  letter-spacing: -0.005em;
  line-height: 1;
  color: var(--paper);
  border-bottom: 1px solid hsla(36, 40%, 97%, 0.55);
  padding-bottom: 0.12em;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.signin-trigger__arrow {
  display: inline-block;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 600;
  font-size: 0.9rem;
  color: var(--tangerine);
  transform: translate(0, -0.05em);
  transition: transform 0.2s ease;
}
.signin-trigger:hover .signin-trigger__label {
  color: var(--tangerine);
  border-bottom-color: var(--tangerine);
}
.signin-trigger:hover .signin-trigger__arrow {
  transform: translate(3px, -0.05em);
}
.signin-trigger:focus-visible {
  outline: none;
}
.signin-trigger:focus-visible .signin-trigger__label {
  color: var(--tangerine);
  border-bottom-color: var(--tangerine);
  box-shadow: 0 2px 0 0 var(--tangerine);
}

/* sign-in modal — warm editorial card against dark backdrop */
.signin-dialog {
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: min(28rem, 92vw);
  width: 100%;
  margin: auto;
}
.signin-dialog:not([open]) { display: none; }
.signin-dialog::backdrop {
  background: radial-gradient(ellipse at top,
    hsla(222, 34%, 6%, 0.72) 0%,
    hsla(222, 34%, 4%, 0.88) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.signin-dialog__body {
  position: relative;
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2rem);
  background: linear-gradient(180deg,
    hsla(36, 40%, 97%, 0.98) 0%,
    hsla(36, 36%, 94%, 0.98) 100%);
  border-radius: 1rem;
  box-shadow:
    0 32px 64px -16px hsla(222, 40%, 6%, 0.55),
    0 0 0 1px hsla(222, 40%, 6%, 0.08);
  color: var(--ink);
  overflow: hidden;
}
.signin-dialog__body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tangerine) 0%, hsla(16, 92%, 58%, 0.2) 100%);
}

.signin-dialog__dismiss {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  margin: 0;
  z-index: 1;
}
.signin-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: hsla(222, 24%, 10%, 0.55);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.signin-dialog__close:hover {
  background: hsla(222, 24%, 10%, 0.08);
  color: var(--ink);
}
.signin-dialog__close:focus-visible {
  outline: 2px solid var(--tangerine);
  outline-offset: 2px;
}

.signin-dialog__eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 11, "wght" 560;
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: hsla(222, 24%, 10%, 0.52);
}
.signin-dialog__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--tangerine);
}
.signin-dialog__subtitle {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 420;
  font-size: 0.92rem;
  line-height: 1.5;
  color: hsla(222, 24%, 10%, 0.74);
  max-width: 22rem;
}

.signin-dialog__options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Reskin the existing .login-btn when inside the dialog — light surface */
.signin-dialog__options .login-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  min-height: 46px;
  margin-top: 0;
  padding: 0.7rem 1.1rem;
  border: 1px solid hsla(222, 24%, 10%, 0.18);
  border-radius: 0.55rem;
  background: hsla(36, 40%, 97%, 0.6);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 540;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  opacity: 1;
  transform: none;
  animation: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.signin-dialog__options .login-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}
.signin-dialog__options .login-btn--google {
  background: hsla(36, 40%, 97%, 0.9);
}
.signin-dialog__options .login-btn--google:hover {
  background: hsla(217, 89%, 51%, 0.95);
  border-color: hsla(217, 89%, 45%, 1);
  color: var(--paper);
}

@keyframes drift-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drift-down {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 45%, 100% { opacity: 1; }
  50%, 95% { opacity: 0.25; }
}

/* testimonials — editorial pull-quote treatment */
.quotes-section {
  position: relative;
  z-index: 3;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem) clamp(2rem, 5vw, 3.5rem);
  max-width: 82rem;
}

.quotes-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 1rem 0.55rem 1.05rem;
  background: hsla(222, 34%, 7%, 0.52);
  border: 1px solid hsla(36, 40%, 97%, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(10px) saturate(108%);
  -webkit-backdrop-filter: blur(10px) saturate(108%);
  box-shadow: 0 8px 24px -10px hsla(222, 40%, 6%, 0.45);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 620;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 1px 3px hsla(222, 40%, 6%, 0.7);
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
}
.quotes-heading::before {
  content: "";
  display: inline-block;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: var(--tangerine);
  flex: 0 0 auto;
}
.quotes-heading::after {
  content: "";
  display: inline-block;
  width: clamp(1.75rem, 5vw, 2.75rem);
  height: 1px;
  background: linear-gradient(90deg, var(--tangerine) 0%, hsla(16, 92%, 58%, 0.25) 100%);
  opacity: 0.95;
}

.quotes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.testimonial-card {
  position: relative;
  background: linear-gradient(180deg,
    hsla(222, 34%, 7%, 0.58) 0%,
    hsla(222, 34%, 5%, 0.72) 100%);
  border: 1px solid hsla(36, 40%, 97%, 0.08);
  border-radius: 0.65rem;
  backdrop-filter: blur(12px) saturate(108%);
  -webkit-backdrop-filter: blur(12px) saturate(108%);
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.4rem, 2.75vw, 1.75rem)
           clamp(1.35rem, 2.75vw, 1.65rem) clamp(1.4rem, 2.75vw, 1.75rem);
  box-shadow: 0 18px 36px -22px hsla(222, 40%, 6%, 0.55);
  opacity: 0;
  transform: translateY(10px);
  animation: drift-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.9s forwards;
  overflow: hidden;
}
.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg,
    var(--tangerine) 0%,
    hsla(16, 92%, 58%, 0.18) 100%);
}
.testimonial-card:nth-child(2) { animation-delay: 1.05s; }
.testimonial-card:nth-child(3) { animation-delay: 1.2s; }

.testimonial-quote {
  margin: 0;
  padding: 0;
}

.testimonial-text {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 16, "wght" 430;
  font-size: clamp(1.02rem, 2.15vw, 1.12rem);
  line-height: 1.55;
  color: var(--paper);
  text-shadow: 0 1px 2px hsla(222, 40%, 6%, 0.65);
  margin: 0 0 1.05rem;
  text-wrap: pretty;
  hyphens: none;
}

.testimonial-attribution {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 12, "wght" 600;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.92;
  text-shadow: 0 1px 2px hsla(222, 40%, 6%, 0.55);
}
.testimonial-attribution::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: var(--tangerine);
  opacity: 0.9;
}

/* On mobile the three stacked cards push the .landing-title below the fold.
   Hide testimonials so the hero title is visible on first viewport. (opits-1ak) */
@media (max-width: 800px) {
  .quotes-section { display: none; }
}

/* ---- pending-review / denied page (opits-34n) ------------------------------
   Shares hero-bg + .stage + .landing layout with the landing page so the
   moment after sign-in feels like a continuation of the same world. */
.pending-tagline {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  line-height: 1.25;
  margin: clamp(0.6rem, 1.4vw, 0.85rem) 0 0;
  color: hsla(36, 40%, 97%, 0.94);
  text-shadow: 0 1px 10px hsla(222, 40%, 6%, 0.55);
  letter-spacing: -0.005em;
  opacity: 0;
  animation: drift-in 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s forwards;
}
.pending-tagline::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 1px;
  background: var(--tangerine);
  opacity: 0.85;
  vertical-align: middle;
  margin-right: 0.7rem;
  transform: translateY(-0.18em);
}

.pending-signout {
  display: inline-block;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "wght" 520;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: hsla(36, 40%, 97%, 0.82);
  text-decoration: none;
  border-bottom: 1px solid hsla(36, 40%, 97%, 0.38);
  padding-bottom: 2px;
  text-shadow: 0 1px 8px hsla(222, 40%, 6%, 0.5);
  transition: color 180ms ease, border-color 180ms ease;
  opacity: 0;
  animation: drift-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.75s forwards;
}
.pending-signout:hover {
  color: var(--paper);
  border-bottom-color: var(--tangerine);
}
.pending-signout:focus-visible {
  outline: 2px solid var(--tangerine);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pending-tagline,
  .pending-signout { animation: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-title, .status, .login-btn, .login-help, .credit {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .status .blink { animation: none; }
  .testimonial-card,
  .signin-trigger {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
