/* ==========================================================================
   Ghost Hashed — styles.css
   BEM: bloque__elemento--modificador
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables
   -------------------------------------------------------------------------- */
:root {
  --c-ink:       #1a1a18;
  --c-ink-soft:  #3a3a38;
  --c-muted:     #888780;
  --c-muted-mid: #5a5a58;
  --c-faint:     #e0ddd8;
  --c-bg:        #f5f5f3;
  --c-white:     #ffffff;
  --c-accent:    #378ADD;
  --c-accent-bg: rgba(55,138,221,0.12);
  --c-ok:        #085041;
  --c-ok-bg:     #E1F5EE;
  --c-fail:      #791F1F;
  --c-fail-bg:   #FCEBEB;
  --c-info:      #0C447C;
  --c-info-bg:   #E6F1FB;
  --c-warn:      #633806;
  --c-warn-bg:   #FAEEDA;
  --c-warn-border:#FAC775;
  --c-danger:    #E24B4A;

  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 50px;
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--c-bg);
  color: var(--c-ink);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   3. Layouts
   -------------------------------------------------------------------------- */

/* App — demo centrada verticalmente */
body.layout--app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Page — contenido de ancho máximo (privacidad, developers…) */
body.layout--page {
  padding: 3rem 1rem 5rem;
}

.page-wrap {
  max-width: 720px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   4. Componentes compartidos
   -------------------------------------------------------------------------- */

/* -- btn ------------------------------------------------------------------ */
.btn {
  width: 100%;
  padding: 11px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  background: var(--c-ink);
  color: var(--c-white);
  transition: opacity 0.15s;
  margin-top: 4px;
}
.btn:hover    { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--secondary {
  background: transparent;
  border: 0.5px solid var(--c-faint);
  color: var(--c-ink);
  transition: background 0.15s;
}
.btn--secondary:hover { background: var(--c-bg); opacity: 1; }

/* -- alert --------------------------------------------------------------- */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  display: none;
  line-height: 1.5;
}
.alert--ok   { background: var(--c-ok-bg);   color: var(--c-ok);   display: block; }
.alert--fail { background: var(--c-fail-bg); color: var(--c-fail); display: block; }
.alert--info { background: var(--c-info-bg); color: var(--c-info); display: block; }

/* -- notice -------------------------------------------------------------- */
.notice {
  background: var(--c-ok-bg);
  color: var(--c-ok);
  border-left: 3px solid var(--c-ok);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}
.notice strong { font-weight: 600; }

/* -- field --------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field--no-margin { margin-bottom: 0; }

.field__label {
  display: block;
  font-size: 12px;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.field__input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-md);
  background: var(--c-white);
  color: var(--c-ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field__input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-bg);
}
.field__input--error {
  border-color: var(--c-danger) !important;
  box-shadow: 0 0 0 3px rgba(226,75,74,0.12) !important;
}

.field__hint {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.6;
  margin-top: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

/* -- pwd (campo contraseña) ---------------------------------------------- */
.pwd { position: relative; }

.pwd__input {
  width: 100%;
  padding: 10px 44px 10px 14px;
  font-size: 14px;
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-md);
  background: var(--c-white);
  color: transparent;
  caret-color: var(--c-ink);
  outline: none;
  font-family: monospace;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pwd__input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-bg);
}

.pwd__dots {
  position: absolute;
  top: 0; left: 0; right: 44px; bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 5px;
  pointer-events: none;
  overflow: hidden;
}

.pwd__dot { font-size: 9px; color: var(--c-ink); }

.pwd__eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-muted);
  font-size: 15px;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
}
.pwd__eye:hover        { color: var(--c-ink); }
.pwd__eye--active      { color: var(--c-accent); }

.pwd__clear {
  font-size: 12px;
  color: var(--c-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 4px;
  display: block;
  text-align: right;
  width: 100%;
  transition: color 0.15s;
}
.pwd__clear:hover { color: var(--c-danger); }

/* -- meter --------------------------------------------------------------- */
.meter__bar {
  height: 3px;
  background: var(--c-bg);
  border-radius: 2px;
  overflow: hidden;
  margin: 7px 0 4px;
}
.meter__fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0;
}
.meter__label {
  font-size: 12px;
  color: var(--c-muted);
  margin-bottom: 14px;
  min-height: 16px;
}

/* -- divider ------------------------------------------------------------- */
.divider {
  border: none;
  border-top: 0.5px solid var(--c-faint);
  margin: 2rem 0;
}

/* -- contact-card -------------------------------------------------------- */
.contact-card {
  background: var(--c-white);
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
}
.contact-card p       { font-size: 14px; margin-bottom: 0.5rem; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card__note   { font-size: 13px; color: var(--c-muted); margin-top: 0.75rem; }
.contact-card a       { color: var(--c-accent); text-decoration: none; font-weight: 500; }
.contact-card a:hover { text-decoration: underline; }

/* -- data-table ---------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 1rem 0;
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.data-table th {
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 0.5px solid var(--c-faint);
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--c-faint);
  color: var(--c-ink-soft);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }

/* -- rights-list --------------------------------------------------------- */
.rights-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 1rem 0;
}
.rights-list__item {
  background: var(--c-white);
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--c-ink-soft);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.rights-list__item::before {
  content: '→';
  color: var(--c-accent);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 1px;
}

