/* =====================================================
   HVALREKI forsíða v2: borðtennis
   ===================================================== */

:root {
  --bg:   #413C3F;
  --ink:  #F4F4F4;
  --dim:  rgba(244, 244, 244, 0.62);
  --font: 'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --pad:  clamp(16px, 2.4vw, 40px);
  --txt:  clamp(12px, 0.95vw, 15px);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
}

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

/* Leikvöllur */
.leikur {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  touch-action: none;
  cursor: none;
}

/* Skjálínur, eins og gamall skjár */
.skanlinur {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.10) 0, rgba(0,0,0,0.10) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.28) 100%);
  z-index: 2;
}

/* Fótur */
.fotur {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: var(--pad);
  z-index: 3;
  pointer-events: none;
  font-size: var(--txt);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.fotur button, .fotur a, .spjald { pointer-events: auto; }

.vinstri { flex: 1 1 0; position: relative; }
.haegri { flex: 1 1 0; display: flex; justify-content: flex-end; }

.logo, .hljod {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
}
.logo { width: 34px; height: 31px; transition: transform 0.2s ease; }
.logo:hover { transform: translateY(-2px); }
.logo svg { width: 100%; height: 100%; display: block; }

.hljod { width: 30px; height: 30px; color: var(--dim); transition: color 0.2s ease; }
.hljod:hover, .hljod[aria-pressed="true"] { color: var(--ink); }
.hljod svg { width: 100%; height: 100%; display: block; }
.hljod .bylgjur { display: none; }
.hljod[aria-pressed="true"] .bylgjur { display: inline; }
.hljod[aria-pressed="true"] .kross { display: none; }

/* Spjaldið sem poppar upp úr merkinu */
.spjald {
  position: absolute;
  left: 0;
  bottom: calc(100% + 18px);
  width: min(380px, calc(100vw - 2 * var(--pad)));
  padding: 22px 24px;
  background: var(--bg);
  border: 2px solid var(--ink);
  line-height: 1.5;
  font-size: calc(var(--txt) * 1.1);
  font-weight: 400;
  letter-spacing: 0.005em;
  transform-origin: bottom left;
  animation: popp 0.22s steps(4, end);
}
.spjald[hidden] { display: none; }
.spjald p { margin-bottom: 16px; }
.spjald .netfang { font-weight: 600; }

@keyframes popp {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.netfang {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.netfang:hover { opacity: 0.75; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

.visbending {
  flex: 0 1 auto;
  text-align: center;
  background: var(--bg);
  padding: 6px 12px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85em;
  align-self: center;
  animation: blikk 1.2s steps(2, jump-none) infinite;
  transition: opacity 0.4s ease;
}
.visbending.falin { opacity: 0; animation: none; }

@keyframes blikk { 50% { opacity: 0.25; } }

/* Farsími */
@media (max-width: 720px) {
  .visbending { font-size: 0.75em; letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  .visbending, .spjald { animation: none; }
}
