/* ============================================================
   base.css — design tokens (light theme), reset, typography,
   glass utility, animations and the unified button system.
   Dark-theme overrides live in themes.css.
   ============================================================ */

:root {
  /* Surfaces & text */
  --bg: #f3f1ea;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --text: #16201c;
  --text-soft: #46544c;
  --border: #e3ddd0;

  /* Accent */
  --accent: #0f766e;
  --accent-dark: #0b524c;
  --accent-soft: #d7efe9;
  --accent-2: #14b8a6;
  --danger: #b3261e;
  --amber: #b9770e;

  /* Gradients */
  --grad: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  --grad-soft: linear-gradient(135deg, #0f766e 0%, #2a9d8f 60%, #6b4fa0 130%);

  /* Glass — kept subtle so text never blurs against page content.
     Content surfaces use solid --surface; only the thin header and
     overlay menus use a light translucent glass. */
  --glass-bg: rgba(255, 255, 255, 0.86);
  --glass-card: var(--surface);
  --glass-border: rgba(255, 255, 255, 0.55);

  /* Effects */
  --shadow: 0 10px 30px rgba(22, 32, 28, 0.08);
  --shadow-lg: 0 18px 50px rgba(22, 32, 28, 0.16);
  --radius: 16px;

  --fd: "Fraunces", Georgia, serif;
  --fb: "Manrope", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fb);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(
      900px 500px at 85% -8%,
      rgba(20, 184, 166, 0.18) 0%,
      transparent 55%
    ),
    radial-gradient(
      700px 500px at -5% 8%,
      rgba(107, 79, 160, 0.1) 0%,
      transparent 50%
    ),
    var(--bg);
  background-attachment: fixed;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}
main.container {
  flex: 1;
  padding: 28px 22px 60px;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.muted {
  color: var(--text-soft);
}

/* Glassmorphism utility */
.glass {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}
@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===================== BUTTON SYSTEM =====================
   Every button shares the SAME box model. A transparent 1.5px
   border is always present, so outline (ghost) and solid
   buttons are pixel-identical in size. Variants only change
   colour/fill — never dimensions. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--grad);
  color: #fff;
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.26);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.32);
  filter: brightness(1.04);
}
.btn:active {
  transform: translateY(0);
}
.btn i {
  font-size: 0.9em;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.86rem;
}
.btn-lg {
  padding: 15px 30px;
  font-size: 1.05rem;
}
.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.btn-ghost:hover {
  background: var(--accent-soft);
  filter: none;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.btn-danger {
  background: linear-gradient(135deg, #b3261e, #d4453c);
  box-shadow: 0 6px 16px rgba(179, 38, 30, 0.26);
}
.btn-danger:hover {
  box-shadow: 0 10px 24px rgba(179, 38, 30, 0.32);
}

/* Round icon button (theme toggle, etc.) — same height as .btn-sm */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-soft);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 0.95rem;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.15s;
}
.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.link-btn:hover {
  text-decoration: underline;
}
.link-danger {
  color: var(--danger);
}
.inline-form {
  display: inline;
}
.head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chev {
  font-size: 0.7em;
  transition: transform 0.2s;
}
