/* utsa-webring: "San Antonio warmth" theme */

/* Fonts (SIL Open Font License, see /assets/fonts/OFL-*.txt) ---------------- */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/work-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/work-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens ------------------------------------------------------------------ */

:root {
  --c-sand: #f5ede0;
  --c-paper: #fffaf2;
  --c-ink: #2a1f1a;
  --c-ink-soft: #5c4a3f;
  --c-terracotta: #a8432a;
  --c-terracotta-dark: #7a2e1b;
  --c-teal: #1d6b6b;
  --c-marigold: #e0a526;
  --c-rosa: #c2457a;
  --c-plum: #7a4fa0;
  --c-white: #ffffff;

  --bg: var(--c-sand);
  --surface: var(--c-paper);
  --text: var(--c-ink);
  --text-soft: var(--c-ink-soft);
  --border: #e6d8c5;
  --border-strong: #8c7a6b; /* >= 3:1 against --bg and --surface, for form control outlines */
  --track: #c9b9a6; /* decorative: the loop's dotted path */
  --link: var(--c-terracotta);
  --link-hover: var(--c-terracotta-dark);
  --focus: var(--c-teal);
  --code-bg: #efe4d3;
  --inverse-bg: var(--c-ink);
  --inverse-text: var(--c-sand);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

  --radius: 16px;
  --gutter: 16px;
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1713;
    --surface: #2a201b;
    --text: var(--c-sand);
    --text-soft: #cdbfae;
    --border: #3d2f27;
    --border-strong: #8a7563;
    --track: #5a4739;
    --link: #f0a98f;
    --link-hover: #ffd2c2;
    --focus: var(--c-marigold);
    --code-bg: #33271f;
    --inverse-bg: #352820;
    --inverse-text: var(--c-sand);
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

/* Swatches shared by avatars, loop nodes and papel picado flags. */
.swatch-0 { --swatch: var(--c-terracotta); --swatch-ink: var(--c-white); }
.swatch-1 { --swatch: var(--c-teal); --swatch-ink: var(--c-white); }
.swatch-2 { --swatch: var(--c-marigold); --swatch-ink: var(--c-ink); }
.swatch-3 { --swatch: var(--c-rosa); --swatch-ink: var(--c-white); }
.swatch-4 { --swatch: var(--c-plum); --swatch-ink: var(--c-white); }

/* Base -------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

img,
svg {
  max-width: 100%;
}

code,
pre,
textarea.code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

:not(pre) > code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 8px 16px;
  background: var(--inverse-bg);
  color: var(--inverse-text);
  border-radius: 8px;
}

.skip-link:focus {
  top: 8px;
}

[hidden] {
  display: none !important;
}

/* Header and footer ------------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 8px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.625rem;
  color: var(--text);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--text);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 500;
}

.nav-list a {
  display: inline-block;
  padding-block: 10px;
}

.site-footer {
  padding-block: 32px 48px;
  color: var(--text-soft);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0 0 6px;
}

/* Decoration -------------------------------------------------------------- */

.picado {
  display: block;
  width: 100%;
  height: 92px;
}

.picado-string {
  stroke: var(--text-soft);
  stroke-width: 2;
}

.picado-flag {
  fill: var(--swatch);
}

.tile-strip {
  display: block;
}

.tile-ground { fill: var(--c-teal); }
.tile-star { fill: var(--c-sand); }
.tile-center { fill: var(--c-marigold); }
.tile-corner { fill: var(--c-terracotta); }

/* Typography -------------------------------------------------------------- */

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 7vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.display--page {
  font-size: clamp(2.25rem, 5vw, 3rem);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.15;
}

.eyebrow {
  margin: 0;
  color: var(--c-teal);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lede {
  margin: 0;
  max-width: 36rem;
  font-size: 1.1875rem;
}

@media (prefers-color-scheme: dark) {
  .eyebrow {
    color: #7fc8c8;
  }
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: var(--c-terracotta);
  color: var(--c-white);
}

.button--primary:hover {
  background: var(--c-terracotta-dark);
  color: var(--c-white);
}

.button--outline {
  border-color: var(--text);
  color: var(--text);
}

.button--outline:hover {
  background: var(--text);
  color: var(--bg);
}

.button--light {
  background: var(--c-sand);
  color: var(--c-ink);
}

.button--light:hover {
  background: var(--c-white);
  color: var(--c-ink);
}

.button--small {
  min-height: 44px;
  padding: 6px 16px;
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

/* Hero and loop ----------------------------------------------------------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 48px;
  padding-block: 32px 48px;
}

.hero-copy {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.hero-loop {
  display: flex;
  flex: 1 1 340px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.hero-loop figcaption {
  max-width: 28rem;
  color: var(--text-soft);
  font-size: 0.875rem;
  text-align: center;
}

.loop {
  width: 100%;
  max-width: 440px;
  height: auto;
  overflow: visible;
}

.loop-track {
  fill: none;
  stroke: var(--track);
  stroke-width: 2;
  stroke-dasharray: 2 8;
  stroke-linecap: round;
}

.loop-track--wrap {
  stroke-dasharray: 1 6;
}

.loop-arrow {
  fill: none;
  stroke: var(--c-terracotta);
  stroke-width: 3;
}

.loop-arrowhead {
  fill: var(--c-terracotta);
}

@media (prefers-color-scheme: dark) {
  .loop-arrow {
    stroke: var(--link);
  }

  .loop-arrowhead {
    fill: var(--link);
  }
}

.loop-dot {
  fill: var(--swatch);
}

.loop-node:hover .loop-dot {
  stroke: var(--text);
  stroke-width: 2;
}

.loop-halo {
  fill: none;
  stroke: var(--c-marigold);
  stroke-width: 3;
}

.loop-initials {
  fill: var(--swatch-ink);
  font-family: var(--font-body);
  font-weight: 600;
  pointer-events: none;
}

.loop-count {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
}

.loop-label {
  fill: var(--text-soft);
  font-family: var(--font-body);
  font-size: 14px;
}

.loop-node {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes loop-pop {
  from {
    opacity: 0;
    transform: scale(0.2);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.loop--animate .loop-node {
  animation: loop-pop 420ms cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
  animation-delay: var(--delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .loop--animate .loop-node {
    animation: none;
  }
}

/* Members ----------------------------------------------------------------- */

.members {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 40px;
}

.members-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}

.field--search {
  flex: 1 1 260px;
}

.field input,
.field select,
.field textarea {
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
}

.field textarea {
  width: 100%;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.chip-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.chip-input:checked + .chip {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.chip-input:focus-visible + .chip {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.filter-status,
.filter-empty,
.members-empty {
  margin: 0;
  color: var(--text-soft);
}

.member-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.member-card:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.member-card:hover .member-host {
  text-decoration: underline;
}

.avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--swatch);
  color: var(--swatch-ink);
  font-weight: 600;
}

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

.member-name {
  font-weight: 600;
}

.member-host {
  color: var(--link);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.member-meta {
  color: var(--text-soft);
  font-size: 0.875rem;
}

/* Call to action ---------------------------------------------------------- */

.cta {
  --focus: var(--c-marigold);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  margin-block-end: 24px;
  padding: 32px;
  border-radius: 24px;
  background: var(--inverse-bg);
  color: var(--inverse-text);
}

.cta-copy {
  display: flex;
  flex: 1 1 360px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.cta-copy p {
  margin: 0;
}

.cta-preview {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cta-preview-label {
  margin: 0;
  font-size: 0.875rem;
}

.widget-preview {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--c-sand);
  font-weight: 600;
}

.widget-preview a {
  color: var(--c-ink);
}

/* Prose pages (join, random) ---------------------------------------------- */

.prose {
  max-width: 760px;
  padding-block: 32px 48px;
}

.prose h2 {
  margin: 40px 0 12px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.2;
}

.prose h3 {
  margin: 24px 0 8px;
  font-size: 1.125rem;
}

.prose .lede {
  margin-top: 16px;
}

.prose li {
  margin-block: 6px;
}

pre.code {
  overflow-x: auto;
  padding: 16px;
  border-radius: 12px;
  background: var(--code-bg);
}

.widget-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget-form .button--small {
  align-self: flex-start;
}

.copy-status {
  min-height: 1.6em;
  margin: 0;
  color: var(--text-soft);
}

.status-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-block: 64px;
  text-align: center;
}

/* 404: night theme with the wireframe ring --------------------------------- */

.page--night {
  --bg: #0b0b0c;
  --surface: #151517;
  --text: #f5f5f5;
  --text-soft: #a3a3a3;
  --border: #262629;
  --border-strong: #3a3a3a;
  --link: #e5e5e5;
  --link-hover: #ffffff;
  --focus: var(--c-marigold);
}

.wireframe {
  width: 100%;
  max-width: 520px;
  height: auto;
}

.wireframe-lines {
  fill: none;
  stroke: #e5e5e5;
  stroke-width: 1.2;
}

.wireframe-dashed {
  stroke-dasharray: 3 6;
  opacity: 0.6;
}
