/* Awet N'Hafash - "Monument" design language.
   Black and white. Apple-grade restraint. Real photography of the
   struggle up front; the Wreath of Eritrea lives only in the
   background, implanted behind everything, never in front. */

:root {
  --black: #0a0a0a;
  --coal: #111214;
  --card: #141518;
  --card-2: #1a1c20;
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.08);
  --white: #f7f7f5;
  --gray-1: #d7d7d4;
  --gray-2: #a9a9a6;
  --gray-3: #6f6f6c;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--white);
  background: var(--black);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The wreath, implanted in the background. Fixed, grayscale, barely
   there. Geometry untouched, never a foreground element. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/images/wreath-emblem.png") center 18% / min(130vmin, 900px) no-repeat;
  filter: grayscale(1) brightness(1.7);
  opacity: 0.055;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 50% -8%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(700px 700px at 50% 115%, rgba(255, 255, 255, 0.035), transparent 60%);
}

header.site, nav.tabs, main, footer.site { position: relative; z-index: 1; }

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  background: rgba(10, 10, 10, 0.66);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px 22px 16px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.brand h1 {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--white);
}

.brand .sub {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-2);
  font-weight: 600;
}

/* thin Eritrean tricolor keyline under the header */
.flag-ribbon {
  height: 3px;
  background: linear-gradient(90deg, #c8102e 0 33.3%, #0a7a3f 33.3% 66.6%, #0b6fa8 66.6% 100%);
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

/* ---------- Nav ---------- */

nav.tabs {
  position: sticky;
  top: 0;
  z-index: 49;
  background: rgba(10, 10, 10, 0.66);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 18px;
  scrollbar-width: none;
}
nav.tabs::-webkit-scrollbar { display: none; }

nav.tabs a {
  flex: 0 0 auto;
  color: var(--gray-2);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  position: relative;
}
nav.tabs a:hover { color: var(--white); }
nav.tabs a.active {
  color: var(--black);
  background: var(--white);
  border-color: var(--white);
}

.badge {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  margin-left: 6px;
  padding: 0 5px;
  vertical-align: 1px;
}
nav.tabs a.active .badge { background: var(--black); color: var(--white); }

/* ---------- Layout ---------- */

main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 26px 22px 90px;
}

main.wide { max-width: 1280px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: min(78vh, 620px);
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}

.hero img.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(0.9);
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.25) 0%, rgba(5, 5, 5, 0.05) 35%, rgba(5, 5, 5, 0.88) 100%),
    linear-gradient(100deg, rgba(5, 5, 5, 0.55) 0%, transparent 55%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(26px, 5vw, 56px);
  max-width: 720px;
}

.hero-kicker {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gray-1);
}

.hero h2 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 7.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 16px;
  color: #fff;
  text-wrap: balance;
}

.hero .lede {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--gray-1);
  max-width: 34em;
  margin: 0 0 26px;
}

.hero-credit {
  position: absolute;
  right: 16px;
  bottom: 12px;
  z-index: 2;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Photo bands ---------- */

.photo-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0 0 26px;
}
@media (max-width: 640px) { .photo-band { grid-template-columns: 1fr; } }

.photo-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--coal);
  min-height: 240px;
  box-shadow: var(--shadow);
  margin: 0;
}
.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 240px;
  max-height: 380px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.7s;
}
.photo-frame:hover img { transform: scale(1.035); filter: grayscale(1) contrast(1.1); }
.photo-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 18px 14px;
  font-size: 0.78rem;
  color: var(--gray-1);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  letter-spacing: 0.02em;
}

/* slim banner used on inner pages */
.page-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  height: clamp(180px, 30vw, 300px);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.page-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(0.82);
}
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.15), rgba(5,5,5,0.78));
}
.page-banner .banner-copy {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 26px;
}
.page-banner h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 6px;
  font-weight: 800;
}
.page-banner p { margin: 0; color: var(--gray-1); font-size: 0.95rem; max-width: 40em; }
.page-banner .banner-credit {
  position: absolute;
  z-index: 2;
  right: 14px;
  top: 10px;
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}

/* ---------- Cards & type ---------- */

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px);
  margin-bottom: 20px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
}

.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  letter-spacing: -0.025em;
  font-weight: 750;
  margin: 0 0 12px;
  color: var(--white);
}
h3 {
  font-family: var(--display);
  font-size: 1.12rem;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--white);
}
p { margin: 0 0 14px; color: var(--gray-1); }
p:last-child { margin-bottom: 0; }
strong { color: var(--white); }
a { color: var(--white); text-underline-offset: 3px; }
ul { color: var(--gray-1); padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }

.meta { color: var(--gray-3); font-size: 0.86rem; }

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

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
  color: var(--black);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 255, 255, 0.14); }
.btn:active { transform: translateY(0); }

.btn-ghost, .btn-ghost-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover, .btn-ghost-light:hover {
  border-color: var(--white);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.06);
}

/* legacy color variants, remapped to monochrome */
.btn-red, .btn-blue, .btn-gold { background: var(--white); color: var(--black); }

.btn-block { width: 100%; }

