/* Mis Ratos · sistema de diseño compartido por la web y la app */
@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("/static/fonts/lexend-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("/static/fonts/lexend-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("/static/fonts/lexend-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }

:root {
  --cream: #FBF5EC;
  --cream-2: #F5EBDD;
  --paper: #FFFDF9;
  --line: #EADFCF;
  --line-2: #DDCDB7;
  --ink: #2A2238;
  --ink-2: #4A4158;
  --ink-3: #776E84;
  --coral: #E2603F;
  --coral-2: #C9492B;
  --coral-soft: #FCE3D9;
  --sun: #F2B33D;
  --sun-soft: #FDF0D2;
  --sage: #4E9A72;
  --sage-2: #3B7F5C;
  --sage-soft: #DDF0E4;
  --sky: #4F82B3;
  --sky-soft: #DFEAF5;
  --plum: #7A4B8C;
  --plum-soft: #EDE1F2;
  --shadow-sm: 0 1px 2px rgba(58, 38, 20, .06), 0 2px 8px rgba(58, 38, 20, .05);
  --shadow: 0 2px 4px rgba(58, 38, 20, .05), 0 12px 32px -8px rgba(58, 38, 20, .16);
  --shadow-lg: 0 4px 8px rgba(58, 38, 20, .05), 0 30px 60px -20px rgba(58, 38, 20, .30);
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --text: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink); font-family: var(--text); font-size: 18px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "kern", "liga";
}
img, svg { display: block; max-width: 100%; }
a { color: var(--coral-2); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--coral); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 560; letter-spacing: -.015em; line-height: 1.12; margin: 0 0 .4em; font-variation-settings: "SOFT" 60, "WONK" 0; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
em.accent { font-style: italic; color: var(--coral); font-weight: 500; }
::selection { background: var(--sun-soft); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Botones */
.btn {
  --bg: var(--coral); --fg: #fff; --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 52px; padding: 0 1.45em;
  border-radius: 999px; border: 2px solid var(--bd); background: var(--bg); color: var(--fg); font: 700 1.02rem/1 var(--text);
  text-decoration: none; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px -6px color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-tap-highlight-color: transparent; user-select: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); color: var(--fg); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 22px -8px color-mix(in srgb, var(--bg) 80%, transparent); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn.ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--paper); }
.btn.soft { --bg: var(--coral-soft); --fg: var(--coral-2); box-shadow: none; }
.btn.dark { --bg: var(--ink); }
.btn.sage { --bg: var(--sage); }
.btn.big { min-height: 64px; font-size: 1.18rem; padding: 0 1.9em; }
.btn.small { min-height: 40px; font-size: .92rem; padding: 0 1.05em; }
.btn.block { display: flex; width: 100%; }
.btn .i { width: 1.2em; height: 1.2em; }
.link-btn { background: none; border: 0; padding: 0; color: var(--coral-2); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Formularios */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > span, .label { font-weight: 700; font-size: .95rem; color: var(--ink-2); }
.field small, .help { color: var(--ink-3); font-size: .88rem; line-height: 1.4; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; min-height: 54px; padding: 13px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper);
  color: var(--ink); font: 400 1.05rem/1.4 var(--text); transition: border-color .15s, box-shadow .15s; appearance: none;
}
textarea { min-height: 120px; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1.5l6 6 6-6' stroke='%23776E84' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--coral); flex: none; margin-top: 1px; }

/* Utilidades */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; background: var(--sun-soft); color: #8A5B07; font-weight: 700; font-size: .85rem; }
.pill.sage { background: var(--sage-soft); color: var(--sage-2); }
.pill.sky { background: var(--sky-soft); color: #2D5C87; }
.pill.plum { background: var(--plum-soft); color: var(--plum); }
.pill.coral { background: var(--coral-soft); color: var(--coral-2); }
.muted { color: var(--ink-3); }
.eyebrow { display: inline-block; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; color: var(--coral-2); margin-bottom: 14px; }
.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; line-height: 1; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 650; font-size: 1.45rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 38px; height: 38px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
