/* Landing page only (index.html / index_hu.html). Loaded after styles.css,
   which still provides the tokens, topbar, buttons, cards and footer. */

/* ---------- Ambient: slower, fainter, drifting ---------- */
.landing .blob{ opacity: .42; animation: blobDrift 46s ease-in-out infinite alternate; }
.landing .blob--b{ animation-duration: 58s; animation-direction: alternate-reverse; }
.landing .blob--c{ animation-duration: 64s; }
@keyframes blobDrift{
  from{ transform: translate3d(0,0,0) scale(1); }
  to{ transform: translate3d(60px,40px,0) scale(1.12); }
}

/* ---------- Trail ---------- */
.landing main{ position: relative; }
.landing main > section{ position: relative; z-index: 1; }
.trail{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* --reveal is set from landing.js as the visitor scrolls. Without it (no JS,
     reduced motion) the whole trail shows. */
  clip-path: inset(0 0 calc(100% - var(--reveal, 100%)) 0);
}
.trail svg{ width: 100%; height: 100%; overflow: visible; display: block; }
.trail path{
  fill: none;
  stroke: var(--orange);
  stroke-opacity: .5;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: .1 16;
}

/* ---------- Gecko ---------- */
.gecko{
  display: block;
  pointer-events: none;
  user-select: none;
}
.gecko__body{
  position: relative;
  display: block;
  transform-origin: 50% 100%;
  animation: gSway 5.5s ease-in-out infinite alternate;
}
.gecko img{ display: block; width: 100%; height: auto; }

/* Eyelids: positioned in % of the 286x343 drawing so they track any size. */
.gecko__lid{
  position: absolute;
  top: 29.2%;
  width: 17.5%;
  height: 17%;
  border-radius: 50%;
  background: #000;
  transform: scaleY(0);
  transform-origin: 50% 0;
  animation: gBlink 5.2s infinite;
}
.gecko__lid--l{ left: 15.8%; }
.gecko__lid--r{ left: 53.4%; }
.gecko.is-paused *{ animation-play-state: paused; }

@keyframes gSway{ from{ transform: rotate(-3deg); } to{ transform: rotate(3deg); } }
@keyframes gBlink{ 0%, 94%, 100%{ transform: scaleY(0); } 97%{ transform: scaleY(1); } }

.gecko--hero{ width: 104px; margin-bottom: 4px; }

/* Peeks over the top edge of the phone. It sits behind the phone, so the
   translate is what hides and shows it. */
.gecko--peek{
  position: absolute;
  right: 28px;
  top: -70px;
  width: 92px;
  z-index: 0;
  animation: gPeek 11s ease-in-out infinite;
}
@keyframes gPeek{
  0%, 12%{ transform: translateY(74px); }
  22%, 78%{ transform: translateY(0); }
  88%, 100%{ transform: translateY(74px); }
}

/* Sits on the top edge of the closing card. */
.gecko--sit{
  position: absolute;
  right: 34px;
  top: -86px;
  width: 80px;
}

/* ---------- Hero ---------- */
.lpHero{ padding: 72px 0 110px; }
.lpHero .hero__title{ margin-top: 16px; }
.lpHero .hero__sub{ max-width: 52ch; }

/* ---------- Try it ---------- */
.lpTry{ padding: 20px 0 110px; }
.lpTry__head{ text-align: center; margin: 0 auto 36px; max-width: 46ch; }
.lpTry__head p{ margin: 10px 0 0; line-height: 1.6; }

.demo{
  display: grid;
  grid-template-columns: minmax(0, 340px) auto;
  justify-content: center;
  align-items: center;
  gap: 56px;
}
.demo__side{ display: grid; gap: 22px; }
.demo__stage{ position: relative; justify-self: center; }

