/* ──────────────────────────────────────────────────────────────────────────
   The Sign Language Studio — Team pages (slstudio.io/team)
   Editorial, warm, approachable — shares the slstudio.io design language:
   cream canvas, olive accent, plum secondary, DM Serif Display headings,
   IBM Plex Sans body, IBM Plex Mono eyebrows. Light by default; dark via
   :root[data-dark="1"] (toggle persists to localStorage 'sls-theme').
   ────────────────────────────────────────────────────────────────────────── */

:root {
  --bg:           #FBF7EE;   /* canvas */
  --bg-2:         #F5EFE0;   /* surface */
  --bg-3:         #EBE0C7;   /* surface-2 / accents */
  --ink:          #1F1A12;   /* text */
  --ink-2:        #5A4F3F;   /* text-2 */
  --ink-3:        #706656;   /* text-muted (AA on --bg and --bg-2) */
  --ink-4:        #B5A98D;   /* hairline labels */
  --rule:         #D9C9A3;   /* border */
  --rule-2:       #E5D9BD;   /* softer hairline */

  --accent:       #3A4A2E;   /* primary accent (olive) */
  --accent-hover: #2A361F;
  --accent-ink:   #FBF7EE;   /* text on accent fill */
  --accent-soft:  color-mix(in oklab, var(--accent) 14%, var(--bg));
  --accent-mark:  #65724A;   /* mid-olive (matches the mark's light ribbon) */

  --deep:         #7C4A66;   /* secondary (dusty plum, matches the mark's ribbon) */
  --deep-hover:   #623850;
  --deep-ink:     #FBF7EE;   /* text on deep fill */

  --link:         #6E3F58;   /* inline body link (plum) */

  --font-display: "DM Serif Display", "Source Serif 4", Georgia, serif;
  --font-sans:    "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  color-scheme: light;
}

:root[data-dark="1"] {
  --bg:           #14110B;
  --bg-2:         #1F1A12;
  --bg-3:         #2D2618;
  --ink:          #FBF7EE;
  --ink-2:        #C9BFA7;
  --ink-3:        #9A917E;
  --ink-4:        #6B6250;
  --rule:         #5A4F3F;
  --rule-2:       #3A332A;

  --accent:       #B5CB91;
  --accent-hover: #D2E2B5;
  --accent-ink:   #14110B;
  --accent-mark:  #B5CB91;

  --deep:         #C089A6;
  --deep-hover:   #D2A2BC;
  --deep-ink:     #14110B;

  --link:         #E0B6CE;

  color-scheme: dark;
}

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

