/*
 * Teli este egy etterem elott: meleg, sotet alap, csendes vonalak, halvany
 * szoveg. Az egyetlen fenyforras az a pont, ahol most tartunk; korulotte
 * vilagos, kifele sotetedik.
 */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-latin-wght-italic.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-latin-ext-wght-italic.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ej: #14100d;
  --ej-kozep: #201812;
  --szoveg: #dccab1;
  --halvany: #9a8771;
  --vonal: #7a6652;
  --gyertya: #f4c27c;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  color-scheme: dark;
}

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

html {
  background: var(--ej);
  overflow-x: clip;
  scrollbar-color: #4b3d30 var(--ej);
  -webkit-text-size-adjust: 100%;
}

/* Gepen az egesz gorgetes nelkul, a kepernyohoz igazitva. */
html.szeles,
html.szeles body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--szoveg);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  /* Az ej: kozepen egy arnyalattal vilagosabb, a szelek fele sotetebb. */
  background: radial-gradient(120% 80% at 50% 45%, var(--ej-kozep) 0%, var(--ej) 70%) fixed, var(--ej);
}

::selection {
  background: var(--gyertya);
  color: var(--ej);
}

:focus-visible {
  outline: 1.5px solid var(--gyertya);
  outline-offset: 4px;
  border-radius: 3px;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ej);
}

::-webkit-scrollbar-thumb {
  background: #3d3128;
  border: 3px solid var(--ej);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a4838;
}

button,
input {
  font: inherit;
  color: inherit;
}

/* --- a szinpad: egy rogzitett meretu vaszon, amit a JS a kepernyohoz meretez --- */

.keret {
  position: relative;
  width: 100%;
  overflow: hidden;
}

html.szeles .keret {
  height: 100%;
}

.szinpad {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  visibility: hidden;
}

.szinpad.kesz {
  visibility: visible;
}

/* Az SVG a pontok utan all a forrasban (a Tab elobb a pontokon megy vegig), de
   alattuk rajzolodik, es csak a szerkeszto mod talalat-vonalai kapnak kattintast. */
