/* Beyond2Day — página principal (beyond2day.app)
 * Mismo lenguaje visual que la app: crema cálido, tinta índigo, dorado, lavanda; Fraunces + Nunito + Caveat.
 */
:root {
  --ink: #2A2366;
  --ink-2: #4A3D96;
  --ink-3: #8E86BD;
  --cream: #FFF9F2;
  --cream-2: #F7EEE4;
  --gold: #F4B142;
  --gold-deep: #E39A22;
  --gold-soft: #FFF0CC;
  --lav: #B7A7F2;
  --lav-soft: #EFEAFF;
  --night: #1E1A55;
  --night-2: #2B2A6E;
  --star: #FFE7A3;
  --shadow: 0 14px 40px rgba(42, 35, 102, 0.16);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --gutter: max(18px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.6; font-size: 17px; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.6vw, 46px); margin-bottom: 14px; }
h3 { font-size: 22px; margin-bottom: 10px; }
p { margin: 0 0 14px; }

/* one language at a time (the language menu switches, the choice is remembered) */
html[data-lang="es"] body [lang]:not([lang="es"]), html[data-lang="en"] body [lang]:not([lang="en"]),
html[data-lang="pt"] body [lang]:not([lang="pt"]), html[data-lang="fr"] body [lang]:not([lang="fr"]),
html[data-lang="de"] body [lang]:not([lang="de"]), html[data-lang="it"] body [lang]:not([lang="it"]) { display: none !important; }
.lang-menu { position: fixed; z-index: 30; min-width: 170px; padding: 6px; border-radius: 18px; background: #fff; box-shadow: 0 14px 40px rgba(42,35,102,.25); display: grid; }
.lang-menu button { border: 0; background: none; text-align: left; padding: 10px 14px; border-radius: 12px; font: 700 16px var(--sans); color: var(--ink); cursor: pointer; }
.lang-menu button:hover, .lang-menu button.on { background: var(--lav-soft); }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #FFD26E, var(--gold)); color: #3A2A08;
  font: 800 17px/1 var(--sans); text-decoration: none;
  box-shadow: 0 8px 22px rgba(227, 154, 34, 0.38), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(227, 154, 34, 0.45), inset 0 1px 0 rgba(255,255,255,.6); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible, .lang:focus-visible, .nav a:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; }
.btn.small { padding: 11px 18px; font-size: 15px; }
.btn.ghost { background: rgba(255, 252, 247, 0.8); color: var(--ink); box-shadow: 0 6px 18px rgba(42,35,102,.14); backdrop-filter: blur(6px); }

