@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Work+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap");

:root {
  --ink: #1b2422;
  --bottle: #243330;
  --bottle-light: #324541;
  --mustard: #e08f68;
  --mustard-deep: #c36f4e;
  --bone: #f3ece2;
  --bone-dim: #cfc4b5;
  --brick: #a85c42;
  --slate: #869089;
  --radius: 14px;
  --shadow: 0 10px 24px rgba(10, 16, 14, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: "Work Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button, input, textarea {
  font-family: inherit;
}

h1, h2, h3, .eyebrow, .tab-label, .btn {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.02em;
}

/* ---------- App shell ---------- */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bottle);
  border-bottom: 3px solid var(--mustard);
}

.topbar .mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1.5px solid var(--mustard);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  gap: 2px;
}
.topbar .mark .mark-ly {
  font-size: 13px;
  color: var(--bone);
}
.topbar .mark .mark-emba {
  font-size: 6px;
  letter-spacing: 0.08em;
  color: var(--mustard);
}

.topbar h1 {
  font-size: 17px;
  margin: 0;
  color: var(--bone);
  font-weight: 600;
  text-transform: uppercase;
}

.topbar .place {
  margin-left: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--mustard);
  text-transform: uppercase;
}

main {
  flex: 1;
  padding: 18px 16px 90px;
}

.view { display: none; animation: fade .25s ease; }
.view.active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero / paths ---------- */
.hero-title {
  font-size: 24px;
  line-height: 1.25;
  margin: 4px 0 6px;
  color: var(--bone);
  font-weight: 600;
}
.hero-sub {
  color: var(--bone-dim);
  font-size: 14px;
  margin: 0 0 18px;
}

.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 26px;
}

.path-card {
  background: var(--bottle);
  border: 1px solid var(--bottle-light);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--bone);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .15s ease, border-color .15s ease;
}
.path-card:active { transform: scale(0.97); }
.path-card .glyph {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--mustard);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: "Oswald", sans-serif;
  font-size: 15px;
}
.path-card strong {
  font-family: "Oswald", sans-serif;
  font-size: 15px;
  text-transform: uppercase;
}
.path-card span.desc {
  font-size: 12px;
  color: var(--bone-dim);
  font-family: "Work Sans", sans-serif;
  font-weight: 400;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--mustard);
  font-weight: 600;
  margin: 26px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bottle-light);
}

/* ---------- Chapa (signature element): service plate ---------- */
.plate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.plate {
  position: relative;
  background: var(--bottle);
  border: 1.5px solid var(--mustard);
  border-radius: 10px;
  padding: 16px 12px 14px;
  text-align: center;
  transform: rotate(-0.4deg);
}
.plate:nth-child(even) { transform: rotate(0.4deg); }
.plate::before, .plate::after,
.plate .rivet-l, .plate .rivet-r { content: ""; }

.plate .rivet {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--mustard);
}
.plate .rivet.tl { top: 6px; left: 6px; }
.plate .rivet.tr { top: 6px; right: 6px; }
.plate .rivet.bl { bottom: 6px; left: 6px; }
.plate .rivet.br { bottom: 6px; right: 6px; }

.plate .plate-title {
  font-family: "Oswald", sans-serif;
  font-size: 13.5px;
  text-transform: uppercase;
  color: var(--bone);
  margin: 4px 0 2px;
}

.plate .plate-name {
  font-size: 11.5px;
  color: var(--bone-dim);
  margin: 0 0 10px;
}

.plate .plate-btn {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--mustard);
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.03em;
  text-decoration: none;
}

/* ---------- Filas de profesionales dentro de cada categoría ---------- */
.pro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bottle-light);
}
.pro-row:last-child { border-bottom: none; padding-bottom: 2px; }
.pro-row:first-of-type { padding-top: 2px; }

.pro-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pro-info strong {
  font-size: 13px;
  color: var(--bone);
  font-weight: 600;
}
.pro-info span {
  font-size: 11.5px;
  color: var(--bone-dim);
}
.pro-row--empty .pro-info span {
  color: var(--slate);
  font-style: italic;
}

.pro-btn {
  flex-shrink: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--mustard);
  padding: 7px 11px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.pro-btn--outline {
  background: transparent;
  border: 1px solid var(--slate);
  color: var(--bone-dim);
}

