:root {
  --bg: #030201;
  --panel: rgba(7, 5, 3, 0.78);
  --panel-deep: rgba(2, 2, 1, 0.88);
  --gold: #d2a85b;
  --gold-soft: #f0d39a;
  --gold-muted: #9c6c2c;
  --bronze: #6f431c;
  --text: #d8bf8c;
  --text-soft: #b99a64;
  --danger: #b65b3f;
  --line: rgba(185, 124, 45, 0.72);
  --line-soft: rgba(185, 124, 45, 0.28);
  --title-font: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --body-font: "Montserrat", "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: var(--body-font);
  overflow-x: hidden;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

/* BACKGROUND CITY / MAFIA SILHOUETTE / VINTAGE CAR:
   Schimba URL-ul de mai jos daca vrei alta imagine de fundal. */
.landing-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(157, 98, 31, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.76)),
    url("../../images/backgroundlanding.png") center center / cover no-repeat;
  isolation: isolate;
}

.landing-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 0 46%, rgba(0, 0, 0, 0.32) 72%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.54), transparent 28%, transparent 69%, rgba(0,0,0,0.58)),
    linear-gradient(180deg, rgba(0,0,0,0.1), transparent 36%, rgba(0,0,0,0.64));
}

.landing-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 86% 17%, rgba(214, 158, 77, 0.22), transparent 14%),
    radial-gradient(circle at 52% 84%, rgba(178, 113, 42, 0.1), transparent 24%);
  mix-blend-mode: screen;
}

.landing-stage {
  position: relative;
  z-index: 2;
  width: min(100vw, 177.777svh);
  min-height: 100svh;
  margin: 0 auto;
}

.book-prop {
  position: absolute;
  right: clamp(-72px, -3.2vw, -36px);
  bottom: clamp(-104px, -8.5svh, -56px);
  z-index: 0;
  width: clamp(300px, 24vw, 470px);
  aspect-ratio: 1448 / 1086;
  pointer-events: none;
  background: url("img/book-prop.png") center / contain no-repeat;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.75));
  opacity: 0.86;
}

/* CREST/LOGO B: versiunea transparenta este generata din images/assetlanding.png. */
.brand-header {
  position: absolute;
  top: clamp(18px, 3vh, 34px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 18px rgba(191, 128, 43, 0.24));
}

.crest-mark {
  position: relative;
  width: clamp(104px, 8vw, 138px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: var(--gold-soft);
  background: url("img/logo-b.png") center / contain no-repeat;
  border: 0;
  outline: 0;
  box-shadow: none;
}

.crest-mark::before,
.crest-mark::after {
  content: none;
}

.crest-mark span {
  opacity: 0;
  pointer-events: none;
}

.crest-mark span::before {
  content: none;
}

.crest-mark span::after {
  content: none;
}

.hero-copy {
  position: absolute;
  top: clamp(126px, 15.3vh, 156px);
  left: 50%;
  width: min(1280px, 78vw);
  transform: translateX(-50%);
  text-align: center;
}

.small-crest {
  width: min(280px, 18vw);
  margin: 0 auto 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--gold);
  font-family: var(--title-font);
  font-size: clamp(24px, 2.25vw, 38px);
  line-height: 1;
  text-shadow: 0 0 18px rgba(204, 136, 55, 0.42);
}

.small-crest::before,
.small-crest::after {
  content: "";
  flex: 1;
  height: 1px;
  background:
    radial-gradient(circle at 100% 50%, rgba(216, 159, 75, 0.88) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent, rgba(194, 133, 52, 0.82), transparent);
  box-shadow: 0 0 10px rgba(184, 113, 34, 0.24);
}

