/* ==========================================================================
   components.css: pieces reused across sections (header, buttons, tags, footer).
   ========================================================================== */

/* ---------- The always-visible menu ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50; /* above the pond (kit layers go up to 4) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
  padding: 8px clamp(12px, 3vw, 32px);
  background: linear-gradient(180deg, rgba(8, 24, 26, 0.82), rgba(8, 24, 26, 0.5));
  border-bottom: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.brand {
  display: none; /* shown from 480px up, where there's room */
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  line-height: 1;
  color: var(--pink);
}

@media (min-width: 480px) {
  .brand {
    display: block;
  }
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--cream);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  background: rgba(246, 179, 198, 0.14);
  color: var(--cream);
}

/* The section you're in: a border and a soft fill, not colour alone. */
.site-nav a[aria-current="true"] {
  border-color: var(--pink);
  background: rgba(246, 179, 198, 0.16);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ---------- The Calm button ---------- */

.calm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(203, 191, 230, 0.55);
  border-radius: 999px;
  background: rgba(203, 191, 230, 0.1);
  color: var(--lavender);
  font: 500 0.95rem/1 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.calm[hidden] {
  display: none;
}

.calm:hover {
  background: rgba(203, 191, 230, 0.22);
}

.calm__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

/* Pressed = the pond is calm (still). Filled, with a solid dot. */
.calm[aria-pressed="true"] {
  background: var(--lavender);
  color: var(--pond-deep);
}

.calm[aria-pressed="true"] .calm__dot {
  background: currentColor;
}

/* ---------- Buttons and tags ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(246, 179, 198, 0.2), rgba(14, 36, 38, 0.7) 75%);
  color: var(--cream);
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.button:hover {
  border-color: var(--pink);
  color: var(--cream);
}

.button svg {
  flex: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 5px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tag--sage {
  color: var(--sage);
}

.tag--lavender {
  color: var(--lavender);
}

.tag--pink {
  color: var(--pink);
}

.tag--teal {
  color: var(--cream);
  border-color: var(--teal-bright);
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px var(--gutter);
  background: var(--pond-darker);
  border-top: 1px solid var(--glass-border);
  color: var(--mist);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Touch-friendly pond captions ----------
   The kit's koi captions are about 36px tall. Make them comfortable to tap.
   (Our own rule, in our own file; the kit's CSS is untouched.) */
.koi-pond__link {
  min-height: 44px;
  padding-inline: 18px;
  font-size: 15px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .button,
  .calm,
  .site-nav a {
    transition: none;
  }
}
