/* Haukebø Family Hub — hub-only styles.
   Colors, header, footer and tagline come from /brand.css (shared by every site). */

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

html, body { min-height: 100%; }
body {
  font-family: 'Jost', sans-serif;
  background: var(--bg-hub);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* Hide the page until the password is accepted (prevents a flash of content) */
html:not(.unlocked) .page { visibility: hidden; }

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── BACKGROUND ── */
.bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg::before, .bg::after {
  content: ''; position: absolute; width: 700px; height: 700px; border-radius: 50%;
  background: #0A3A38; opacity: 0.5; filter: blur(110px);
}
.bg::before { top: -260px; left: -260px; }
.bg::after  { bottom: -260px; right: -260px; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page > *:not(.bg) { position: relative; z-index: 1; }

/* ── ELEMENT COLOR FAMILIES (border, fill, text) ── */
.g-time  { --c: var(--tiffany);    --f: rgba(129, 212, 200, 0.16); --t: var(--tiffany); }
.g-chore { --c: var(--plum-light); --f: rgba(160, 102, 166, 0.22); --t: var(--plum-tint); }
.g-score { --c: var(--gold);       --f: rgba(201, 168, 76, 0.18);  --t: var(--gold-light); }
.g-conn  { --c: var(--blue);       --f: rgba(74, 143, 232, 0.18);  --t: var(--blue-tint); }
.g-hang  { --c: var(--crimson);    --f: rgba(191, 9, 47, 0.26);    --t: var(--crimson-tint); }

/* ── WORDMARK (password screen) ── */
.wordmark {
  font-weight: 200; letter-spacing: 0.3em; color: var(--white); white-space: nowrap;
}
.wordmark span { color: var(--tiffany); font-weight: 300; }
.kicker {
  font-size: 11px; font-weight: 300; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--white-mid);
}

/* ── TODAY (date shown on the hub) ── */
.day {
  font-size: clamp(24px, 3vw, 40px); font-weight: 200; letter-spacing: 0.16em;
  text-transform: lowercase; color: var(--white); line-height: 1.1;
}

/* ── FULL TABLE (laptop / iPad) ── */
.desk {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 28px 12px;
}
.pt {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  grid-template-rows: repeat(7, auto) 14px auto auto;
  gap: 3px;
  width: 100%; max-width: 1180px;
}
.cell {
  aspect-ratio: 1; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ghost {
  border: 1px solid rgba(129, 212, 200, 0.14);
  color: rgba(129, 212, 200, 0.32);
  font-size: clamp(9px, 0.95vw, 13px); font-weight: 300;
}
.ghost.marker { border-style: dashed; }
.lit {
  background: var(--f); border: 1px solid var(--c); color: var(--t);
  font-size: clamp(12px, 1.7vw, 22px); font-weight: 500;
  cursor: pointer; transition: transform 0.15s, filter 0.15s;
}
.lit:hover, .lit:focus-visible { transform: scale(1.14); z-index: 3; filter: brightness(1.25); outline: none; }
.lit .z {
  position: absolute; top: 2px; left: 4px;
  font-size: clamp(8px, 0.75vw, 11px); font-weight: 400; opacity: 0.75; line-height: 1;
}

/* key panel sits in the table's natural gap */
.key {
  grid-row: 1 / 4; grid-column: 3 / 13;
  display: flex; align-items: center; gap: clamp(14px, 2vw, 28px);
  padding: 0 clamp(8px, 1.2vw, 18px);
}
.key .kicker { margin-top: 10px; }
.key .hint { margin-top: 10px; font-size: 12px; font-weight: 300; color: var(--white-dim); letter-spacing: 0.06em; }

/* ── BIG ELEMENT TILE (key panel, phone cards, section pages) ── */
.big {
  background: var(--f); border: 1px solid var(--c); color: var(--t);
  border-radius: 8px; aspect-ratio: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 8px 10px; flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.big .z   { font-size: 12px; font-weight: 400; opacity: 0.8; }
.big .sym { font-weight: 500; line-height: 1; text-align: center; }
.big .lbl { text-align: center; line-height: 1.2; }
.big .nm  { display: block; font-size: 13px; font-weight: 400; }
.big .en  { display: block; font-size: 11px; font-weight: 300; opacity: 0.6; margin-top: 1px; }
.key .big { height: 100%; max-height: 150px; min-height: 96px; }
.key .big .sym { font-size: clamp(30px, 3.6vw, 52px); }

/* ── PHONE LAYOUT ── */
.mobile { display: none; padding: 26px 16px 8px; text-align: center; }
.mobile .day { font-size: 26px; }
.mobile .kicker { margin-top: 8px; }
.mini {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  grid-template-rows: repeat(7, auto) 5px auto auto;
  gap: 1px; margin: 22px auto 0; max-width: 420px;
}
.mini i { aspect-ratio: 1; border-radius: 1.5px; border: 0.5px solid rgba(129, 212, 200, 0.13); }
.mini i.on { background: var(--c); border-color: var(--c); }
.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin: 18px auto 0; max-width: 420px;
}
.cards .big .sym { font-size: 34px; }
.cards .big .nm  { font-size: 12px; white-space: nowrap; }
.cards .big:active { filter: brightness(1.3); }

@media (max-width: 760px) {
  .desk { display: none; }
  .mobile { display: block; }
}

/* ── LEGEND ── */
.legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px;
  padding: 18px 16px 18px;
  font-size: 11px; font-weight: 300; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--white-mid);
}
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }

/* ── SECTION PAGES ── */
.section {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 20px;
}
.section .big { width: 168px; }
.section .big .sym { font-size: 64px; }
.section h1 {
  margin-top: 26px; font-size: 30px; font-weight: 200; letter-spacing: 0.12em; text-transform: lowercase;
}
.section .soon {
  margin-top: 10px; font-size: 11px; font-weight: 300; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--white-dim);
}
.back {
  margin-top: 34px; font-size: 12px; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tiffany); padding: 10px 16px; border: 1px solid rgba(129, 212, 200, 0.25); border-radius: 8px;
  transition: background 0.15s;
}
.back:hover { background: rgba(129, 212, 200, 0.08); }

/* ── PASSWORD GATE ── */
#gate {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg-hub);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gate-card {
  width: 100%; max-width: 320px; text-align: center;
  background: rgba(248, 255, 254, 0.04);
  border: 1px solid rgba(10, 186, 181, 0.2); border-radius: 16px;
  padding: 40px 32px;
}
.gate-card .wordmark { font-size: 22px; display: block; }
.gate-card .kicker { margin: 6px 0 28px; }
.gate-input {
  width: 100%; padding: 11px 14px; font: inherit; font-size: 16px; letter-spacing: 0.1em; text-align: center;
  background: rgba(248, 255, 254, 0.06); color: var(--white);
  border: 1px solid rgba(10, 186, 181, 0.25); border-radius: 8px; outline: none; margin-bottom: 10px;
}
.gate-input:focus { border-color: var(--tiffany-deep); }
.gate-input::placeholder { color: var(--white-dim); }
.gate-btn {
  width: 100%; padding: 11px; font: inherit; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--tiffany-deep); color: var(--bg-hub); border: none; border-radius: 8px; cursor: pointer;
}
.gate-btn:hover { background: var(--tiffany); }
.gate-btn:disabled { opacity: 0.6; cursor: default; }
.gate-error { font-size: 12px; color: var(--crimson-tint); margin-top: 10px; min-height: 18px; }