html { transition: background-color 0.25s ease; scroll-behavior: smooth; }
html, body {
  min-height: 100%;
  background-color: var(--bg);
  font-family: var(--font-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Soft paper texture wash behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(90% 50% at 20% 0%, color-mix(in oklab, var(--accent) 7%, transparent) 0%, transparent 60%),
    radial-gradient(70% 50% at 90% 100%, color-mix(in oklab, var(--deep) 6%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 22px 56px;
}

.container, .tcard {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.container { max-width: 1280px; }
.tcard { max-width: 1080px; }

/* ── Entrance animation ──────────────────────────────────────────────────── */
.anim { opacity: 0; animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.anim-1 { animation-delay: 0.04s; }
.anim-2 { animation-delay: 0.12s; }
.anim-3 { animation-delay: 0.20s; }
.anim-4 { animation-delay: 0.28s; }
.anim-5 { animation-delay: 0.36s; }
.anim-6 { animation-delay: 0.44s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo wordmark ───────────────────────────────────────────────────────── */
/* Inline sprite (#sls-logo): the cube mark keeps fixed brand colors and the
   wordmark uses currentColor, so it follows the theme on its own. */
.logo { margin-bottom: 30px; display: flex; justify-content: center; color: var(--ink); }
.logo svg { height: clamp(56px, 6vw, 100px); width: auto; max-width: 92vw; }

/* ── Heading block ───────────────────────────────────────────────────────── */
.heading { text-align: center; margin-bottom: 30px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.heading h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4.6vw, 2.3rem);
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--ink);
  margin-bottom: 10px;
  text-wrap: balance;
}
.heading h1 em {
  font-style: italic;
  color: var(--accent);
  font-feature-settings: "ss01";
  white-space: nowrap;
}
.heading p {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0 auto;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
  margin-bottom: 30px;
}

/* ── Team grid ───────────────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  /* Fluid: cards sit two-up when there's room for ~360px each, else stack. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  width: 100%;
  margin-bottom: clamp(24px, 2.6vw, 36px);
}
.member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(32px, 4vw, 60px) clamp(20px, 3vw, 44px) clamp(28px, 3.2vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.member-card:hover {
  border-color: color-mix(in oklab, var(--accent) 45%, var(--rule));
  transform: translateY(-4px);
  box-shadow: 0 22px 48px -26px color-mix(in oklab, var(--ink) 55%, transparent);
}

/* Avatar */
.avatar-wrap { position: relative; margin-bottom: clamp(20px, 2.2vw, 32px); }
.avatar-ring {
  --avatar: clamp(120px, 14vw, 190px);
  width: var(--avatar); height: var(--avatar);
  border-radius: var(--radius-full);
  padding: clamp(3px, 0.35vw, 5px);
  background: conic-gradient(from 140deg, var(--accent), var(--accent-mark), var(--deep), var(--accent));
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
}
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.6rem);
  color: var(--accent);
  display: none;
}
.pulse-ring {
  position: absolute; inset: clamp(-14px, -1vw, -8px);
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  animation: pulseRing 3.4s ease-in-out infinite;
}
.pulse-ring-2 {
  position: absolute; inset: clamp(-30px, -2.2vw, -16px);
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in oklab, var(--accent) 14%, transparent);
  animation: pulseRing 3.4s 0.9s ease-in-out infinite;
}
@keyframes pulseRing {
  0%, 100% { opacity: 0.4; transform: scale(0.99); }
  50%       { opacity: 1;   transform: scale(1.01); }
}

/* Identity */
.member-identity { display: flex; flex-direction: column; align-items: center; flex: 1; width: 100%; }
.member-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2vw, 2.3rem);
  letter-spacing: -0.018em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: clamp(12px, 1.3vw, 20px);
}
.title-badge {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 0.9vw, 12px);
  padding: clamp(6px, 0.7vw, 9px) clamp(14px, 1.4vw, 20px);
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 0.75vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(16px, 2.4vw, 32px);
  max-width: 100%;
}
.title-badge .tlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-dot {
  width: clamp(6px, 0.6vw, 10px); height: clamp(6px, 0.6vw, 10px);
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 5px 1px color-mix(in oklab, var(--accent) 60%, transparent);
  animation: dotGlow 2.6s ease-in-out infinite;
}
@keyframes dotGlow {
  0%, 100% { box-shadow: 0 0 4px 1px color-mix(in oklab, var(--accent) 50%, transparent); }
  50%      { box-shadow: 0 0 11px 3px color-mix(in oklab, var(--accent) 90%, transparent); }
}

/* View profile link */
.member-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 0.6vw, 10px);
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 0.95vw, 1.15rem);
  font-weight: 500;
  color: var(--link);
}
.member-cta .arrow { transition: transform 0.2s ease; }
.member-card:hover .member-cta { color: var(--accent-hover); }
.member-card:hover .member-cta .arrow { transform: translateX(3px); }

/* Whole-card link (the card itself is a div so the social buttons below can
   be real links without nesting anchors). */
.member-link { position: absolute; inset: 0; z-index: 1; }

/* Per-member social buttons (LinkedIn / Instagram) */
.member-socials {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(8px, 0.9vw, 12px);
  margin-bottom: clamp(14px, 1.6vw, 22px);
}
.member-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(34px, 3vw, 42px);
  height: clamp(34px, 3vw, 42px);
  border-radius: var(--radius-full);
  border: 1px solid var(--rule);
  color: var(--ink);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.member-social:hover {
  color: var(--accent);
  border-color: color-mix(in oklab, var(--accent) 45%, var(--rule));
  background: var(--accent-soft);
}
.member-social svg { width: 55%; height: 55%; fill: currentColor; }