.small-crest::after {
  transform: scaleX(-1);
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(54px, 4.45vw, 78px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0.026em;
  color: transparent;
  background: linear-gradient(180deg, #f6ddb0 0%, #c99f5a 36%, #7d5a2b 74%, #e7cb92 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.98);
  filter: drop-shadow(0 0 8px rgba(174, 112, 43, 0.28));
  white-space: nowrap;
}

.hero-copy h1 span {
  display: inline;
  white-space: nowrap;
}

.riddle-card,
.value-card,
.access-menu {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.035), transparent 30%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 8px),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow:
    0 22px 38px rgba(0, 0, 0, 0.76),
    inset 0 0 28px rgba(160, 96, 28, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(1px);
}

.riddle-card {
  position: absolute;
  left: 50%;
  top: min(45.4svh, 430px);
  transform: translateX(-50%);
  width: min(970px, 58vw);
  height: min(218px, 23.1svh);
  display: grid;
  grid-template-columns: 178px 1fr 190px;
  gap: 28px;
  align-items: center;
  padding: 22px 34px;
  overflow: hidden;
}

.riddle-card > * {
  position: relative;
  z-index: 2;
}

.riddle-main {
  position: relative;
}

.riddle-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line-soft);
  pointer-events: none;
}

.riddle-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("img/riddle-frame.png") center / 100% 100% no-repeat;
  opacity: 0.9;
  filter: drop-shadow(0 0 10px rgba(217, 160, 78, 0.26));
}

.ornament {
  position: absolute;
  z-index: 3;
  width: 58px;
  height: 58px;
  border: 0;
  opacity: 0.82;
  pointer-events: none;
  background: url("img/corner-ornate.png") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(206, 143, 58, 0.28));
}

.corner-tl { left: 3px; top: 3px; }
.corner-tr { right: 3px; top: 3px; transform: scaleX(-1); }
.corner-bl { left: 3px; bottom: 3px; transform: scaleY(-1); }
.corner-br { right: 3px; bottom: 3px; transform: scale(-1); }

.riddle-icon,
.riddle-emblem,
.value-icon {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  font-family: var(--title-font);
  text-shadow: 0 0 16px rgba(220, 166, 83, 0.34);
}

.riddle-icon {
  justify-self: center;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(211, 163, 85, 0.44);
  background: radial-gradient(circle, rgba(156, 93, 24, 0.18), rgba(0,0,0,0.58));
  font-size: 57px;
}

.riddle-icon::before,
.riddle-emblem::before,
.value-icon::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(185, 124, 45, 0.28);
  border-radius: 46% 54% 48% 52%;
  transform: rotate(20deg);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 7px;
  padding: 0 12px 0 0;
  background: linear-gradient(90deg, rgba(7, 5, 3, 0.92), rgba(7, 5, 3, 0.72), transparent);
  color: var(--gold);
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.075em;
}

.riddle-text {
  max-width: 575px;
  margin: 0;
  color: #dfc794;
  font-family: var(--serif);
  font-size: clamp(23px, 1.55vw, 28px);
  font-weight: 600;
  line-height: 1.05;
}

.riddle-form {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 174px;
  gap: 14px;
  margin-top: 14px;
}

.riddle-form input,
.login-box input {
  width: 100%;
  border: 1px solid rgba(176, 118, 42, 0.6);
  background: linear-gradient(180deg, rgba(7, 5, 3, 0.96), rgba(21, 13, 7, 0.84));
  color: #f0d9aa;
  outline: none;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.66), 0 0 0 1px rgba(0,0,0,0.72);
}

.riddle-form input {
  height: 45px;
  padding: 0 20px;
  font-family: var(--serif);
  font-size: 21px;
}

.riddle-form input::placeholder,
.login-box input::placeholder {
  color: rgba(211, 183, 134, 0.58);
}

.riddle-form input:focus,
.login-box input:focus {
  border-color: rgba(231, 184, 93, 0.9);
  box-shadow: inset 0 0 18px rgba(0,0,0,0.66), 0 0 18px rgba(172, 108, 35, 0.24);
}

