/*
  Loop Litigation digital card.
  Tokens mirror loop-litigation-website/design-system/tokens/tokens.css (brand package v006).
  {{font:…}} tokens are replaced with content-hashed URLs at build time.
*/

@font-face { font-family: "Poppins"; src: url("/assets/Poppins-Regular.7c87f6d308.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/Poppins-Medium.ae197b530c.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/Poppins-SemiBold.34bc1650b7.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/SourceSerif4-Regular.c36502b4b6.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/SourceSerif4-It.947f45f64a.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ll-ink: #101822;
  --ll-lake: #3FA9DC;
  --ll-lake-deep: #1E7FB0;
  --ll-slate: #5B6572;
  --ll-mist: #8D97A5;
  --ll-rule: #C9CED6;
  --ll-wash: #F4F6F8;
  --ll-white: #FFFFFF;
  --color-error: #B42318;
  --color-focus-ring: rgba(63, 169, 220, 0.5);

  --font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 34, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 34, 0.16);

  --card-width: 440px;
  --gutter: 20px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ll-wash);
  color: var(--ll-ink);
  font-family: var(--font-heading);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--ll-lake-deep); }
button { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ */
/* Card shell                                                          */
/* ------------------------------------------------------------------ */

.card {
  background: var(--ll-white);
  max-width: var(--card-width);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

@media (min-width: 520px) {
  body { padding: 48px 16px; }
  .card {
    min-height: 0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
  }
}

.banner {
  position: relative;
  background: var(--ll-ink);
  height: 168px;
  padding: calc(28px + env(safe-area-inset-top)) var(--gutter) 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* A quiet echo of the mark's loop, so the band isn't a flat slab. */
.banner::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -170px;
  width: 300px;
  height: 300px;
  border: 22px solid var(--ll-lake);
  border-radius: 50%;
  opacity: 0.12;
  pointer-events: none;
}

.banner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--ll-lake);
}

.banner-logo { position: relative; z-index: 1; align-self: flex-start; border-radius: var(--radius-md); }
.banner-logo img { width: 206px; height: auto; }

/* ------------------------------------------------------------------ */
/* Identity                                                            */
/* ------------------------------------------------------------------ */

.identity {
  text-align: center;
  padding: 0 var(--gutter);
}

.photo {
  width: 128px;
  height: 128px;
  margin: -64px auto 16px;
  position: relative;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--ll-white);
  box-shadow: var(--shadow-sm);
  background: var(--ll-wash);
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.role {
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ll-slate);
}

.role-break { display: none; }

.tagline {
  margin-top: 10px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ll-slate);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.98); }

/* Ink, not lake-deep: white on lake-deep is 4.45:1, just under AA for this size. */
.btn-primary { background: var(--ll-ink); color: var(--ll-white); }
.btn-primary:hover { background: #22303F; }

.btn-secondary { background: var(--ll-white); color: var(--ll-ink); border-color: var(--ll-ink); }
.btn-secondary:hover { background: var(--ll-wash); }

.btn-ghost { background: transparent; color: var(--ll-slate); border-color: var(--ll-rule); }
.btn-ghost:hover { color: var(--ll-ink); border-color: var(--ll-mist); }

.btn-block { width: 100%; }

.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Stacked, full width: "Exchange contact" wraps in a half-width button on a 440px card. */
.actions {
  display: grid;
  gap: 10px;
  padding: 24px var(--gutter) 8px;
}

/* ------------------------------------------------------------------ */
/* Contact links                                                       */
/* ------------------------------------------------------------------ */

.links {
  list-style: none;
  margin: 16px var(--gutter) 0;
  padding: 0;
  border-top: 1px solid var(--ll-rule);
}

.links li { border-bottom: 1px solid var(--ll-rule); }

.links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  color: var(--ll-ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.link-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--ll-wash);
  color: var(--ll-lake-deep);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.links a:hover .link-icon { background: var(--ll-lake); color: var(--ll-white); }

.link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.link-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ll-slate);
}

.link-value {
  font-size: 1rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.chevron { color: var(--ll-rule); width: 18px; height: 18px; }
.links a:hover .chevron { color: var(--ll-slate); }

/* ------------------------------------------------------------------ */
/* Share + footer                                                      */
/* ------------------------------------------------------------------ */

.share {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 24px var(--gutter) 0;
}

.share .btn { font-weight: 500; font-size: 0.9rem; }

.footer {
  padding: 24px var(--gutter) 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ll-slate);
}

.footer a { color: inherit; }

/* ------------------------------------------------------------------ */
/* Dialogs                                                             */
/* ------------------------------------------------------------------ */

.dialog {
  width: min(100% - 32px, 400px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  color: var(--ll-ink);
  overflow: auto;
}

.dialog::backdrop { background: rgba(16, 24, 34, 0.6); }

.dialog-body { position: relative; padding: 28px 24px 24px; }

.dialog h2 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  padding-right: 32px;
}

.dialog-lede { margin-top: 6px; color: var(--ll-slate); font-size: 0.95rem; }

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--ll-wash);
  color: var(--ll-slate);
  cursor: pointer;
}

.dialog-close:hover { color: var(--ll-ink); }

.qr-body { text-align: center; }
.qr-body h2 { padding: 0 32px; }
.qr-image { width: 100%; max-width: 280px; height: auto; margin: 20px auto 12px; }
.qr-url { font-size: 0.85rem; color: var(--ll-slate); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ */
/* Exchange form                                                       */
/* ------------------------------------------------------------------ */

#exchange-form { margin-top: 20px; }

.field { margin-bottom: 14px; }

.field label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.req { color: var(--ll-slate); }

.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--ll-rule);
  border-radius: var(--radius-md);
  background: var(--ll-white);
  color: var(--ll-ink);
  font-family: var(--font-heading);
  font-size: 1rem; /* 16px stops iOS zooming on focus */
  transition: border-color 0.15s ease;
}

.field textarea { resize: vertical; min-height: 84px; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ll-lake-deep);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.field [aria-invalid="true"] { border-color: var(--color-error); }

.field-error,
.form-error {
  color: var(--color-error);
  font-size: 0.85rem;
}

.field-error:empty,
.form-error:empty { display: none; }

.field-error { margin-top: 4px; }
.form-error { margin-bottom: 12px; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile:not(:empty) { margin-bottom: 14px; }

.notice {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ll-slate);
}

.exchange-done-view { text-align: center; padding-top: 8px; }
.exchange-done-view h2 { padding: 0 16px; }
.exchange-done-view h2:focus { outline: none; }
.exchange-done-view .btn { margin-top: 20px; }

.done-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ll-lake);
  color: var(--ll-white);
}

.done-mark .icon { width: 28px; height: 28px; stroke-width: 2.5; }

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ll-ink);
  color: var(--ll-white);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ */
/* Small screens + motion                                              */
/* ------------------------------------------------------------------ */

@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .share { grid-template-columns: 1fr; }
  .sep { display: none; }
  .role-break { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .btn:active { transform: none; }
}

.not-found { padding-top: 40px; padding-bottom: 16px; }
.not-found .btn { margin-top: 24px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