.demoCtl{ display: grid; gap: 6px; justify-items: start; }
.demoCtl__label{ font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* The checklist beside the phone. Each row is a shortcut to the screen where
   that thing can be done, and ticks itself off once it has been. */
.tasks{ display: grid; gap: 6px; }
.tasks .demoCtl__label{ margin-bottom: 2px; }
.tryTask{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(255,255,255,.5);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.tryTask:hover{ background: #fff; transform: translateX(2px); }
.tryTask__box{
  flex: none;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(14,15,18,.25);
  transition: background .2s ease, border-color .2s ease;
}
.tryTask.is-done{ color: var(--muted); }
.tryTask.is-done .tryTask__box{ background: var(--mint); border-color: var(--mint); color: var(--ink); }

/* ---------- Phone ----------
   The inside borrows the mobile app's own palette and proportions
   (src/theme/theme.ts in simpler_mobile) rather than the landing page's, so
   the demo looks like the app it stands in for. */
.phone{
  --app-bg: #f7f7f5;
  --app-ink: #0d0d0d;
  --app-card: #fff;
  --app-2: #f0f0ee;
  --app-muted: #737373;
  --app-line: rgba(0,0,0,.08);
  --app-saved: #fbbf24;
  --serif: ui-serif, Georgia, "Times New Roman", serif;

  position: relative;
  z-index: 1;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 660px;
  border: 10px solid var(--ink);
  border-radius: 46px;
  background: var(--app-bg);
  color: var(--app-ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.phone__screen{ position: absolute; inset: 0; display: flex; flex-direction: column; }
.phone button{ cursor: pointer; }
.acard, .block, .node, .opt, .mrow, .nextBtn{ text-align: left; }
.phone button:focus-visible{ outline: 2px solid var(--orange); outline-offset: 2px; }
.phone .ico{ flex: none; vertical-align: -2px; }

/* headers */
.ph__head{ flex: none; padding: 20px 16px 12px; border-bottom: 1px solid var(--app-line); }
.ph__head--feed{ padding-bottom: 10px; }
.ph__brand{ font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.ph__eyebrow{ font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--app-muted); }
.ph__display{ margin: 3px 0 0; font-family: var(--serif); font-size: 24px; line-height: 1.15; letter-spacing: -.01em; }
.ph__meta{ margin: 5px 0 0; font-size: 12px; line-height: 1.45; color: var(--app-muted); }
.ph__backBtn{ display: block; margin: 0 0 6px -4px; padding: 4px; border: 0; background: none; }

/* 84px of bottom padding clears the floating tab bar. */
.ph__scroll{ flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 84px; }
.ph__scroll--flush{ padding: 0 0 84px; }
.ph__scroll--reader{ padding: 0 0 22px; }
.ph__label{ margin: 2px 0 8px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--app-muted); }

/* generated article covers */
.cover{ display: grid; place-items: center; }
.cover span{ font-family: var(--serif); font-weight: 700; opacity: .45; }
.cover--featured{ height: 108px; border-radius: 10px; font-size: 56px; }
.cover--thumb{ flex: none; width: 64px; height: 64px; border-radius: 10px; font-size: 30px; }
.cover--hero{ height: 150px; font-size: 76px; }

.pillT{ display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.flowBadge{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--app-2);
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 600;
}
.flowBadge b{ font-weight: 700; opacity: .7; }
.flowBadge--md{ border: 0; padding: 7px 12px; gap: 7px; background: var(--app-ink); color: var(--app-bg); font-size: 12px; }

/* feed */
.acard{
  display: block;
  width: 100%;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-card);
  padding: 10px;
  margin-bottom: 14px;
}
.acard--row{ display: flex; gap: 12px; align-items: center; }
.acard__kicker{ display: block; margin-top: 10px; font-size: 9px; font-weight: 700; letter-spacing: .12em; color: var(--app-muted); }
.acard__title{ display: block; margin-top: 4px; font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.2; }
.acard--row .acard__title{ margin-top: 0; font-size: 15px; }
.acard__row{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.acard__text{ min-width: 0; }

/* flow list + matrix */
.block{
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-card);
}
.block__head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--app-muted); }
.block__title{ font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--app-ink); }
.block__desc{ font-size: 13px; line-height: 1.45; color: var(--app-muted); }
.block__meta{ font-size: 11px; color: var(--app-muted); }