.riddle-form button,
.login-box button {
  height: 45px;
  border: 1px solid rgba(220, 173, 86, 0.68);
  color: #f0d39a;
  font-family: var(--title-font);
  font-weight: 700;
  letter-spacing: 0.08em;
  background:
    linear-gradient(90deg, transparent 0 8px, rgba(255,255,255,0.04) 8px calc(100% - 8px), transparent calc(100% - 8px)),
    linear-gradient(180deg, #5a3415, #211208 52%, #674018);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.84), 0 8px 18px rgba(0,0,0,0.54), 0 0 18px rgba(178, 111, 36, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.riddle-form button:hover,
.login-box button:hover {
  transform: translateY(-1px);
  border-color: #efc77e;
  color: #fff0c5;
}

.feedback {
  position: fixed;
  left: 50%;
  top: clamp(270px, 34svh, 340px);
  z-index: 30;
  width: min(430px, calc(100vw - 34px));
  min-height: 0;
  padding: 15px 24px;
  margin: 0;
  border: 1px solid rgba(212, 160, 75, 0.7);
  color: var(--gold-soft);
  font-family: var(--title-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.05), transparent 34%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 8px),
    rgba(10, 6, 3, 0.94);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.68),
    inset 0 0 28px rgba(154, 92, 24, 0.2),
    0 0 24px rgba(181, 113, 38, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -12px) scale(0.98);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}

.feedback::before,
.feedback::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 22px;
  height: 22px;
  border-top: 1px solid rgba(229, 179, 89, 0.86);
}

.feedback::before {
  left: 7px;
  border-left: 1px solid rgba(229, 179, 89, 0.86);
}

.feedback::after {
  right: 7px;
  border-right: 1px solid rgba(229, 179, 89, 0.86);
}

.feedback.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.feedback.is-error {
  border-color: rgba(182, 91, 63, 0.78);
  color: #d98263;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.68),
    inset 0 0 28px rgba(127, 45, 28, 0.22),
    0 0 24px rgba(182, 91, 63, 0.16);
}

.feedback.is-success {
  color: var(--gold-soft);
}

.riddle-emblem {
  justify-self: center;
  width: 126px;
  aspect-ratio: 1;
  border: 0;
  background: url("img/logo-b.png") center / contain no-repeat;
  clip-path: none;
  opacity: 0.74;
  filter: drop-shadow(0 0 14px rgba(206, 143, 58, 0.22));
}

.riddle-emblem::before {
  content: none;
}

.riddle-emblem span {
  opacity: 0;
}

.access-menu {
  position: absolute;
  left: 50%;
  top: calc(min(45.4svh, 430px) + min(220px, 23.3svh) + 10px);
  transform: translate(-50%, -8px);
  width: min(970px, 58vw);
  padding: 11px 14px;
  opacity: 0;
  pointer-events: none;
}

.landing-stage.is-unlocked {
  min-height: 112svh;
}

.access-menu[hidden] {
  display: none;
}

.access-menu.is-visible {
  animation: revealAccess 0.55s ease forwards;
  pointer-events: auto;
}

.landing-stage.is-unlocked .values-section {
  top: 78svh;
}

.landing-stage.is-unlocked .landing-quote {
  bottom: -8svh;
}

.login-box {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 130px;
  gap: 10px;
  align-items: end;
}

.login-box label {
  display: grid;
  gap: 5px;
  color: #c6a56f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-box input,
.login-box button {
  height: 38px;
  font-size: 12px;
}

.login-box input {
  padding: 0 12px;
}

.values-section {
  position: absolute;
  left: 50%;
  top: 70.4svh;
  transform: translateX(-50%);
  width: min(780px, 47vw);
  text-align: center;
}

.values-section h2 {
  margin: 0 0 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--gold);
  font-family: var(--title-font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.values-section h2::before,
.values-section h2::after {
  content: "";
  width: 132px;
  height: 22px;
  background: url("img/divider-flourish.png") center / contain no-repeat;
  filter: drop-shadow(0 0 7px rgba(196, 130, 45, 0.2));
}

.values-section h2::after {
  transform: scaleX(-1);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.value-card {
  position: relative;
  min-height: min(188px, 19.8svh);
  padding: 19px 20px 15px;
  overflow: hidden;
}

.value-card > * {
  position: relative;
  z-index: 2;
}

.value-card::before,
.value-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 54px;
  height: 54px;
  border: 0;
  opacity: 0.72;
  pointer-events: none;
  background: url("img/corner-ornate.png") center / contain no-repeat;
  filter: drop-shadow(0 0 7px rgba(207, 145, 58, 0.24));
}

.value-card::before {
  left: 3px;
  top: 3px;
}

.value-card::after {
  right: 3px;
  bottom: 3px;
  transform: scale(-1);
}

.value-icon {
  width: 54px;
  aspect-ratio: 1;
  margin: 0 auto 9px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 113, 35, 0.18), rgba(0,0,0,0.55));
}