/* -- back-btn ------------------------------------------------------------ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-ink);
  text-decoration: none;
  background: var(--c-white);
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  transition: background 0.15s;
}
.back-btn:hover { background: var(--c-bg); }

/* --------------------------------------------------------------------------
   5. Demo — bloque card (app centrada)
   -------------------------------------------------------------------------- */
.card {
  background: var(--c-white);
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
}
.card__title { font-size: 22px; font-weight: 500; margin-bottom: 4px; }
.card__sub   { font-size: 13px; color: var(--c-muted); margin-bottom: 1.5rem; }

/* -- tabs ---------------------------------------------------------------- */
.tabs {
  display: flex;
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.tabs__btn {
  flex: 1;
  padding: 9px;
  font-size: 14px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--c-muted);
  transition: all 0.15s;
}
.tabs__btn--active {
  background: var(--c-bg);
  color: var(--c-ink);
  font-weight: 500;
}

/* -- scene --------------------------------------------------------------- */
.scene         { display: none; }
.scene--active { display: block; }

/* -- demo-banner --------------------------------------------------------- */
.demo-banner {
  background: var(--c-warn-bg);
  color: var(--c-warn);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 0.5px solid var(--c-warn-border);
}

/* -- demo-notice --------------------------------------------------------- */
.demo-notice {
  width: 100%;
  max-width: 440px;
  text-align: center;
  padding: 1.25rem 1rem 0.5rem;
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.8;
}
.demo-notice a        { color: var(--c-muted); text-decoration: underline; }
.demo-notice strong   { color: var(--c-muted-mid); }

/* --------------------------------------------------------------------------
   6. Welcome screen
   -------------------------------------------------------------------------- */
.welcome {
  text-align: center;
  padding: 0.5rem 0 1rem;
}
.welcome__icon  { font-size: 32px; margin-bottom: 1rem; display: block; }
.welcome__title { font-size: 18px; font-weight: 500; color: var(--c-ink); margin-bottom: 0.75rem; }
.welcome__text  { font-size: 14px; color: var(--c-muted-mid); line-height: 1.7; margin-bottom: 1rem; text-align: left; }
.welcome__highlight {
  background: var(--c-bg);
  border-left: 3px solid var(--c-ink);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--c-ink);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  text-align: left;
}
.welcome__note {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.6;
  text-align: left;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   7. Success screen
   -------------------------------------------------------------------------- */
.success {
  text-align: center;
  padding: 1.5rem 0;
  animation: fadeInUp 0.4s ease;
}
.success__icon  { font-size: 40px; display: block; margin-bottom: 1rem; }
.success__title { font-size: 20px; font-weight: 500; color: var(--c-ink); margin-bottom: 0.5rem; }
.success__sub   { font-size: 14px; color: var(--c-muted); margin-bottom: 1.5rem; line-height: 1.6; }
.success__badge {
  display: inline-block;
  background: var(--c-ok-bg);
  color: var(--c-ok);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   8. Page layout (privacidad, developers…)
   -------------------------------------------------------------------------- */
.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 0.5px solid var(--c-faint);
}
.page-header__logo {
  text-decoration: none;
  color: var(--c-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 7px;
}
.page-header__meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--c-muted);
  text-align: right;
  line-height: 1.5;
}

.page-hero { margin-bottom: 2.5rem; }
.page-hero__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 6px;
}
.page-hero__title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.page-hero__sub { font-size: 15px; color: var(--c-muted); max-width: 560px; }

.page-section { margin-bottom: 2.5rem; }
.page-section__number {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 6px;
}
.page-section__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: var(--c-ink);
}
.page-section p {
  font-size: 14.5px;
  color: var(--c-ink-soft);
  margin-bottom: 0.85rem;
}
.page-section p:last-child { margin-bottom: 0; }
.page-section a            { color: var(--c-accent); text-decoration: none; }
.page-section a:hover      { text-decoration: underline; }

.page-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--c-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-footer__copy { font-size: 12px; color: var(--c-muted); }

/* --------------------------------------------------------------------------
   9. Globals fijos
   -------------------------------------------------------------------------- */
.lang-btn {
  position: fixed;
  top: 1rem; right: 1rem;
  background: var(--c-white);
  border: 0.5px solid var(--c-faint);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--c-ink);
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.lang-btn:hover { background: var(--c-bg); border-color: var(--c-ink); }

.contact-btn {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  background: var(--c-ink);
  color: var(--c-white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 100;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  text-decoration: none;
}
.contact-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.site-footer {
  font-size: 12px;
  color: var(--c-muted);
  text-align: center;
  padding: 0.5rem 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.site-footer a       { color: var(--c-muted); text-decoration: underline; }
.site-footer a:hover { color: var(--c-ink); }

/* --------------------------------------------------------------------------
   10. Animaciones
   -------------------------------------------------------------------------- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.shake { animation: shake 0.4s ease; }

/* --------------------------------------------------------------------------
   11. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  body.layout--app { padding: 1rem 0.75rem; justify-content: flex-start; padding-top: 1.5rem; }
  .card            { padding: 1.5rem 1.25rem; }
  .field-row       { grid-template-columns: 1fr; gap: 0; }
  .demo-notice     { padding: 1rem 0.75rem 1.5rem; font-size: 11px; }
}
@media (max-width: 600px) {
  body.layout--page  { padding: 2rem 1rem 4rem; }
  .rights-list       { grid-template-columns: 1fr; }
  .page-header       { flex-wrap: wrap; }
  .page-header__meta { margin-left: 0; text-align: left; }
}