/* IHSB Duty Roster — brand tokens + motion */

:root {
  --forest: #1b5e3b;
  --forest-deep: #0f3d28;
  --flame: #c43b2a;
  --flame-bright: #e85d2c;
  --paper: #f3efe6;
  --paper-deep: #e8e1d4;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --hero: #0a0a0a;
  --line: rgba(27, 94, 59, 0.18);
  --shadow: 0 18px 50px rgba(15, 61, 40, 0.12);
  --radius: 1rem;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Figtree", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(232, 93, 44, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 0%, rgba(27, 94, 59, 0.1), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  min-height: 100vh;
}

.font-display {
  font-family: var(--font-display);
}

.hero {
  position: relative;
  z-index: 20;
  background:
    radial-gradient(circle at 70% 20%, rgba(196, 59, 42, 0.22), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(27, 94, 59, 0.28), transparent 45%),
    linear-gradient(160deg, #050505 0%, #121212 55%, #0f3d28 100%);
  color: #f7f4ee;
  /* visible so the search suggest list can extend past the hero */
  overflow: visible;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 72px;
  background: linear-gradient(to top, var(--paper), transparent);
  pointer-events: none;
  z-index: 0;
}

.logo-mark {
  width: min(168px, 42vw);
  height: auto;
  flex-shrink: 0;
  border-radius: 50%;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.5));
  animation: logoIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-copy {
  animation: fadeUp 0.7s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.search-panel {
  animation: fadeUp 0.7s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-wrap {
  position: relative;
  z-index: 40;
}

main {
  position: relative;
  z-index: 1;
}

.search-input {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 1rem 1.25rem 1rem 3.25rem;
  font-size: 1.05rem;
  font-family: var(--font-ui);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--flame-bright);
  box-shadow: 0 0 0 4px rgba(232, 93, 44, 0.2), var(--shadow);
}

.suggest-list {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  max-height: 16rem;
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.suggest-item:hover,
.suggest-item[aria-selected="true"] {
  background: rgba(27, 94, 59, 0.08);
}

.suggest-item .hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.section-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.duty-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: 0 8px 24px rgba(15, 61, 40, 0.06);
  animation: cardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.duty-card.is-today {
  border-color: rgba(232, 93, 44, 0.45);
  box-shadow: 0 0 0 3px rgba(232, 93, 44, 0.12), 0 8px 24px rgba(15, 61, 40, 0.06);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(27, 94, 59, 0.1);
  color: var(--forest-deep);
}

.slot-pill.accent {
  background: rgba(196, 59, 42, 0.12);
  color: var(--flame);
}

.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.day-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.day-tab[aria-selected="true"] {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}

.grid-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 61, 40, 0.06);
}

.roster-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.roster-table th,
.roster-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0.65rem 0.55rem;
  text-align: center;
  vertical-align: middle;
}

.roster-table th:last-child,
.roster-table td:last-child {
  border-right: 0;
}

.roster-table thead th {
  background: var(--forest);
  color: #fff;
  font-weight: 700;
  position: sticky;
  top: 0;
}

.roster-table tbody th {
  text-align: left;
  background: rgba(27, 94, 59, 0.06);
  font-weight: 700;
  white-space: nowrap;
  padding-left: 0.85rem;
}

.roster-table .empty-cell {
  color: #b0aea6;
  background: #faf8f3;
}

.name-btn {
  border: 0;
  background: transparent;
  color: var(--forest-deep);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(27, 94, 59, 0.35);
  text-underline-offset: 2px;
}

.name-btn:hover {
  color: var(--flame);
  text-decoration-color: rgba(196, 59, 42, 0.5);
}

.legend-chip {
  display: inline-block;
  margin: 0.2rem 0.35rem 0.2rem 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(27, 94, 59, 0.08);
  color: var(--forest-deep);
  font-size: 0.82rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .hero-inner {
    text-align: center;
  }

  .logo-mark {
    margin-inline: auto;
  }
}
