/* ── Fuentes ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Dreaming Outloud Sans';
  src: url('../fonts/DreamingOutloudSans.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --color-bg:          #f2dfa8;
  --color-primary:     #5a6e2a;
  --color-brown:       #8b6030;
  --color-text:        #475324;
  --color-text-light:  #7a6840;
  --color-white:       #ffffff;
  --color-wine:        #7a1828;
  --color-candle:      #e0c060;
  --color-flower:      #c8a030;
  --font-main:         'Dreaming Outloud Sans', cursive;
  --font-heading:      'Playfair Display', Georgia, serif;
  --font-body:         'Inter', system-ui, sans-serif;
  --nav-height:        60px;
  --max-w:             480px;
  --radius:            14px;
  --transition:        0.2s ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  touch-action: pan-y;
}

html, body {
  height: 100%;
  background: #f2dfa8;
  color: #475324;
  font-family: var(--font-body);
}

body {
  font-size: 18px;
  line-height: 1.4;
  min-height: 100dvh;
  overscroll-behavior: none;
  overflow-x: hidden;
}

/* ── Tipografía ──────────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
}

h1 { font-size: clamp(2.6rem, 10vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
h3 { font-size: clamp(1.4rem, 4vw, 1.8rem); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* ── Layout base ─────────────────────────────────────────────────────────── */
.app-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.nav-spacer { height: var(--nav-height); }

p { font-size: 1.1rem; color: var(--color-text-light); }

/* ── Botón ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.8rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1.2rem;
  letter-spacing: .03em;
  transition: transform var(--transition), opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:active { opacity: .85; transform: scale(.97); }
.btn-outline { border: 2px solid var(--color-brown); color: var(--color-brown); }
.btn-outline:active { background: var(--color-brown); color: #fff; transform: scale(.97); }

/* ── Flecha retroceso ────────────────────────────────────────────────────── */
.btn-back {
  position: fixed;
  top: 18px;
  left: max(16px, calc(50vw - 224px));
  z-index: 100;
  color: var(--color-text);
  display: flex;
  align-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease;
}

.btn-back:active {
  transform: scale(1.15);
}

/* ── Página interna ──────────────────────────────────────────────────────── */
.page-inner { padding: 1.5rem; }

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 5.5vw, 2.2rem);
  font-weight: 600;
  text-align: center;
  color: var(--color-text);
  margin-bottom: .2rem;
}

.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

/* ── Navegación inferior ─────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: var(--max-w);
  height: var(--nav-height);
  background: rgba(240, 219, 180, 0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1.5px solid rgba(160,118,56,0.3);
  display: flex; align-items: stretch;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--color-text-light);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  padding: .3rem 0;
}

.nav-item svg {
  width: 22px; height: 22px;
  transition: transform var(--transition);
}
.nav-item:active svg { transform: scale(.88); }
.nav-item.active { color: var(--color-primary); }
.nav-item.active svg { stroke: var(--color-primary); }

/* ── Selector de idioma ──────────────────────────────────────────────────── */
.lang-switcher {
  position: fixed;
  top: 14px;
  right: max(12px, calc(50vw - 228px));
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(242, 223, 168, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(160, 118, 56, 0.25);
  border-radius: 20px;
  padding: 4px 10px;
}

.lang-btn {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--color-text-light);
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 10px;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.lang-btn--active {
  color: var(--color-primary);
  font-weight: 600;
}

.lang-sep {
  color: var(--color-text-light);
  font-size: .7rem;
  opacity: .5;
}