.value-icon::before {
  inset: -6px;
}

.value-icon::after {
  position: relative;
  z-index: 1;
  color: var(--gold-soft);
  font-family: var(--title-font);
  font-size: 27px;
  font-weight: 700;
}

.value-icon.respect::after { content: "R"; }
.value-icon.loyalty::after { content: "L"; }
.value-icon.discretion::after { content: "D"; }

.value-card h3 {
  margin: 0 0 7px;
  color: var(--gold);
  font-family: var(--title-font);
  font-size: 19px;
  letter-spacing: 0.045em;
}

.value-card p {
  margin: 0;
  color: #cab284;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.16;
}

.landing-quote {
  position: absolute;
  left: 50%;
  bottom: 2.4svh;
  transform: translateX(-50%);
  width: min(900px, 70vw);
  color: var(--gold);
  font-family: var(--title-font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-align: center;
  text-shadow: 0 0 18px rgba(168, 111, 39, 0.28);
}

@keyframes revealAccess {
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-height: 840px) and (min-width: 900px) {
  .brand-header { top: 18px; }
  .crest-mark { width: 82px; }
  .hero-copy { top: 118px; }
  .hero-copy h1 { font-size: clamp(48px, 4.15vw, 68px); }
  .riddle-card { top: 43.6svh; height: 188px; }
  .riddle-text { font-size: clamp(22px, 1.45vw, 27px); }
  .riddle-form input, .riddle-form button { height: 40px; }
  .values-section { top: 69.8svh; }
  .value-card { min-height: 150px; padding-top: 14px; }
  .value-icon { width: 42px; margin-bottom: 6px; }
  .value-card p { font-size: 15px; }
  .landing-quote { font-size: 14px; bottom: 2svh; }
}

@media (max-width: 1180px) {
  .riddle-card,
  .access-menu {
    width: min(940px, 78vw);
  }

  .riddle-card {
    grid-template-columns: 130px 1fr 120px;
  }

  .values-section {
    width: min(760px, 72vw);
  }
}

@media (max-width: 820px) {
  body {
    overflow-y: auto;
  }

  .landing-shell {
    min-height: 100svh;
    overflow: visible;
    background-position: 28% center;
  }

  .book-prop {
    display: none;
  }

  .feedback {
    top: 18px;
    width: min(360px, calc(100vw - 28px));
    padding: 12px 18px;
    font-size: 12px;
  }

  .landing-stage {
    width: 100%;
    min-height: auto;
    padding: 22px 14px 28px;
    display: grid;
    gap: 20px;
    justify-items: center;
  }

  .brand-header,
  .hero-copy,
  .riddle-card,
  .access-menu,
  .values-section,
  .landing-quote {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    transform: none;
  }

  .brand-header {
    min-height: 96px;
  }

  .crest-mark {
    width: 82px;
  }

  .hero-copy {
    width: 100%;
  }

  .small-crest {
    width: min(250px, 72vw);
  }

  .hero-copy h1 {
    font-size: clamp(42px, 12vw, 72px);
    white-space: normal;
  }

  .hero-copy h1 span {
    white-space: normal;
  }

  .riddle-card {
    width: min(620px, 100%);
    min-height: auto;
    height: auto;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
    text-align: center;
  }

  .riddle-icon {
    width: 76px;
    font-size: 46px;
  }

  .riddle-text {
    max-width: none;
    font-size: clamp(23px, 7vw, 33px);
  }

  .riddle-form {
    grid-template-columns: 1fr;
  }

  .riddle-emblem {
    display: none;
  }

  .access-menu {
    width: min(620px, 100%);
  }

  .landing-stage.is-unlocked {
    min-height: auto;
  }

  .landing-stage.is-unlocked .values-section,
  .landing-stage.is-unlocked .landing-quote {
    top: auto;
    bottom: auto;
  }

  .login-box {
    grid-template-columns: 1fr;
  }

  .values-section {
    width: min(620px, 100%);
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .value-card {
    min-height: auto;
  }

  .landing-quote {
    width: min(620px, 100%);
    font-size: 13px;
    letter-spacing: 0.14em;
    line-height: 1.65;
  }
}
