/* Sydney Brooks landing page.
   Mobile-first: the card fills the viewport.
   At >=1024px the same markup becomes a 9:16 phone frame with a pitch column
   beside it, mirroring the reference layout. */

:root {
  --accent: #00aff0;
  --bg: #0a0a0c;
  --frame-bg: #0c0c0e;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-faint: rgba(255, 255, 255, 0.45);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --radius-card: 1.5rem;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- layout shell ---------- */

.stage {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 100dvh;
}

/* ---------- the frame (card viewport) ---------- */

.frame {
  position: relative;
  width: 100%;
  /* A fixed height, not min-height: the body inside scrolls, and it can only
     do that against a bounded parent. */
  height: 100dvh;
  overflow: hidden;
  background: var(--frame-bg);
}

/* Blurred copy of the cover, used as ambient backdrop. */
.frame__wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  filter: blur(40px);
  opacity: 0.4;
}

.frame__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.frame__body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* On short phones the card + bridge can exceed the viewport. The frame
     clips, so this must scroll or the fallback handle becomes unreachable -
     precisely when the visitor needs it. `safe` keeps centring while
     preventing the top from being cut once content overflows; browsers that
     do not parse it keep the plain `center` above. */
  justify-content: safe center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  gap: 1.25rem;
  /* Respect notches and home indicators on iOS. */
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem
    max(1.5rem, env(safe-area-inset-bottom)) 1.5rem;
}

/* ---------- card ---------- */

.card {
  flex-shrink: 0;
  width: 100%;
  max-width: 24rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.card__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #18181b;
}

.card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__meta {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card__name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card__name h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
}

.card__name svg {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.card__bio {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  white-space: pre-line;
}

.card__note {
  margin: 0;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--text-faint);
}

/* ---------- CTA ---------- */

.cta {
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
  /* Kills the 300ms tap delay and the grey flash in mobile webviews. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover {
  filter: brightness(1.08);
}

.cta:active {
  transform: scale(0.985);
}

.cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cta[disabled] {
  opacity: 0.4;
  cursor: default;
}

/* ---------- legal ---------- */

.legal {
  max-width: 24rem;
  text-align: center;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- bridge fallback ---------- */
/* Shown only when the deeplink appears to have failed, so the visitor can
   still reach the bot by hand instead of dead-ending in the webview. */

.bridge {
  margin-top: 0.25rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}

.bridge[hidden] {
  display: none;
}

.bridge__text {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
}

.bridge__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
}

.bridge__handle {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  /* Let the visitor select it by hand if the copy button is unavailable. */
  user-select: all;
  -webkit-user-select: all;
}

.bridge__copy {
  flex-shrink: 0;
  border: 0;
  background: none;
  padding: 0 0.125rem;
  color: var(--accent);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bridge__copy:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* ---------- desktop ---------- */

@media (min-width: 1024px) {

  /* The column is right-POSITIONED, but its contents are a single
     left-aligned block. Aligning each child individually (align-items:
     flex-end on a column flex) makes every line start at a different x
     and shoves the shrink-to-fit badge off to its own edge. */

  .frame {
    width: auto;
    min-height: 0;
    height: 92vh;
    aspect-ratio: 9 / 16;
    flex-shrink: 0;
    align-self: center;
    border-radius: 2.5rem;
    border: 1px solid #000;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  }

  .frame__body {
    height: 100%;
    padding: 2.5rem 1.5rem;
    overflow-y: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
