/* elmejorcatalogo.com
   Layout: the catalogue as a home screen. An añil hero band holds a phone whose icons are the top 6;
   each app keeps its own icon colour, and that colour tints its ficha. */
:root {
  --bg: #F7F7F3;          /* cal */
  --surface: #FFFFFF;
  --sunk: #EDEDE6;
  --ink: #15183A;
  --muted: #585C77;
  --line: #DCDDE4;
  --accent: #2B3AA0;      /* añil */
  --on-accent: #FFFFFF;
  --band: #1E2A86;
  --on-band: #F7F7F3;
  --on-band-muted: #C8CDF2;
  --frame: #0D0F1F;

  --f-display: "Unbounded", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Spline Sans Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 20px;

  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0D22; --surface: #14173A; --sunk: #10132F; --ink: #ECEDF7; --muted: #A4A8C6; --line: #282C55;
    --accent: #9CA8FF; --on-accent: #0B0D22; --band: #161B4F; --on-band: #ECEDF7; --on-band-muted: #ABB2EA; --frame: #04050D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0D22; --surface: #14173A; --sunk: #10132F; --ink: #ECEDF7; --muted: #A4A8C6; --line: #282C55;
  --accent: #9CA8FF; --on-accent: #0B0D22; --band: #161B4F; --on-band: #ECEDF7; --on-band-muted: #ABB2EA; --frame: #04050D;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.wrap {
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.label {
  margin: 0;
  font-family: var(--f-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--f-display); letter-spacing: -.02em; }
h2 { font-weight: 650; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.12; }
h3 { font-family: var(--f-body); font-weight: 650; font-size: 1.125rem; line-height: 1.3; }
p { margin: 0; }

/* ---------- Header ---------- */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; }
.brand .tld { color: var(--muted); font-weight: 400; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.mark svg { width: 20px; height: 20px; fill: currentColor; }
.nav { display: flex; gap: 6px 20px; flex-wrap: wrap; font-weight: 550; font-size: .9375rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--f-body); font-weight: 650; font-size: 1rem; line-height: 1.2;
  padding: 13px 20px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-light { background: var(--on-band); color: var(--band); }
.btn-ghost { border-color: currentColor; background: transparent; }

/* ---------- App icon ---------- */
.icon {
  width: 56px; aspect-ratio: 1; max-width: 100%; border-radius: 23%; flex: none;
  background: linear-gradient(150deg, var(--app) 0%, var(--app-deep) 100%);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14), 0 1px 2px rgb(0 0 0 / .18);
}
.icon svg { width: 54%; height: 54%; fill: none; stroke: #FFFFFF; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Phone ---------- */
.phone {
  position: relative; width: 272px; max-width: 100%; aspect-ratio: 9 / 18.6;
  border: 9px solid var(--frame); border-radius: 44px; background: var(--frame);
  box-shadow: 0 30px 60px -20px rgb(5 8 30 / .45);
}
.scr { position: absolute; inset: 0; border-radius: 35px; overflow: hidden; display: flex; flex-direction: column; background: #FBFBF8; color: #15183A; font-size: 12px; line-height: 1.4; }
.island { position: absolute; top: 9px; left: 50%; width: 76px; height: 21px; margin-left: -38px; border-radius: 12px; background: #000000; z-index: 2; }
.status { display: flex; justify-content: space-between; align-items: center; padding: 11px 24px 6px; font-weight: 650; font-size: 11.5px; }
.status svg { width: 38px; height: 11px; fill: currentColor; }
.scr-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px 12px; font-family: var(--f-display); font-weight: 600; font-size: 12.5px; color: #FFFFFF; background: var(--app-deep); }
.scr-bar .icon { width: 22px; border-radius: 6px; box-shadow: none; }
.scr-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; flex: 1; min-height: 0; }
.scr-k { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: #5A5F78; }
.scr-big { font-family: var(--f-display); font-weight: 700; font-size: 38px; line-height: 1; letter-spacing: -.02em; }
.scr-big small { font-family: var(--f-body); font-size: 14px; font-weight: 600; letter-spacing: 0; color: #5A5F78; }
.scr-sub { font-size: 12.5px; color: #4A4F68; }
.scr-card { background: #FFFFFF; border: 1px solid #E3E4EB; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.scr-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.scr-row span { color: #5A5F78; }
.scr-pill { align-self: flex-start; font-size: 10.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: #DDF3E5; color: #1D6B3D; }
.scr-bars { display: flex; align-items: flex-end; gap: 5px; height: 76px; }
.scr-bars i { flex: 1; height: var(--h); background: var(--app); border-radius: 5px 5px 2px 2px; }
.scr-bars i.now { background: var(--app-deep); }
.scr-hours { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 9px; color: #5A5F78; }
.scr-wave { display: flex; align-items: center; gap: 2px; height: 56px; }
.scr-wave i { flex: 1; height: var(--h); background: var(--app); border-radius: 2px; }
.scr-strings { display: flex; justify-content: space-between; gap: 4px; }
.scr-strings span { flex: 1; text-align: center; font-size: 10.5px; font-weight: 650; padding: 5px 0; border-radius: 8px; background: #EEEEF3; }
.scr-strings span.on { background: var(--app-deep); color: #FFFFFF; }
.scr-center { align-items: center; text-align: center; }
.scr-sci { font-style: italic; color: #5A5F78; }

/* home screen */
.scr.home {
  color: #FFFFFF;
  background:
    radial-gradient(circle at 72% 80%, #F2AE82 0 46px, rgb(242 174 130 / .35) 47px 70px, transparent 71px),
    linear-gradient(180deg, #2B3AA0 0%, #1B2472 62%, #141A55 100%);
}
.widget { margin: 14px 14px 18px; padding: 12px 14px; border-radius: 18px; background: rgb(255 255 255 / .14); display: flex; flex-direction: column; gap: 2px; }
.widget .scr-k { color: #D3D7F7; }
.widget b { font-family: var(--f-display); font-size: 19px; font-weight: 650; }
.widget span { font-size: 11px; color: #D3D7F7; }
.home-grid { list-style: none; margin: 0; padding: 0 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
.home-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: #FFFFFF; font-size: 10.5px; font-weight: 550; text-align: center; }
.home-grid .icon { width: 58px; transition: transform .2s ease; animation: pop .5s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
.home-grid a:hover .icon, .home-grid a:focus-visible .icon { transform: scale(1.08); }
@keyframes pop { from { transform: scale(.82); } to { transform: scale(1); } }

/* night sky screen */
.scr.night { background: radial-gradient(120% 80% at 50% 0%, #1A1F5C 0%, #0A0C2A 70%); color: #E8EAFF; }
.scr.night .scr-k, .scr.night .scr-row span { color: #A9AEDD; }
.scr.night .scr-card { background: rgb(255 255 255 / .07); border-color: rgb(255 255 255 / .12); }
.sky { width: 100%; height: auto; display: block; }

/* mine screen */
.scr.mine { background: #2A1E16; color: #F3E7DA; }
.scr.mine .scr-k, .scr.mine .scr-row span { color: #CDB8A3; }
.scr.mine .scr-card { background: rgb(255 255 255 / .07); border-color: rgb(255 255 255 / .1); }
.mine-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mine-grid i { aspect-ratio: 1; border-radius: 4px; position: relative; background: #3B2A1E; }
.mine-grid .k-r { background: #8B6B4B; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18); }
.mine-grid .k-d { background: #C49B70; }
.mine-grid .k-g::after { content: ""; position: absolute; inset: 27%; background: #67B0FF; transform: rotate(45deg); border-radius: 2px; box-shadow: 0 0 8px #67B0FF; }
.mine-grid .k-m::after { content: ""; position: absolute; inset: 18%; background: #F2B33D; border-radius: 50% 50% 40% 40%; box-shadow: inset 0 4px 0 #FFFFFF; }
.mine-grid .k-x { background: #15183A; box-shadow: inset 0 0 0 2px #F2B33D; }

/* ---------- Home hero ---------- */
.hero { background: var(--band); color: var(--on-band); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px 56px; padding-top: clamp(40px, 6vw, 72px); }
.hero-copy { display: flex; flex-direction: column; gap: 22px; padding-bottom: clamp(40px, 6vw, 72px); min-width: 0; align-self: center; }
.hero .label { color: var(--on-band-muted); }
.hero h1 { font-weight: 700; font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.08; }
.hero .lead { font-size: 1.1875rem; line-height: 1.55; color: var(--on-band-muted); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { font-family: var(--f-mono); font-size: .8125rem; color: var(--on-band-muted); }
.hero-visual { height: 470px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; align-self: end; min-width: 0; }

/* ---------- Section heads ---------- */
.section { padding-block: clamp(48px, 7vw, 88px) 0; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; max-width: 44rem; }
.section-head p:not(.label) { color: var(--muted); font-size: 1.0625rem; }

/* ---------- Top 6 grid ---------- */
.grid6 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app-card {
  height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; transition: border-color .15s ease, transform .15s ease;
}
.app-card:hover { border-color: var(--app); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rank { font-family: var(--f-mono); font-size: .8125rem; font-weight: 500; padding: 4px 11px; border-radius: 999px; background: var(--app-deep); color: #FFFFFF; white-space: nowrap; }
.need { font-size: .9375rem; color: var(--muted); }
.card-name { font-family: var(--f-display); font-weight: 650; font-size: 1.3rem; line-height: 1.15; letter-spacing: -.015em; }
.card-cat { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card-lema { flex: 1; }
.card-go { font-weight: 650; color: var(--accent); }
.app-card:hover .card-go { text-decoration: underline; text-underline-offset: 4px; }
.fine { margin-top: 18px; font-size: .9375rem; color: var(--muted); }

/* ---------- Criteria ---------- */
.criteria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 40px; }
.criteria > div { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; border-top: 2px solid var(--ink); min-width: 0; }
.criteria p { color: var(--muted); }

/* ---------- Business ---------- */
.business { margin-top: clamp(48px, 7vw, 88px); background: var(--sunk); border-top: 1px solid var(--line); }
.business .wrap { padding-block: clamp(44px, 6vw, 72px); }
.mailboxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mailbox { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.mailbox p { color: var(--muted); font-size: 1rem; }
.mail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.email { font-family: var(--f-mono); font-size: .9375rem; font-weight: 500; color: var(--accent); overflow-wrap: anywhere; }
.copy { font: 600 .875rem var(--f-body); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.copy:hover { border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { padding-block: 44px 30px; display: flex; flex-direction: column; gap: 28px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px 32px; }
.foot-grid > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.foot-grid p { color: var(--muted); font-size: .9375rem; max-width: 40ch; }
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .9375rem; }
.foot-list a { text-decoration: none; overflow-wrap: anywhere; }
.foot-list a:hover { text-decoration: underline; }
.foot-list .n { font-family: var(--f-mono); font-size: .8125rem; color: var(--muted); margin-right: 8px; }
.legal { padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }

/* ---------- App page ---------- */
.has-app { --tint: color-mix(in srgb, var(--app) 15%, var(--bg)); }
.app-hero { background: var(--tint); overflow: hidden; border-bottom: 1px solid var(--line); }
.app-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 48px; padding-top: 24px; }
.app-intro { display: flex; flex-direction: column; gap: 18px; padding-bottom: clamp(36px, 5vw, 60px); min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: .875rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.app-id { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.app-id .icon { width: 92px; }
.app-id > div { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
h1.app-name { font-weight: 700; font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.02; overflow-wrap: anywhere; }
.app-lema { font-size: 1.3rem; line-height: 1.45; max-width: 30em; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: .875rem; font-weight: 550; padding: 5px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.store-note { font-size: .875rem; color: var(--muted); }
.app-visual { height: 460px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; align-self: end; padding-top: 12px; min-width: 0; }

.app-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 40px 64px; padding-block: 48px 56px; }
.app-body article { display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.app-body article > section { display: flex; flex-direction: column; gap: 16px; }
.app-body article h2 { font-size: 1.45rem; }
.prose { font-size: 1.125rem; max-width: 62ch; }
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.feat { display: flex; flex-direction: column; gap: 4px; padding-block: 16px; border-top: 1px solid var(--line); min-width: 0; }
.feat p { color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.step-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 650; font-size: .9375rem; background: var(--app-deep); color: #FFFFFF; }
.steps p { color: var(--muted); font-size: 1rem; }
.perms { margin: 0; display: flex; flex-direction: column; }
.perms div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 4px 20px; padding-block: 13px; border-top: 1px solid var(--line); }
.perms div:last-child { border-bottom: 1px solid var(--line); }
.perms dt { font-weight: 650; }
.perms dd { margin: 0; color: var(--muted); }
.tip { padding: 20px 22px; border-radius: var(--r); background: var(--tint); border: 1px solid var(--line); gap: 8px !important; }
.tip p:last-child { max-width: 62ch; }

.side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.box { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.box h2 { font-family: var(--f-body); font-weight: 650; font-size: 1.0625rem; letter-spacing: 0; }
.spec { margin: 0; display: flex; flex-direction: column; }
.spec div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding-block: 9px; border-top: 1px solid var(--line); }
.spec dt { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); flex: none; }
.spec dd { margin: 0; text-align: right; font-weight: 600; font-size: .9375rem; min-width: 0; }
.box p { font-size: .9375rem; color: var(--muted); }
.box .email { font-size: .875rem; }

.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: border-color .15s ease; min-width: 0; }
.pager a:hover { border-color: var(--ink); }
.pager .next { align-items: flex-end; text-align: right; }
.pager b { font-family: var(--f-display); font-weight: 650; font-size: 1.125rem; }

.dock-wrap { padding-block: 40px 64px; display: flex; flex-direction: column; gap: 16px; }
.dock { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; background: var(--sunk); border: 1px solid var(--line); border-radius: 28px; }
.dock a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px; border-radius: 18px; text-decoration: none; font-size: .875rem; font-weight: 600; text-align: center; }
.dock a:hover { background: var(--surface); }
.dock a[aria-current="page"] { background: var(--surface); box-shadow: inset 0 0 0 2px var(--app); }
.dock .icon { width: 52px; }
.dock small { display: block; font-family: var(--f-mono); font-size: .6875rem; font-weight: 400; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .app-hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-copy, .app-intro { padding-bottom: 0; }
  .hero-visual { height: 400px; }
  .app-visual { height: 380px; }
  .grid6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .criteria { grid-template-columns: minmax(0, 1fr); }
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .dock { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .grid6, .mailboxes, .feats, .steps { grid-template-columns: minmax(0, 1fr); }
  .feats { gap: 0; }
  .perms div { grid-template-columns: minmax(0, 1fr); }
  .app-id .icon { width: 72px; }
  .app-lema { font-size: 1.1875rem; }
  .hero-visual, .app-visual { height: 360px; }
  .phone { width: 248px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .pager b { font-size: 1rem; }
}