.elek {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.feny {
  position: absolute;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgb(255 196 122 / 0.23) 0%,
    rgb(255 178 102 / 0.1) 42%,
    rgb(255 160 84 / 0.03) 72%,
    rgb(255 160 84 / 0) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition:
    transform 1100ms cubic-bezier(0.45, 0, 0.2, 1),
    opacity 1400ms ease;
}

.feny.eg {
  opacity: 1;
}

html.keskeny .feny {
  width: 440px;
  height: 440px;
  margin: -220px 0 0 -220px;
}

.cim {
  position: absolute;
  top: 0;
  left: 0;
}

.cim h1 {
  margin: 0;
  font-size: 46px;
  font-style: italic;
  font-weight: 340;
  line-height: 1.1;
  color: #eadbc4;
  white-space: nowrap;
}

.cim p {
  margin: 10px 0 0;
  font-size: 18px;
  color: var(--halvany);
  white-space: nowrap;
}

html.szeles .cim {
  text-align: center;
}

html.keskeny .cim h1 {
  font-size: 34px;
}

html.keskeny .cim p {
  margin-top: 8px;
  font-size: 16px;
}

/* --- pontok --- */

.pontok {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pont {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  margin: 0;
  font-size: var(--betu, 20px);
  line-height: 1.3;
  text-align: center;
  color: var(--szoveg);
  transition:
    opacity 900ms ease,
    color 600ms ease;
}

.pont.bal {
  text-align: left;
}

.pont.ismeretlen {
  color: var(--halvany);
  letter-spacing: 0.06em;
}

.pont.itt {
  color: var(--gyertya);
  text-shadow: 0 0 22px rgb(244 194 124 / 0.35);
}

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

.itt-cimke {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  margin: 0;
  font-size: 18px;
  font-style: italic;
  line-height: 1;
  color: var(--gyertya);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition:
    transform 1100ms cubic-bezier(0.45, 0, 0.2, 1),
    opacity 700ms ease;
}

.itt-cimke.lathato {
  opacity: 0.9;
}

html.keskeny .itt-cimke {
  font-size: 15px;
}

/* Kotojeles szo ("Whale-ben") ne torjon el a kotojelnel. */
.egyben {
  white-space: nowrap;
}

/* --- elek --- */

.el {
  fill: none;
  stroke: var(--vonal);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    opacity 900ms ease,
    stroke 600ms ease;
}

.el.itt {
  stroke: var(--gyertya);
  stroke-width: 1.6;
}

.el .talalat {
  stroke: transparent;
  stroke-width: 26;
  pointer-events: none;
}

.farok {
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 0.1 7;
  transition: opacity 900ms ease;
}

/* --- szerkeszto mod --- */

html.szerk .pont {
  cursor: pointer;
}

html.szerk .el .talalat {
  pointer-events: stroke;
  cursor: pointer;
}

@media (hover: hover) {
  html.szerk .pont:hover {
    opacity: 1 !important;
    color: #f7e4c6;
    text-decoration: underline 1px var(--gyertya);
    text-underline-offset: 0.28em;
  }

  html.szerk .el:hover {
    opacity: 1 !important;
    stroke: #c9a272;
  }
}

/* A pontot lefedo gomb: atlatszo, a pont szovege latszik alatta. */
.pont-gomb {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  cursor: pointer;
}

html.szerk .pont:has(.pont-gomb:focus-visible) {
  opacity: 1 !important;
}

/* A fokuszalt el szaggatott es vilagos, igy nem tevesztheto ossze a mostani hellyel. */
html.szerk .el:has(.talalat:focus-visible) {
  opacity: 1 !important;
  stroke: #fff0d8;
}

html.szerk .el:has(.talalat:focus-visible) .vonal {
  stroke-dasharray: 5 4;
}

/* Az el kiemelese mutatja a fokuszt, nem keret; kattintas utan se maradjon keret. */
.el .talalat:focus,
.el .talalat:focus-visible {
  outline: none;
}

.szerk-sav {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  align-items: baseline;
  gap: 8px 22px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border: 1px solid rgb(244 194 124 / 0.22);
  border-radius: 4px;
  background: rgb(24 19 15 / 0.94);
  transform: translateX(-50%);
  font-size: 16px;
}

.szerk-sav[hidden] {
  display: none;
}

.szerk-uzenet {
  margin: 0;
  color: var(--halvany);
}

.szerk-uzenet.ok {
  color: var(--gyertya);
}

.szerk-uzenet.hiba {
  color: #e59a7e;
}

.szerk-gombok {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}

.szoveg-gomb {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--szoveg);
  cursor: pointer;
  text-decoration: underline 1px rgb(220 202 177 / 0.35);
  text-underline-offset: 0.25em;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.szoveg-gomb:hover {
  color: var(--gyertya);
  text-decoration-color: var(--gyertya);
}

.szoveg-gomb[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .szerk-sav {
    flex-direction: column;
    gap: 2px;
    width: calc(100% - 32px);
    padding: 9px 14px 5px;
    font-size: 15px;
  }
}

/* Telefonon a sav ne takarja el az utolso pontokat. */
html.szerk.keskeny body {
  padding-bottom: 120px;
}

.noscript {
  max-width: 32rem;
  margin: 30vh auto 0;
  padding: 0 16px;
  text-align: center;
  color: var(--halvany);
}

/* --- belepes (szerk.html) --- */

.belepes {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px 16px;
}

.belepes form {
  width: min(100%, 320px);
}

.belepes h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-style: italic;
  font-weight: 340;
  color: #eadbc4;
}

.belepes .alcim {
  margin: 0 0 28px;
  color: var(--halvany);
}

.belepes label {
  display: block;
  margin-bottom: 8px;
}

.belepes input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #4b3d30;
  border-radius: 4px;
  background: #1a1410;
  color: var(--szoveg);
  caret-color: var(--gyertya);
  transition: border-color 150ms ease;
}

.belepes input:hover {
  border-color: #6b5644;
}

.belepes input:focus {
  outline: none;
  border-color: var(--gyertya);
}

.belepes .gomb {
  min-height: 44px;
  margin-top: 16px;
  padding: 0 20px;
  border: 1px solid rgb(244 194 124 / 0.5);
  border-radius: 4px;
  background: none;
  color: var(--gyertya);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.belepes .gomb:hover {
  border-color: var(--gyertya);
  background: rgb(244 194 124 / 0.08);
}

.belepes .gomb:disabled {
  opacity: 0.5;
  cursor: default;
}

.belepes .uzenet {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: #e59a7e;
}

.belepes a {
  color: var(--szoveg);
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.belepes a:hover {
  color: var(--gyertya);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