/* ---------- top bar ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 12px;
  transition: background .3s, box-shadow .3s;
}
.top.solid { background: rgba(255, 249, 242, 0.92); box-shadow: 0 4px 24px rgba(42,35,102,.10); backdrop-filter: blur(10px); }
.logo { font-family: var(--serif); font-weight: 600; font-size: 28px; letter-spacing: -0.5px; text-decoration: none; color: var(--ink); line-height: 1; white-space: nowrap; }
.logo span { color: var(--gold); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; color: var(--ink); opacity: .85; }
.nav a:hover { opacity: 1; }
.lang { border: 0; background: rgba(255,255,255,.75); color: var(--ink); font: 800 14px var(--sans); border-radius: 999px; padding: 9px 12px; cursor: pointer; }
@media (max-width: 860px) { .nav { display: none; } .lang { margin-left: auto; } }
@media (max-width: 420px) { .top .btn.small { padding: 10px 14px; font-size: 14px; } .logo { font-size: 24px; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: max(100svh, 640px); overflow: hidden; background: #E9D6C8; isolation: isolate; }
.hero-bg { position: absolute; max-width: none; z-index: -2; user-select: none; }
.hero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,249,242,.92) 0%, rgba(255,249,242,.72) 34%, rgba(255,249,242,0) 62%); }
.hero-copy { position: relative; z-index: 2; max-width: 560px; padding: 140px var(--gutter) 40px; margin-left: max(0px, calc((100vw - 1180px) / 2)); }
.eyebrow { font-family: var(--hand); font-size: 26px; color: var(--ink-2); margin-bottom: 8px; line-height: 1.1; }
.hero h1 { font-size: clamp(40px, 6.2vw, 68px); margin-bottom: 18px; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 54ch; }
.lead.dark { color: var(--ink-2); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 16px; }
.fine { font-size: 14px; color: var(--ink-3); font-weight: 700; }
.fine.light { color: #C9C3EE; }
.stage { position: absolute; z-index: 3; width: clamp(200px, 26vw, 330px); left: 66%; transform: translateX(-50%); }
.hand-note { position: absolute; z-index: 2; right: max(24px, 6vw); top: 120px; font-family: var(--hand); font-size: 28px; line-height: 1.05; color: var(--ink-2); transform: rotate(-4deg); text-align: right; margin: 0; }
@media (max-width: 860px) {
  .hero { min-height: max(100svh, 760px); }
  .hero-shade { background: linear-gradient(180deg, rgba(255,249,242,.94) 0%, rgba(255,249,242,.78) 42%, rgba(255,249,242,0) 64%); }
  .hero-copy { padding-top: 104px; text-align: center; margin: 0 auto; }
  .hero-copy .lead { margin-inline: auto; }
  .ctas { justify-content: center; }
  .stage { left: 50%; width: clamp(170px, 46vw, 250px); }
  .hand-note { display: none; }
}

/* at night the cover follows the sky: deep veil, light text (like the app after sunset) */
.is-night .hero { background: var(--night); }
.is-night .hero-shade { background: linear-gradient(90deg, rgba(22,18,62,.88) 0%, rgba(22,18,62,.62) 36%, rgba(22,18,62,0) 64%); }
.is-night .hero h1 { color: #fff; }
.is-night .eyebrow, .is-night .hand-note { color: #FFE7A3; }
.is-night .hero .lead { color: #E2DCFF; }
.is-night .hero .fine { color: #BDB4F0; }
.is-night .top:not(.solid) .logo, .is-night .top:not(.solid) .nav a { color: #fff; }
.is-night .top:not(.solid) .lang { background: rgba(255,255,255,.16); color: #fff; }
@media (max-width: 860px) {
  .is-night .hero-shade { background: linear-gradient(180deg, rgba(22,18,62,.9) 0%, rgba(22,18,62,.66) 44%, rgba(22,18,62,0) 66%); }
}

/* the Companion (same rules as in the app) */
.companion { position: relative; width: 100%; }
.companion-canvas { width: 100%; height: auto; display: block; touch-action: manipulation; cursor: pointer; }
.c-bubble {
  position: absolute; z-index: 5; left: 50%; bottom: 100%; margin-bottom: -4px; translate: -50% 0;
  width: max-content; min-width: 120px; max-width: min(280px, 80vw);
  padding: 12px 15px; border-radius: 20px;
  background: rgba(255, 252, 247, 0.97); color: var(--ink);
  font-size: 15px; line-height: 1.35; font-weight: 700;
  box-shadow: 0 8px 26px rgba(42, 35, 102, 0.22);
  opacity: 0; transform: translateY(6px) scale(.96); transform-origin: bottom center; transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.c-bubble.show { opacity: 1; transform: none; }
.c-bubble::after { content: ''; position: absolute; left: calc(50% - 8px); bottom: -6px; width: 16px; height: 16px; background: inherit; transform: rotate(45deg); border-radius: 3px; }

/* ---------- sections ---------- */
.block { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.cream { background: var(--cream); }
.lav { background: linear-gradient(180deg, var(--lav-soft), #F8F4FF); }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.kicker.light { color: #BDB4F0; }
.hand { font-family: var(--hand); font-size: 25px; line-height: 1.15; color: var(--ink-2); margin-top: 14px; }

.rituals { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 34px; }
.ritual { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; padding: 26px; border-radius: 28px; box-shadow: var(--shadow); }
.ritual img { width: 120px; filter: drop-shadow(0 8px 14px rgba(42,35,102,.18)); }
.ritual.morning { background: linear-gradient(160deg, #FFF6E2, #FFFDF8 60%); }
.ritual.night { background: linear-gradient(160deg, #2E2A78, var(--night)); color: #F3EEFF; }
.ritual.night h3, .ritual.night .hand { color: #FFE7A3; }
.ritual ol { margin: 0; padding-left: 20px; }
.ritual li { margin-bottom: 8px; }
.ritual li::marker { color: var(--gold-deep); font-weight: 800; }
.ritual.night li::marker { color: var(--star); }
@media (max-width: 900px) { .rituals { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .ritual { grid-template-columns: 1fr; } .ritual img { width: 110px; } }

/* the sky of gratitudes */
.sky { background: radial-gradient(120% 90% at 70% 0%, #3B3690, var(--night) 55%, #141139); color: #EDE8FF; overflow: hidden; }
.sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-copy { position: relative; max-width: 760px; }
.sky h2 { color: #fff; }
.sky p { color: #D9D2FA; font-size: 19px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.stats div { padding: 18px; border-radius: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(4px); }
.stats b { display: block; font-family: var(--serif); font-size: 40px; color: var(--star); line-height: 1; margin-bottom: 6px; }
.stats span { font-size: 15px; color: #D9D2FA; }
@media (max-width: 760px) { .sky { padding-bottom: 230px; } }
@media (max-width: 560px) {
  .stats { gap: 8px; }
  .stats div { padding: 14px 10px; text-align: center; }
  .stats b { font-size: 32px; }
  .stats span { font-size: 13px; line-height: 1.3; display: block; }
}

.moments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.moments figure { margin: 0; padding: 18px 14px 14px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.moments img { width: 74%; margin: 0 auto 8px; }
.moments figcaption { font-family: var(--hand); font-size: 24px; color: var(--ink-2); line-height: 1.1; }
@media (max-width: 820px) { .moments { grid-template-columns: 1fr 1fr; } }

.two { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: center; }
.two > img { width: 220px; justify-self: center; filter: drop-shadow(0 14px 22px rgba(42,35,102,.22)); }
.night .two { grid-template-columns: 1fr 240px; }
@media (max-width: 760px) { .two, .night .two { grid-template-columns: 1fr; } .two > img { width: 170px; } .night .two > img { order: -1; } }
.checks { list-style: none; padding: 0; margin: 10px 0 18px; }
.checks li { position: relative; padding-left: 34px; margin-bottom: 12px; font-size: 18px; }
.checks li::before { content: '★'; position: absolute; left: 0; top: 0; color: var(--gold-deep); font-size: 20px; }
.note { font-size: 14px; color: var(--ink-3); font-weight: 700; }

.books { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; }
.book { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 22px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); align-items: start; }
.book img { width: 150px; border-radius: 6px; box-shadow: 0 12px 26px rgba(20, 15, 50, .28); }
.book .meta { font-size: 14px; font-weight: 800; color: var(--ink-3); margin-bottom: 8px; }
@media (max-width: 900px) { .books { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .book { grid-template-columns: 1fr; } .book img { width: 140px; } }

.author-block { padding-top: 0; }

.night { background: linear-gradient(180deg, var(--night-2), var(--night)); color: #EDE8FF; }
.night h2, .night h3 { color: #fff; }
.install { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0 14px; }
.install div { padding: 18px 20px; border-radius: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.install h3 { font-size: 19px; }
.install p { color: #D9D2FA; margin: 0; font-size: 16px; }
@media (max-width: 560px) { .install { grid-template-columns: 1fr; } }

.final { background: radial-gradient(80% 120% at 50% 100%, #FFE9C4, var(--cream) 70%); }

/* ---------- footer ---------- */
.foot { background: #18153F; color: #BDB4F0; padding: 34px 0 calc(34px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
.foot .logo { color: #fff; font-size: 24px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a { color: #E4DEFF; text-decoration: none; font-weight: 700; }
.foot nav a:hover { text-decoration: underline; }
.foot p { margin: 0 0 0 auto; }
@media (max-width: 700px) { .foot p { margin: 0; } }

/* ---------- legal / help pages ---------- */
.page { padding: 120px 0 80px; }
.page h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.page h2 { font-size: 24px; margin: 34px 0 10px; }
.page p, .page li { color: #3B3378; }
.page .updated { color: var(--ink-3); font-weight: 700; font-size: 15px; margin-bottom: 26px; }
.page ul { padding-left: 22px; }
.page .card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 20px 22px; margin: 16px 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