/* ---------- Category blocks ---------- */
.cat-block {
  background: var(--bottle);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--bottle-light);
}
.cat-block h3 {
  margin: 0 0 4px;
  font-size: 15px;
  text-transform: uppercase;
  color: var(--mustard);
}
.cat-block .tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--brick);
  background: rgba(181, 80, 46, 0.15);
  border: 1px solid var(--brick);
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: inline-block;
}
.cat-block ul {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cat-block li {
  font-size: 12.5px;
  background: var(--ink);
  border: 1px solid var(--bottle-light);
  color: var(--bone-dim);
  padding: 5px 10px;
  border-radius: 100px;
}

/* ---------- Buscador (vista Servicios) ---------- */
.search-box {
  position: relative;
  margin-bottom: 6px;
}
.search-box input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 10px;
  border: 1px solid var(--bottle-light);
  background: var(--bottle);
  color: var(--bone);
  font-size: 14.5px;
}
.search-box input::placeholder {
  color: var(--slate);
}
.search-box input:focus {
  outline: none;
  border-color: var(--mustard);
}
.search-box .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  opacity: 0.8;
  pointer-events: none;
}
.search-empty {
  font-size: 13px;
  color: var(--slate);
  text-align: center;
  padding: 20px 0;
}

/* ---------- Oficios y tarjetas de profesional (vista Servicios) ---------- */
.oficio-block {
  margin-bottom: 18px;
}
.oficio-block:last-child { margin-bottom: 4px; }
.oficio-block h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--bone-dim);
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.03em;
}

.pro-card {
  background: var(--ink);
  border: 1px solid var(--bottle-light);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.pro-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pro-card-top strong {
  font-size: 13.5px;
  color: var(--bone);
}
.pro-card-rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.rating-avg {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--mustard);
}

.stars-input {
  display: inline-flex;
  gap: 2px;
}
.stars-input .star {
  font-size: 17px;
  color: var(--bottle-light);
  cursor: pointer;
  line-height: 1;
  transition: color .1s ease;
}
.stars-input .star.filled {
  color: var(--mustard);
}
.stars-input .star:active {
  transform: scale(0.9);
}
.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px 16px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--mustard);
  color: var(--ink);
}
.btn-primary:active { background: var(--mustard-deep); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--mustard);
  color: var(--mustard);
}

/* ---------- Form ---------- */
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 6px;
  font-family: "Oswald", sans-serif;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--bottle-light);
  background: var(--ink);
  color: var(--bone);
  font-size: 14px;
}
.field textarea { min-height: 80px; resize: vertical; }

.helper {
  font-size: 12px;
  color: var(--slate);
  margin: 10px 0 16px;
}

/* ---------- Testimonials / FAQ ---------- */
.quote {
  background: var(--bottle);
  border-left: 3px solid var(--mustard);
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--bone-dim);
}
.quote strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--mustard);
  font-family: "Oswald", sans-serif;
}

details.faq {
  background: var(--bottle);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--bottle-light);
}
details.faq summary {
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--bone);
}
details.faq p {
  font-size: 13px;
  color: var(--bone-dim);
  margin: 8px 0 0;
}

/* ---------- Contact block ---------- */
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bottle-light);
  font-size: 13.5px;
}
.contact-row .icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bottle);
  border: 1px solid var(--mustard);
  display: flex; align-items: center; justify-content: center;
  color: var(--mustard);
  font-size: 13px;
  flex-shrink: 0;
}

/* ---------- Bottom tab bar ---------- */
nav.tabbar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bottle);
  border-top: 3px solid var(--mustard);
  display: flex;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
nav.tabbar button {
  flex: 1;
  background: none;
  border: none;
  color: var(--bone-dim);
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
nav.tabbar button .tab-glyph {
  font-size: 16px;
}
nav.tabbar button .tab-label {
  font-size: 10px;
  text-transform: uppercase;
}
nav.tabbar button.active {
  color: var(--mustard);
}

/* ---------- Install banner ---------- */
#install-banner {
  display: none;
  position: fixed;
  top: 62px;
  left: 12px; right: 12px;
  max-width: 456px;
  margin: 0 auto;
  background: var(--mustard);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  z-index: 40;
  box-shadow: var(--shadow);
  font-size: 13px;
  display: none;
  align-items: center;
  gap: 10px;
}
#install-banner.show { display: flex; }
#install-banner button.install-cta {
  margin-left: auto;
  background: var(--ink);
  color: var(--mustard);
  border: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-family: "Oswald", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
}
#install-banner button.dismiss {
  background: none;
  border: none;
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
}

@media (min-width: 481px) {
  #app { border-left: 1px solid var(--bottle-light); border-right: 1px solid var(--bottle-light); }
}
