/* Look and feel refinement.
   Signature: two strands, turquoise (what people offer) and copper (what they need), woven together.
   It appears in three places only: the mark beside the name, the header stripe, and under page titles.
   Everything else stays quiet so that one idea carries the identity. */

:root {
  --surface: #f4f9f9;
  --line: #d8e6e8;
  --line-strong: #b9cfd2;
  --radius-panel: 14px;
  --radius-card: 12px;
  --radius-field: 10px;
  --strand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 144 16'%3E%3Cpath d='M1 8 C19 1 37 1 55 8 S91 15 109 8 S127 1 143 8' fill='none' stroke='%2320c4bc' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M1 8 C19 15 37 15 55 8 S91 1 109 8 S127 15 143 8' fill='none' stroke='%23a3521b' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  --rings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18'%3E%3Ccircle cx='10' cy='9' r='6.6' fill='none' stroke='%230a8582' stroke-width='2.4'/%3E%3Ccircle cx='20' cy='9' r='6.6' fill='none' stroke='%23a3521b' stroke-width='2.4'/%3E%3C/svg%3E");
}

::selection { background: #c9eeeb; color: var(--ink); }
body { font-size: 1.0625rem; line-height: 1.6; text-rendering: optimizeLegibility; }

/* Header: sticky, light, with the woven stripe on top */
.site-head {
  position: sticky; top: 0; z-index: 40;
  max-width: none; padding: 0.85rem max(1.25rem, calc((100vw - 62rem) / 2 + 1.25rem));
  background: rgba(255, 255, 255, 0.94);
  border-top: 0; border-bottom: 1px solid var(--line);
  box-shadow: inset 0 3px 0 0 transparent;
}
.site-head::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 45%, #cf7d45 70%, var(--need) 100%);
}
@supports (backdrop-filter: blur(8px)) {
  .site-head { background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(1.4) blur(10px); }
}
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; letter-spacing: 0.05em; }
.wordmark::before { content: ''; flex: none; width: 1.9rem; height: 1.15rem; background: var(--rings) no-repeat center / contain; }
#nav { font-weight: 500; }
#nav .badge { margin-left: 0.35rem; }
#nav a[aria-current="page"] { color: var(--accent); text-decoration: none; box-shadow: inset 0 -3px 0 var(--accent-bright); }
.site-search input { border-color: transparent; background: var(--surface); }
@media (min-width: 60rem) {
  .site-head { flex-wrap: nowrap; }
  #nav { margin-left: auto; }
  .site-search { width: auto; flex: 0 1 15rem; }
}
.site-search input:focus { background: #fff; border-color: var(--accent); }

/* Keep jump links from hiding under the sticky header */
@media (min-width: 44.01rem) { html { scroll-padding-top: 5.5rem; } }

/* Type scale: a modest ratio, Orbitron only for the name and page titles */
h1 { letter-spacing: 0; font-size: clamp(2rem, 5.6vw, 3.1rem); line-height: 1.1; }
h2 { font-size: 1.45rem; letter-spacing: -0.01em; line-height: 1.25; }
h3 { font-size: 1.12rem; line-height: 1.3; }
.lede { font-size: 1.18rem; line-height: 1.55; color: #2b4651; max-width: 36em; }
main p { max-width: 72ch; }
.site-foot p { max-width: none; }

/* Page titles get the woven strand underneath */
.hero { padding: 2.25rem 0 0.5rem; }
.hero .lede:last-child { margin-bottom: 0.5rem; }
.hero > h1::after, .event-hero > h1::after, main > h1:first-child::after {
  content: ''; display: block; width: 9rem; height: 16px; margin-top: 0.9rem;
  background: var(--strand) no-repeat left center / contain;
}
.event-hero .event-title::after { width: 12rem; height: 20px; }

/* Eyebrow text: sentence case, not shouted */
.kicker { text-transform: none; letter-spacing: 0.01em; font-size: 0.98rem; font-weight: 700; color: var(--accent); }

/* Buttons: confident, with a small press response */
.btn, button.btn { font-weight: 700; letter-spacing: 0.01em; box-shadow: 0 1px 0 rgba(16, 42, 51, 0.08); transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.08s; }
.btn:active { transform: translateY(1px); }
.btn.ghost { border-color: var(--line-strong); box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }

/* Fields */
input, select, textarea { border-radius: var(--radius-field); border-color: var(--line-strong); padding: 0.7rem 0.85rem; }
label { font-weight: 600; font-size: 0.95rem; }
fieldset { border-radius: var(--radius-card); border-color: var(--line); }
legend { font-weight: 600; }

/* Panels and cards: one radius per level, borders over shadows */
.panel { border-radius: var(--radius-panel); background: var(--surface); border-color: var(--line); padding: 1.35rem 1.4rem; }
.job, .swipe-card, .map-side, .card-done { border-radius: var(--radius-card); }
.items > li { padding: 1.1rem 0; }
.items .meta { font-size: 0.92rem; }

/* Doors: calm cards, the title does the work */
.door-group { margin-top: 2.25rem; }
.door-group > h2 { text-transform: none; letter-spacing: 0; font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-bottom: 0.75rem; }
.doors { gap: 0.85rem; }
.doors a { border: 1px solid var(--line); border-left-width: 1px; border-radius: var(--radius-card); padding: 1.15rem 1.25rem 1.2rem; background: #fff; transition: border-color 0.15s, background 0.15s; }
.doors a:hover, .doors a:focus-visible { border-color: var(--accent); background: var(--surface); }
.doors h3, .doors h2 { color: var(--ink); font-size: 1.1rem; margin-bottom: 0.35rem; }
.doors a:hover h3, .doors a:focus-visible h3, .doors a:hover h2 { color: var(--accent); }
.doors p { font-size: 0.97rem; line-height: 1.5; }

/* Home base on My hub */
.waiting { background: #fdf6f1; border-color: #e9c9b2; }
.waiting-list a, .next-steps a { border-radius: var(--radius-field); }
.quick-actions a { border-color: var(--line-strong); }

/* Tags and chips: quieter */
.tag { font-weight: 600; }
.skill { border-color: var(--line-strong); }

/* Section dividers breathe more */
.tier { padding: 2.25rem 0; }
.section { margin-top: 2.75rem; }

/* Footer: the strand again, small, as a sign-off */
.site-foot { padding: 2.5rem 1rem 2.75rem; background: var(--surface); border-top: 1px solid var(--line); }
.site-foot::before { content: ''; display: block; width: 6rem; height: 12px; margin: 0 auto 1.25rem; background: var(--strand) no-repeat center / contain; }

/* Page changes: a short fade so people see the new page arrive */
@media (prefers-reduced-motion: no-preference) {
  main.page-in { animation: pagein 0.18s ease-out; }
  @keyframes pagein { from { opacity: 0.35; } to { opacity: 1; } }
}

/* Phones */
@media (max-width: 44rem) {
  /* On phones the header scrolls away, so content gets the screen */
  .site-head { position: relative; padding: 0.65rem 1rem 0.75rem; gap: 0.6rem; flex-wrap: wrap; }
  .wordmark { font-size: 0.78rem; letter-spacing: 0.03em; gap: 0.45rem; }
  .wordmark::before { width: 1.6rem; height: 1rem; }
  .menu-btn { padding: 0.35rem 0.9rem; font-size: 0.95rem; }
  .site-search input { padding: 0.5rem 0.9rem; }
  .door-group { margin-top: 1.5rem; }
  .hero { padding: 1.5rem 0 1.25rem; }
  .hero > h1::after, .event-hero > h1::after, main > h1:first-child::after { width: 7rem; height: 13px; margin-top: 0.7rem; }
  main { padding: 1rem 1rem 3rem; }
  .panel { padding: 1.1rem; }
}

@media print {
  .site-head { position: static; }
  .site-head::before, .site-foot::before { display: none; }
}

/* Sponsor wall: logos when we have them, a clean initials mark when we don't */
.sp-wall { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.sp-lg { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.sp-md { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.sp-sm { grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr)); gap: 0.6rem; }
.sp-tile > a, .sp-tile > div {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem;
  text-align: center; padding: 1rem 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card);
  color: var(--ink); text-decoration: none; transition: border-color 0.15s, background 0.15s;
}
.sp-tile > a:hover, .sp-tile > a:focus-visible { border-color: var(--accent); background: var(--surface); }
.sp-lg .sp-tile > a, .sp-lg .sp-tile > div { min-height: 9.5rem; }
.sp-md .sp-tile > a, .sp-md .sp-tile > div { min-height: 7.5rem; }
.sp-sm .sp-tile > a, .sp-sm .sp-tile > div { min-height: 6.25rem; padding: 0.8rem 0.6rem; }
.sp-tile img { max-width: 82%; object-fit: contain; }
.sp-lg .sp-tile img { max-height: 4.75rem; }
.sp-md .sp-tile img { max-height: 3.4rem; }
.sp-sm .sp-tile img { max-height: 2.6rem; }
.sp-mono { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-family: var(--display); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.04em; }
.sp-mono.b { border-color: var(--need); color: var(--need); }
.sp-lg .sp-mono { width: 3.75rem; height: 3.75rem; font-size: 1.15rem; }
.sp-sm .sp-mono { width: 2.4rem; height: 2.4rem; font-size: 0.78rem; }
.sp-name { font-weight: 700; line-height: 1.25; font-size: 0.98rem; }
.sp-lg .sp-name { font-size: 1.15rem; }
.sp-sm .sp-name { font-size: 0.88rem; }
.sp-blurb { color: var(--ink-dim); font-size: 0.82rem; line-height: 1.3; }
.sp-tile .sp-caption { font-size: 0.82rem; font-weight: 600; color: var(--ink-dim); }
.sp-lg .sp-tile .sp-caption { font-size: 0.92rem; }
@media (max-width: 34rem) {
  /* Main sponsors become full-width rows on phones, so none are left stranded */
  .sp-lg { grid-template-columns: 1fr; gap: 0.6rem; }
  .sp-lg .sp-tile > a, .sp-lg .sp-tile > div { min-height: 0; flex-direction: row; justify-content: flex-start; text-align: left; gap: 0.9rem; padding: 0.85rem 1rem; }
  .sp-lg .sp-mono { width: 3rem; height: 3rem; font-size: 0.95rem; flex: none; }
  .sp-lg .sp-tile img { max-height: 3rem; max-width: 60%; }
  .sp-md, .sp-sm { grid-template-columns: repeat(2, 1fr); }
}

/* Admin logo rows */
.logo-row { grid-template-columns: 6rem 1fr !important; align-items: center; gap: 1rem !important; }
.logo-thumb { width: 6rem; height: 4rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-field); background: #fff; font-size: 0.78rem; text-align: center; }
.logo-thumb img { max-width: 85%; max-height: 80%; object-fit: contain; }
.file-btn { cursor: pointer; position: relative; }
.file-btn:focus-within { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