.canvas{ position: relative; }
.edge{ position: absolute; }
.edge--v{ border-left: 2px dotted rgba(0,0,0,.28); }
.edge--h{ border-top: 2px dotted rgba(0,0,0,.28); }
.node{
  position: absolute;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-card);
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  overflow: hidden;
}
.node__kicker{ display: flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--app-muted); }
.node__title{ font-size: 13px; font-weight: 600; line-height: 1.25; }
.node__meta{ margin-top: 4px; font-size: 10px; font-weight: 600; color: var(--app-muted); }
/* Optional aside: dashed edge, no lift, muted text. */
.node--deep{ border-style: dashed; border-color: rgba(0,0,0,.2); background: var(--app-bg); box-shadow: none; }
.node--deep .node__title{ color: var(--app-muted); }
/* A quiz is a checkpoint, not a reading step. */
.node--quiz{ border: 1.5px solid var(--app-ink); }
.node.is-read{ border: 1.5px solid #9ec9b4; background: #f4faf7; }

/* reader */
.ph__hero{ position: relative; }
.ph__heroBack{
  position: absolute;
  left: 12px; top: 14px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(13,13,13,.55);
  color: var(--app-bg);
}
.ph__heroPill{ position: absolute; left: 16px; bottom: 12px; }
.reader{ padding: 16px 16px 0; }
.reader__title{ margin: 0 0 10px; font-family: var(--serif); font-size: 24px; line-height: 1.18; letter-spacing: -.01em; }
.reader__byline{ margin-top: 10px; font-size: 12px; color: var(--app-muted); }
.reader__hint{ margin: 12px 0 10px; font-size: 12px; font-style: italic; color: var(--app-muted); }
.reader__text{
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  /* Long-press belongs to hold-to-reveal here, not to text selection. */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: opacity .15s ease;
}
.reader__text.is-dim{ opacity: .35; }

/* Every word is a real button so it is reachable by keyboard, but it has to
   keep flowing as text inside the paragraph. */
.w{
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  font: inherit;
  color: inherit;
}
.w:hover{ background: rgba(0,0,0,.07); }
.w.is-saved{ text-decoration: underline solid var(--app-saved); text-decoration-thickness: 3px; text-underline-offset: 4px; }

.peek{
  margin-top: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--app-ink);
  border-radius: 0 10px 10px 0;
  background: var(--app-2);
  font-size: 14px;
  line-height: 1.6;
  animation: phRise .18s ease;
}
.holdBtn{
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-card);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  transition: background .15s ease, color .15s ease;
}
.holdBtn.is-held{ background: var(--app-ink); color: #fff; }
.nextBtn{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-card);
  font-size: 14px;
  font-weight: 600;
}
.nextBtn small{ display: block; margin-bottom: 2px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--app-muted); }

/* word sheet */
.scrim{ position: absolute; inset: 0; z-index: 4; background: rgba(0,0,0,.35); animation: phFade .2s ease; }
.sheet{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 10px 18px 20px;
  border-radius: 22px 22px 0 0;
  background: var(--app-card);
  box-shadow: 0 -10px 30px rgba(0,0,0,.12);
  animation: phRise .24s ease;
}
.sheet__grab{ display: block; width: 36px; height: 4px; margin: 0 auto 14px; border-radius: 999px; background: rgba(0,0,0,.15); }
.sheet__word{ margin-top: 2px; font-family: var(--serif); font-size: 28px; font-weight: 700; }
.sheet__label{ margin: 14px 0 4px; font-size: 11px; font-weight: 700; color: var(--app-muted); }
.sheet__pos{ font-size: 11px; font-style: italic; color: var(--app-muted); }
.sheet__def{ font-size: 16px; line-height: 1.4; }
.sheet__muted{ font-size: 14px; color: var(--app-muted); }
.sheet__ctx{ font-size: 14px; line-height: 1.5; color: var(--app-muted); }
.sheet__ctx b{ color: var(--app-ink); }
.sheet__row{ display: flex; gap: 8px; margin-top: 18px; }
.sheet__row .pbtn{ flex: 1 1 0; }

