:root {
  /* AppColors.brandGreen / brandGreenDark / beaconOrange / textDark */
  --green: #5a9e84;
  --green-dark: #4a8a72;
  --amber: #ffb347;
  --ink: #2f3542;
  --paper: #faf8f4;
  --shadow: rgba(20, 24, 28, 0.45);
  /* Safari iOS: prefer JS-synced height; svh avoids the “barra URL” jump */
  --app-height: 100svh;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  color: var(--ink);
  background: #1c1814;
}

a {
  color: var(--green-dark);
}

.street-page {
  position: relative;
  height: var(--app-height);
  min-height: var(--app-height);
  overflow: hidden;
}

body.street-page {
  height: var(--app-height);
  overflow: hidden;
}

.street {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--app-height);
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top, 0px)) 20px 12px;
  pointer-events: none;
}

.chrome > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  text-decoration: none;
}

.mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.wordmark {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.chrome-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 24, 28, 0.28);
  backdrop-filter: blur(8px);
}

.lang button,
.lang .lang-opt {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
}

.lang button[aria-pressed="true"],
.lang .lang-opt[aria-current="page"] {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.burger {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 24, 28, 0.4);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  position: relative;
}

.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger span::before {
  top: -6px;
}

.burger span::after {
  top: 6px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.drawer.is-open {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 28, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drawer.is-open .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(22rem, 88vw);
  background: var(--paper);
  color: var(--ink);
  padding: 5.5rem 1.75rem 2rem;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  box-shadow: -12px 0 40px var(--shadow);
}

.drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drawer a,
.drawer .soon {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.15rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(47, 53, 66, 0.12);
}

.drawer .soon {
  color: rgba(47, 53, 66, 0.55);
  cursor: default;
}

.drawer .soon small {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

/* Enlace discreto a T&C (no va en la hamburguesa) */
.legal-whisper {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  margin: 0;
  padding: 0 16px max(10px, env(safe-area-inset-bottom, 0px));
  text-align: center;
  pointer-events: none;
}

.legal-whisper a {
  pointer-events: auto;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  text-shadow: 0 1px 6px var(--shadow);
}

.legal-whisper a + span,
.legal-whisper span {
  pointer-events: none;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 6px var(--shadow);
}

.legal-whisper a:hover,
.legal-whisper a:focus-visible {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

.legal-whisper-inline {
  position: static;
  margin: 2.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(47, 53, 66, 0.12);
  text-align: left;
  pointer-events: auto;
}

.legal-whisper-inline a {
  color: rgba(47, 53, 66, 0.45);
  text-shadow: none;
  font-size: 0.8rem;
}

.legal-whisper-inline a:hover,
.legal-whisper-inline a:focus-visible {
  color: var(--green-dark);
}

.legal-page {
  background: var(--paper);
  min-height: 100svh;
}

.legal-page .chrome {
  padding-top: max(12px, env(safe-area-inset-top, 0px));
}

.legal-page .brand {
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  border-radius: 0;
}

.legal-page .lang {
  border-color: rgba(47, 53, 66, 0.2);
  background: #fff;
}

.legal-page .lang button,
.legal-page .lang .lang-opt {
  color: var(--ink);
}

.legal-page .lang button[aria-pressed="true"],
.legal-page .lang .lang-opt[aria-current="page"] {
  background: var(--green);
  color: #fff;
}

.legal-page .burger {
  background: var(--green);
}

.legal-wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 6.5rem 1.25rem 4rem;
  line-height: 1.55;
}

.legal-wrap h1 {
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

.legal-wrap h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.6rem;
}

.legal-wrap h3 {
  font-size: 1.02rem;
  margin: 1.4rem 0 0.4rem;
}

.legal-wrap p,
.legal-wrap li {
  font-size: 0.98rem;
}

.legal-wrap blockquote {
  margin: 1rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--green);
  color: rgba(47, 53, 66, 0.8);
}

.legal-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0;
}

.legal-wrap th,
.legal-wrap td {
  border: 1px solid rgba(47, 53, 66, 0.15);
  padding: 0.45rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.legal-wrap th {
  background: rgba(90, 158, 132, 0.15);
}

@media (max-width: 640px) {
  .mark {
    width: 40px;
    height: 40px;
  }

  .wordmark {
    font-size: 1.2rem;
    letter-spacing: 0.12em;
  }
}