/* ── Profile card (individual pages) ─────────────────────────────────────── */
.profile {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 5vw, 80px) clamp(24px, 5vw, 72px) clamp(36px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.profile .avatar-ring { --avatar: clamp(170px, 18vw, 260px); }
.profile .avatar-initials { font-size: clamp(2.4rem, 3vw, 4rem); }
.identity { text-align: center; width: 100%; margin-bottom: 6px; }
.identity .name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ink);
  margin-bottom: clamp(14px, 1.5vw, 22px);
}
/* Location sits on its own line, centered below the title badge. */
.identity .title-badge { margin-bottom: 0; }
.location {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(5px, 0.5vw, 8px);
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 0.85vw, 1.05rem);
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-top: clamp(12px, 1.2vw, 20px);
}
.location svg { width: clamp(12px, 1.1vw, 18px); height: clamp(12px, 1.1vw, 18px); fill: var(--ink-3); }
.profile .divider { margin: clamp(24px, 2.5vw, 40px) 0; }
.cta-text {
  font-size: clamp(0.95rem, 1.1vw, 1.3rem);
  color: var(--ink-2);
  margin-bottom: clamp(20px, 2.2vw, 32px);
}

/* ── Action tiles (icon buttons) ─────────────────────────────────────────── */
/* Tiles shrink to share one line — they never wrap, and cap out on wide screens. */
.actions { display: flex; gap: clamp(8px, 1.4vw, 18px); justify-content: center; width: 100%; }
.btn-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; max-width: 96px; transition: transform 0.18s ease; }
.btn-tile:hover { transform: translateY(-3px); }
.btn-tile:active { transform: translateY(0) scale(0.97); }
.btn-icon {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-tile:hover .btn-icon {
  background: var(--accent-soft);
  border-color: color-mix(in oklab, var(--accent) 50%, var(--rule));
  box-shadow: 0 8px 20px -10px color-mix(in oklab, var(--accent) 60%, transparent);
}
.btn-icon svg { width: 40%; height: 40%; fill: var(--ink-2); transition: fill 0.2s; }
.btn-tile:hover .btn-icon svg { fill: var(--accent); }
.btn-label {
  font-family: var(--font-mono);
  font-size: clamp(0.58rem, 0.65vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ── Back link + footer ──────────────────────────────────────────────────── */
.back-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 5px;
  margin-bottom: 6px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }
.footer { margin-top: 30px; text-align: center; }
.footer a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 0.2s;
}
.footer a:hover { color: var(--ink); }

/* ── Floating control buttons (toggle / qr / contact) ────────────────────── */
.fab {
  position: fixed;
  right: 18px;
  z-index: 200;
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  backdrop-filter: saturate(150%) blur(10px);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: background 0.2s, border-color 0.2s, transform 0.18s, color 0.2s, box-shadow 0.2s;
  padding: 0; outline: none;
}
.fab:hover {
  border-color: color-mix(in oklab, var(--accent) 55%, var(--rule));
  color: var(--accent);
  transform: scale(1.07);
  box-shadow: 0 8px 22px -10px color-mix(in oklab, var(--ink) 60%, transparent);
}
.fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fab svg { width: 18px; height: 18px; }
.theme-toggle { top: 18px; }
.qr-btn      { top: 70px; }
.contact-btn { top: 122px; }

.icon-sun, .icon-moon { position: absolute; width: 18px; height: 18px; transition: opacity 0.25s, transform 0.25s; }
.icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.6); }
.icon-moon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-dark="1"] .icon-sun  { opacity: 1; transform: rotate(0) scale(1); }
:root[data-dark="1"] .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }

/* ── QR / contact lightbox ───────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: color-mix(in oklab, var(--ink) 55%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  width: 312px;
  position: relative;
  box-shadow: 0 40px 80px -24px color-mix(in oklab, var(--ink) 70%, transparent);
  transform: scale(0.9) translateY(14px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.overlay.active .modal { transform: scale(1) translateY(0); }
.qr-code-img {
  width: 224px; height: 224px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  border: 1px solid var(--rule-2);
}
.modal-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  text-align: center;
}
.modal-url {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-align: center;
  margin-top: -4px;
}
.modal-divider { width: 100%; height: 1px; background: var(--rule); margin: 2px 0; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; line-height: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  padding: 0; outline: none;
}
.modal-close:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.share-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-full);
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-sans);
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.18s;
  outline: none;
}
.share-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.share-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
/* Card and logo sizing is fluid (clamp + vw) — no per-breakpoint overrides needed. */
@media (max-width: 520px) {
  .page { padding: 40px 14px 36px; }
  .member-card .pulse-ring, .member-card .pulse-ring-2 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