/* Install-app card: icon, copy, and QR code side by side. */
.install-grid {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 20px;
  align-items: center;
}
.install-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.install-copy p { margin: 0 0 12px; }
.install-qr { margin: 0; text-align: center; }
.install-qr img {
  width: 132px;
  height: 132px;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  display: block;
}
.install-qr figcaption {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--gray-2);
}
@media (max-width: 640px) {
  .install-grid { grid-template-columns: 72px 1fr; }
  .install-icon { width: 72px; height: 72px; border-radius: 17px; }
  .install-qr { grid-column: 1 / -1; justify-self: center; }
}

/* Install guide page. */
.install-hero { display: flex; gap: 20px; align-items: center; }
.install-hero .install-icon { width: 88px; height: 88px; flex: none; }
.install-hero h2 { margin: 0 0 8px; }
.install-hero p { margin: 0 0 12px; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.guide-steps li { display: grid; grid-template-columns: 168px 1fr; gap: 18px; align-items: center; }
.guide-fig { margin: 0; }
.guide-fig svg { width: 100%; height: auto; display: block; }
.guide-text { font-size: 1.02rem; }
.pulse-ring { animation: ring-pulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (max-width: 560px) {
  .guide-steps li { grid-template-columns: 128px 1fr; gap: 12px; }
  .install-hero { flex-direction: column; align-items: flex-start; }
}
button.btn { font-family: var(--sans); }

/* ---------- Pills ---------- */

.pill {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--gray-1);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  vertical-align: 1px;
}
.pill-security, .pill-ok, .pill-confirmed, .pill-assigned {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}
.pill-low { border-color: var(--white); color: var(--white); background: transparent; }
.pill-prospect { border-style: dashed; }

/* ---------- Key/value ---------- */

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
  margin: 14px 0;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}
.kv dt {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-3);
}
.kv dd { margin: 0; color: var(--white); font-weight: 600; }

/* ---------- Announcements ---------- */

.announce {
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.announce h4 { margin: 0 0 4px; font-size: 1.02rem; letter-spacing: -0.01em; color: var(--white); }
.announce .when { font-size: 0.76rem; color: var(--gray-3); margin-bottom: 8px; letter-spacing: 0.04em; }
.announce p { margin: 0; }
.announce.unread { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.06); }

/* ---------- Forms ---------- */

.field {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-2);
  margin: 20px 0 8px;
}

input[type="text"], input[type="tel"], input[type="email"],
input[type="password"], input[type="date"], input[type="time"],
select, textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--white);
  background: #0e0f11;
  border: 1px solid #2c2e33;
  border-radius: 12px;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}
input::placeholder, textarea::placeholder { color: var(--gray-3); }

.checks { display: grid; gap: 10px; margin: 4px 0 6px; }
.checks label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--gray-1);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.checks label:hover { border-color: rgba(255, 255, 255, 0.3); }
.checks label:has(input:checked) {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.checks input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #fff;
  margin: 0;
  flex: 0 0 auto;
}

/* ---------- Notices ---------- */

.notice {
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gray-1);
  margin: 14px 0;
  font-size: 0.93rem;
}
.notice strong { color: var(--white); }
.notice-err { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.09); color: var(--white); }
.notice-info { border-style: dashed; }
.notice-gold { border-color: var(--white); background: var(--white); color: var(--black); }
.notice-gold strong { color: var(--black); }

/* ---------- Shift cards & coverage ---------- */

.shift-card {
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.shift-card.soon { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.06); }
.shift-card strong { font-size: 1.02rem; letter-spacing: -0.01em; }
.shift-card .meta { margin-top: 6px; }

.coverage-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 12px;
  overflow: hidden;
}
.coverage-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--white);
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.coverage-bar.low span { background: repeating-linear-gradient(45deg, #fff, #fff 6px, #555 6px, #555 12px); }

/* ---------- Tables (admin) ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 14px 0;
}
th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-3);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--gray-1);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

/* ---------- Admin ---------- */

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 650;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gray-2);
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tabs button:hover { color: var(--white); border-color: rgba(255,255,255,0.4); }
.admin-tabs button.active { background: var(--white); border-color: var(--white); color: var(--black); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.mini {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 16px 18px;
}
.mini .num {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
}
.mini .lbl { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-3); font-weight: 700; }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions .btn, .row-actions button {
  padding: 8px 14px;
  font-size: 0.8rem;
}

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--line-soft);
  padding: 30px 22px 46px;
  text-align: center;
  color: var(--gray-3);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
footer.site .photo-credit {
  display: block;
  margin-top: 10px;
  font-size: 0.7rem;
  color: #4c4c4a;
  letter-spacing: 0.06em;
}

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Entrance ---------- */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
main > *:first-child { animation: riseIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  main { padding: 18px 14px 70px; }
  .brand { padding: 16px 16px 12px; }
  .btn { width: 100%; }
  .btn-row .btn { flex: 1 1 100%; }
  .row-actions .btn, .row-actions button { width: auto; flex: 0 0 auto; }
  table { font-size: 0.82rem; }
  th, td { padding: 8px; }
}