.pbtn{
  padding: 13px 14px;
  border: 1px solid var(--app-ink);
  border-radius: 12px;
  background: var(--app-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.pbtn--ghost{ background: var(--app-card); color: var(--app-ink); border-color: var(--app-line); }
.pbtn--wide{ display: block; width: 100%; margin-top: 6px; }
.pbtn:disabled{ opacity: .4; cursor: default; }

/* quiz */
.q{ margin-bottom: 26px; }
.q__num{ margin-bottom: 8px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--app-muted); }
.q__prompt{ margin: 0 0 14px; font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.3; }
.q__hint{ margin: 0 0 12px; font-size: 12px; line-height: 1.45; color: var(--app-muted); }
.q__label{ margin: 12px 0 8px; font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--app-muted); }
.q__words{ display: flex; flex-wrap: wrap; gap: 8px; }
.opt, .mrow{
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 13px 14px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-card);
  font-size: 15px;
  line-height: 1.4;
}
.mrow{ display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.opt.is-chosen, .mrow.is-armed{ border-color: var(--app-ink); background: var(--app-2); }
.opt.is-right, .mrow.is-right{ border-color: #166534; background: #dcfce7; font-weight: 600; }
.opt.is-wrong, .mrow.is-wrong{ border-color: #991b1b; background: #fee2e2; font-weight: 600; }
.opt:disabled, .mrow:disabled{ cursor: default; color: inherit; }
.mchip{ padding: 4px 10px; border-radius: 999px; background: var(--app-ink); color: #fff; font-size: 13px; font-weight: 600; }
.slot{ padding: 4px 10px; border: 1px dashed rgba(0,0,0,.25); border-radius: 999px; font-size: 12px; color: var(--app-muted); }
.wchip{ padding: 8px 12px; border: 1px solid var(--app-line); border-radius: 999px; background: var(--app-card); font-size: 14px; }
.wchip:disabled{ cursor: default; color: inherit; }
.wchip.is-used{ opacity: .35; text-decoration: line-through; }
.wchip.is-decoy{ opacity: .35; }
.score{ display: grid; gap: 2px; margin-bottom: 20px; padding: 16px; border-radius: 14px; background: var(--app-ink); color: #fff; text-align: center; }
.score strong{ font-family: var(--serif); font-size: 34px; }
.score span{ font-size: 13px; opacity: .75; }

/* book */
.seg{ display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 12px; background: var(--app-2); }
.seg__btn{ flex: 1 1 0; padding: 8px; border: 0; border-radius: 9px; background: none; font-size: 13px; font-weight: 600; color: var(--app-muted); }
.seg__btn.is-on{ background: var(--app-card); color: var(--app-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.vrow{ display: grid; gap: 2px; margin-bottom: 8px; padding: 12px 14px; border: 1px solid var(--app-line); border-radius: 14px; background: var(--app-card); }
.vrow strong{ font-family: var(--serif); font-size: 18px; }
.vrow span{ font-size: 13px; color: var(--app-muted); }
.empty{ display: grid; justify-items: center; gap: 8px; padding: 34px 10px 10px; text-align: center; color: var(--app-muted); }
.empty strong{ font-family: var(--serif); font-size: 19px; color: var(--app-ink); }
.empty span{ font-size: 13px; line-height: 1.5; }
.empty .pbtn{ margin-top: 8px; }
.fcWrap{ text-align: center; }
.fc{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 200px;
  padding: 18px;
  border: 1px solid var(--app-line);
  border-radius: 18px;
  background: var(--app-card);
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
  transition: background .2s ease;
}
.fc__word{ font-family: var(--serif); font-size: 30px; font-weight: 700; }
.fc__tip{ font-size: 12px; color: var(--app-muted); }
.fc__gloss{ font-size: 17px; font-weight: 700; color: #92400e; animation: phRise .22s ease; }
.fc.is-flipped{ background: #fef3c7; }

.ph__done{
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--app-line);
  animation: phRise .3s ease;
}
.ph__done strong{ font-family: var(--serif); font-size: 20px; }
.ph__done span{ color: var(--app-muted); font-size: 14px; }
.ph__done .storeBadge{ justify-self: stretch; margin-top: 4px; }

/* floating tab bar, as in the app */
.tabs{
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--app-ink);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.tabs__item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(247,247,245,.6);
  font-size: 12px;
  font-weight: 700;
}
.tabs__item.is-active{ background: var(--app-bg); color: var(--app-ink); }

.toast2{
  position: absolute;
  left: 16px; right: 16px;
  bottom: 74px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--app-ink);
  color: var(--app-bg);
  font-size: 13px;
  font-weight: 600;
  animation: phRise .2s ease;
}

.toast2--low{ bottom: 18px; }

@keyframes phFade{ from{ opacity: 0; } }
@keyframes phRise{ from{ opacity: 0; transform: translateY(10px); } }

/* ---------- App Store badge ----------
   Not a link until APP_STORE_URL is set in landing.js. */
.storeBadge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.storeBadge[aria-disabled="true"]{
  background: transparent;
  color: var(--muted);
  border: 1px dashed rgba(14,15,18,.3);
  cursor: default;
}

/* ---------- What you get ---------- */
.lpGet{ padding: 0 0 120px; }
.lpGet .grid3{ margin-top: 0; }
.lpGet__also{ margin: 18px 0 0; text-align: center; font-size: 14px; }

.landing .cta{ padding: 0 0 80px; }
.landing .cta__inner{ position: relative; }
.landing .cta__inner p{ margin: 8px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .lpHero{ padding: 44px 0 90px; }
  .gecko--hero{ width: 88px; }

  .lpTry{ padding-bottom: 90px; }
  /* Phone first: on a small screen the demo itself is the point, and the
     checklist reads as a what-next underneath it. */
  .demo{ grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 70px; }
  .demo__stage{ order: -1; }
  .demo__side{ width: min(340px, 100%); justify-self: center; }

  .lpGet{ padding-bottom: 110px; }
  .gecko--sit{ width: 66px; top: -71px; right: 22px; }
  .storeBadge{ white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce){
  .landing .blob,
  .gecko, .gecko *,
  .scrim, .sheet, .peek, .toast2, .ph__done, .fc__gloss{ animation: none; }
  .tryTask, .tryTask__box, .holdBtn, .reader__text, .fc{ transition: none; }
}
