/* FONTS: heavy modern for titles, Inter for body, handwritten only for notes */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Archivo+Black&family=Permanent+Marker&display=swap");

:root {
  --ink: #111111;
  --border-strong: #000000;

  /* shared textures – paths are relative to /assets/ */
  --bg-texture: url("whiteboard.jpg");

  /* quadrant colours for notes */
  --q-do: #c7f9cc;
  --q-schedule: #bde0fe;
  --q-delegate: #ffeaa7;
  --q-delete: #ffb3c1;

  --accent-soft: #4b5563;
  --accent-primary-soft: #f97316;

  --radius-card: 10px;
  --radius-pill: 999px;
}

/* RESET */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  background:
    var(--bg-texture) center / cover fixed;
}

/* ACCESSIBILITY HELPERS */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* LINKS */

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* LAYOUT */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: flex-start;
  position: relative;
  flex: 1 0 auto; /* main content stretches between nav and footer */
}

/* HEADER / NAV */

nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 20px;
  border-bottom: 2px solid var(--border-strong);
  background:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.72)),
    var(--bg-texture) repeat;
  background-size: 1200px;
  color: #f9fafb;
}

.site-nav-left,
.site-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav.site-nav a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 0;
}

nav.site-nav a:hover {
  text-decoration: none;
  border-bottom: 1px solid #f9fafb;
}

.site-brand {
  font-family: "Archivo Black", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* FOOTER – compact */

.site-footer {
  border-top: 2px solid var(--border-strong);
  margin-top: 24px;
  padding: 10px 16px 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.78rem;
  background:
    linear-gradient(rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.82)),
    var(--bg-texture) repeat;
  background-size: 1200px;
  color: #e5e7eb;
  flex-shrink: 0; /* keep footer pinned to bottom on short pages */
}

.site-footer-left {
  max-width: 55%;
}

.site-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.site-footer a {
  color: #f9fafb;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.footer-note {
  font-size: 0.7rem;
  opacity: 0.9;
}

/* CARDS / WHITEBOARD FRAMING */

.sidebar-card {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: var(--radius-card);
  border: 2px solid var(--border-strong);
  padding: 14px 14px 16px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.22);
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    var(--bg-texture) repeat;
  background-size: 1200px;
}

.board-wrapper {
  position: relative;
  align-self: flex-start;
  border-radius: 12px;
  border: 2px solid var(--border-strong);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    var(--bg-texture) repeat;
  background-size: 1200px;
}

.board-inner-shell {
  padding: 10px 16px 12px;
}

/* TEXT UTILS */

.page-title {
  font-family: "Archivo Black", system-ui, sans-serif;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

.page-subtitle {
  font-size: 0.82rem;
  margin: 0 0 4px;
  color: var(--accent-soft);
}

.text-muted {
  color: var(--accent-soft);
}

/* BUTTONS / INPUTS */

.btn {
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  padding: 3px 9px;
  font-size: 0.8rem;
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.1;
}

.btn:hover {
  background: #f3f4f6;
}

.btn-primary {
  background: var(--accent-primary-soft);
}

.btn-primary:hover {
  background: #fb923c;
}

.btn-pill-small {
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  font-size: 0.75rem;
  background: #ffffff;
}

/* icon-only circular buttons (used for revisit / remove) */
.icon-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.icon-btn-remove {
  border-color: #b91c1c;
  color: #b91c1c;
}

.input-text {
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  padding: 5px 8px;
  font-family: inherit;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.96);
}

/* NOTES (sticky) */

.note {
  position: absolute;
  min-width: 120px;
  max-width: 230px;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #000000;
  box-shadow:
    0 10px 12px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  font-family: "Permanent Marker", system-ui, sans-serif;
  font-size: 0.9rem;
  user-select: none;
  cursor: grab;
  transform-origin: center top;
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.6),
    transparent 30%
  );
  pointer-events: auto;
  transition: box-shadow 0.08s ease-out, transform 0.08s ease-out;
}

.note-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note.dragging {
  cursor: grabbing;
  box-shadow:
    0 16px 20px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.note:hover:not(.dragging) {
  transform: translateY(-1px) scale(1.01) rotate(var(--note-rot, 0deg));
  box-shadow:
    0 12px 16px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

/* QUADRANT COLOUR HELPERS (for placed notes) */

.note-q1 {
  background-color: var(--q-do);
}

.note-q2 {
  background-color: var(--q-schedule);
}

.note-q3 {
  background-color: var(--q-delegate);
}

.note-q4 {
  background-color: var(--q-delete);
}

/* QUADRANT BOARD / 2x2 */

.quadrant-board {
  position: relative;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  padding: 18px 16px 40px;
  height: clamp(360px, 55vh, 520px); /* responsive height across screens */
  overflow: hidden;

  /* make the whiteboard really visible */
  background:
    var(--bg-texture) repeat,
    #ffffff;
  background-size: 1200px;
}

.quadrant-grid {
  position: relative;
  width: 100%;
  height: 100%;
}

.quadrant-lines::before,
.quadrant-lines::after {
  content: "";
  position: absolute;
  background: rgba(0, 0, 0, 0.3);
}

.quadrant-lines::before {
  width: 1px;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-0.5px);
}

.quadrant-lines::after {
  height: 1px;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-0.5px);
}

.axis-label-x {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-family: "Permanent Marker", system-ui, sans-serif;
}

.axis-label-x span {
  margin: 0 60px;
}

.axis-label-y {
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  font-size: 0.8rem;
  font-family: "Permanent Marker", system-ui, sans-serif;
}

.quadrant-headings {
  position: absolute;
  inset: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  font-family: "Permanent Marker", system-ui, sans-serif;
  font-size: 1rem;
  pointer-events: none;
}

.quadrant-headings > div {
  padding: 4px 6px;
}

.board-inner {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* SIMPLE COLLAPSIBLE BODY (for pages that choose to use it) */

[data-collapsible-body] {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

[data-collapsible-body].open {
  max-height: 260px;
}

/* RESPONSIVE */

@media (max-width: 800px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
  }

  nav.site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-left {
    max-width: none;
  }

  .site-footer-right {
    align-items: flex-start;
  }
}
