@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }

/* Honor the native hidden attribute across the project. */
[hidden] {
  display: none !important;
}

/* Body and global layout: makes footer stick to bottom */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  background: var(--surface-canvas);
  background-attachment: fixed;
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
header, main, footer { margin: 0; padding: 0; }

/* Disabled form controls must look intentionally unavailable across the project. */
:is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):disabled {
  background: linear-gradient(180deg, var(--disabled-bg), #e7edf9);
  border-color: var(--disabled-border);
  color: var(--disabled-text);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

:is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):disabled::placeholder {
  color: var(--disabled-text);
}

:is(input[type="checkbox"], input[type="radio"]):disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.2);
}

/* Main content area grows to push footer down */
main.page { flex: 1; min-width: 0; padding: var(--space-md) var(--space-xl) 2.5rem; }

/* Top navigation bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--space-lg);
  padding: 0.875rem var(--space-xl);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 0.0625rem solid var(--border);
  /* The blur is decorative enhancement only; opacity keeps the bar readable. */
  -webkit-backdrop-filter: blur(0.5rem);
  backdrop-filter: blur(0.5rem);
  box-shadow: var(--shadow-soft);
}
.brand { font-weight: 800; letter-spacing: 0.0125rem; }

/* Footer pinned at bottom */
.footer {
  height: 3.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--green);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.0125rem;
}
.footer-icon { font-size: 1.125rem; }

@media (max-width: 56.25rem) {
  .topbar { grid-template-columns:1fr; grid-template-rows:auto auto auto; }
}
