/*
 * Befora hosted profile — befora.pro/{slug}
 *
 * This page IS branded: it wears the PRO's own colors (from the payload
 * `colors{primary,accent}`) and logo. Befora's own identity is limited to the
 * subtle "Powered by Befora" badge.
 *
 * Foundation follows the Befora design language (see docs/brand/
 * explorations.html): paper/off-white page, white cards with hairlines,
 * 20px/12px radii, Instrument Sans, letterspaced-caps tags. The PRO's colors
 * do the accenting via --pro-primary / --pro-accent (set at runtime); the
 * fallbacks below are Befora-neutral so an unbranded pro still looks sharp.
 */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --pro-primary: #111214;   /* fallback: Befora text ink */
  --pro-accent: #B57718;    /* fallback: brass-deep */
  --ink: #111214;
  --muted: #6E7278;
  --graphite: #8A8F98;
  --line: #E7E8EA;
  --bg: #FAFAFA;
  --card-bg: #FFFFFF;
  --radius-card: 20px;
  --radius-ctrl: 12px;
  --maxw: 760px;
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.15rem 3rem;
}

/* ---- top bar: EN/ES toggle -------------------------------------------- */
.topbar {
  display: flex;
  justify-content: flex-end;
  padding-top: .25rem;
}
.lang-toggle {
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .9rem;
  transition: border-color .15s, color .15s;
}
.lang-toggle:hover { border-color: var(--pro-accent); color: var(--pro-accent); }

/* ---- profile header --------------------------------------------------- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .85rem;
  padding: 1.75rem 0 2rem;
}
.logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
  background: #F1F1F2;
}
.logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff;
  background: var(--pro-primary);
}
.business-name {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--pro-primary);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.bio {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1rem;
}

/* ---- contact / social links ------------------------------------------ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: .35rem;
}
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--pro-primary);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .45rem .95rem;
  transition: border-color .15s;
}
.link-chip:hover { border-color: var(--pro-accent); }
.link-chip .ico { font-size: .95em; line-height: 1; }

/* ---- search + category filter ------------------------------------------ */
.filters {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.1rem;
}
.search-input {
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
  padding: .6rem .9rem;
  width: 100%;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.search-input:focus { border-color: var(--pro-accent); }
.search-input::placeholder { color: var(--graphite); }
.cat-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cat-chip {
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .85rem;
  transition: border-color .15s, color .15s;
}
.cat-chip:hover { color: var(--ink); }
.cat-chip.active { color: var(--pro-accent); border-color: var(--pro-accent); }

/* ---- job cards -------------------------------------------------------- */
.cards { display: flex; flex-direction: column; gap: 1.25rem; }
.feat-badge {
  margin: 0;
  align-self: flex-start;
  font-size: .6rem;
  letter-spacing: .12em;
  font-weight: 500;
  color: #fff;
  background: var(--pro-accent);
  padding: .35em .9em;
  border-radius: 6px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.4rem 1.5rem;
}
.eyebrow {
  margin: 0;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--pro-accent);
}
.card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--ink);
}
.card-loc { font-weight: 400; color: var(--muted); }

/* ---- pair: side-by-side (default view) -------------------------------- */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.pair figure { position: relative; margin: 0; }
.pair img {
  width: 100%;
  display: block;
  border-radius: var(--radius-ctrl);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #EFEFF0;
}
.tag {
  position: absolute;
  left: .6rem;
  top: .6rem;
  font-size: .6rem;
  letter-spacing: .1em;
  font-weight: 500;
  color: #F5F6F7;
  background: rgba(14, 15, 17, .58);
  padding: .3em .8em;
  border-radius: 6px;
}

/* ---- pair: slider view ------------------------------------------------- */
.ba-mini {
  position: relative;
  border-radius: var(--radius-ctrl);
  overflow: hidden;
  aspect-ratio: 8 / 3;      /* two 4:3 frames side-by-side = same footprint */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: #EFEFF0;
}
.ba-mini img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-mini .ba-after { clip-path: inset(0 0 0 50%); }
.ba-mini .tag-after { left: auto; right: .6rem; }
.ba-seam {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 3px;
  background: var(--pro-accent);
  transform: translateX(-50%);
  pointer-events: none;
}
.ba-knob {
  position: absolute;
  top: 50%; left: 50%;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pro-accent);
  color: #fff;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  letter-spacing: .05em;
  pointer-events: none;
}
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

/* ---- pair footer: label + view toggle ---------------------------------- */
.pair-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: -.1rem;
}
.pair-label { margin: 0; font-size: .78rem; color: var(--muted); }
.view-toggle {
  font: inherit;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .25rem .8rem;
  margin-left: auto;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.view-toggle:hover { border-color: var(--pro-accent); color: var(--pro-accent); }

.quote {
  margin: .3rem 0 0;
  padding: .1rem 0 .1rem 1rem;
  border-left: 3px solid var(--pro-accent);
  font-style: italic;
  color: var(--ink);
}
.quote p { margin: 0; }
.quote cite { display: block; margin-top: .4rem; font-style: normal; font-size: .85rem; color: var(--muted); }

/* ---- powered-by badge + footer --------------------------------------- */
.powered {
  margin-top: 2.5rem;
  text-align: center;
}
.powered a {
  font-size: .8rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.powered a:hover { color: #B57718; } /* the one Befora-brass moment on the page */

/* ---- states ----------------------------------------------------------- */
.state {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .6rem;
  color: var(--muted);
}
.state h1 { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.state p { margin: 0; max-width: 38ch; }
.state .home { margin-top: 1rem; font-size: .85rem; color: var(--pro-accent); text-decoration: none; }
.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--pro-accent);
  border-radius: 50%;
  animation: befora-spin .8s linear infinite;
}
@keyframes befora-spin { to { transform: rotate(360deg); } }

/* ---- responsive ------------------------------------------------------- */
@media (max-width: 440px) {
  .pair { grid-template-columns: 1fr; }
  .ba-mini { aspect-ratio: 4 / 3; }
  .business-name { font-size: 1.45rem; }
  .card { padding: 1rem 1rem 1.1rem; }
}
