/* 4REAL — shared site styles.
   Linked BEFORE each page's inline <style>, so page-specific rules still win.
   See DESIGN.md for the system this implements.
   Not used by reminder/ (standalone PWA with its own palette). */

:root {
  color-scheme: light dark;

  --bg: #fafaf7;
  --ink: #0a0a0a;
  --ink-soft: #595959;
  --ink-faint: #9a9a96;
  --rule: rgba(10, 10, 10, 0.08);
  --rule-strong: rgba(10, 10, 10, 0.15);

  --surface: #ffffff;                             /* cards, media frames */
  --shadow-card: 0 8px 24px rgba(10, 10, 10, 0.04);
  --shadow-media: 0 12px 32px rgba(10, 10, 10, 0.06);
}

/* NIGHT MODE — follows the device setting; no toggle.
   A warm dark that mirrors the warm off-white, not a literal inversion:
   pure black with pure white text is harsh and reads as cheap. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0d;
    --ink: #f4f4ef;
    --ink-soft: #a3a39d;
    --ink-faint: #6f6f6a;
    --rule: rgba(244, 244, 239, 0.10);
    --rule-strong: rgba(244, 244, 239, 0.22);

    --surface: #171714;
    /* dark shadows are invisible on a dark ground — lean on border brightness */
    --shadow-card: none;
    --shadow-media: none;
  }

  /* the mark is solid black on transparent, so this gives a clean white */
  .nav-home img { filter: invert(1); }
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* NAV */
nav {
  padding: 1.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-home {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}

.nav-home img {
  width: 36px;
  height: 36px;
  display: block;
}

.nav-home:hover { opacity: 0.6; }

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: opacity 0.2s;
}

.menu-toggle:hover { opacity: 0.6; }

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--rule);
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

@media (max-width: 600px) {
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* MENU OVERLAY */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 100;
}

.menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.menu-close {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  padding: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.menu-list {
  list-style: none;
  text-align: center;
}

.menu-list li { margin: 1rem 0; }

.menu-list a {
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: opacity 0.2s;
}

.menu-list a:hover { opacity: 0.5; }

/* LINK ARROW — the 45° mark, drawn rather than typed.
   The ↗ character (U+2197) has an emoji presentation variant, so iOS and
   Android rendered it from the emoji font: coloured, heavy, out of place on a
   monochrome site. A masked SVG is identical on every platform, scales with
   font-size, and takes currentColor — so it follows night mode for free.
   Sized once here, in rem, so it is the same ~17px on every page and at every
   viewport — an icon, not a letter, so it should not scale with its heading. */
.arrow-ne {
  display: inline-block;
  font-size: 1.05rem;
  width: 1em;
  height: 1em;
  flex: none;
  background-color: currentColor;
  /* the shape lives in css/arrow-ne.svg — one source of truth, and the
     design guide can show the real file rather than a re-encoded copy.
     Used as a mask, so the stroke colour in that file is irrelevant. */
  -webkit-mask: url("/css/arrow-ne.svg") no-repeat center / contain;
  mask: url("/css/arrow-ne.svg") no-repeat center / contain;
  /* background-color, not color — the mask is painted with currentColor */
  transition: transform 0.25s, background-color 0.25s;
}

/* HORIZONTAL ARROWS — the "act" mark on a button, sliding in the direction of
   travel on hover. .arrow points forward, .arrow-back points back.

   Typed rather than drawn, unlike .arrow-ne above: U+2192 and U+2190 have no
   emoji presentation variant, so they render from Poppins on every platform.
   Only U+2194–U+2199 in this block do — which is why ↗ had to become an SVG.
   Never substitute ⬅ (U+2B05) or ➡ (U+27A1); those are emoji.

   Shared here rather than per page: teamup, talk and confirmed all use them,
   and they had drifted to 0.25s and 0.3s with confirmed carrying no rule at
   all, so its arrow sat still on hover. */
.arrow, .arrow-back {
  display: inline-block;
  transition: transform 0.3s;
}
a:hover .arrow, button:hover .arrow { transform: translateX(3px); }
a:hover .arrow-back, button:hover .arrow-back { transform: translateX(-3px); }

/* MOTION */
.fade-up {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; opacity: 1; transform: none; }
}
