/* Musvisto identity (03-DISENO/Identidad Musvisto.html); the structure follows the house DESIGN.md. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --canvas: #f6f6f3;
  --surface: #ffffff;
  --ink: #18201f;
  --ink-soft: #56605e;
  --line: #dde0db;
  --accent: #0b5b57;
  --accent-ink: #ffffff;
  --pair-b: #a93b27;
  --stone: #f4f1e8;
  --ok: #0b5b57;
  --warn: #a93b27;
  --focus: #0b5b57;
  --selection: #c3e4e1;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --canvas: #101615;
    --surface: #1a2120;
    --ink: #f2f3ef;
    --ink-soft: #aeb8b5;
    --line: #333c3a;
    --accent: #63cfc6;
    --accent-ink: #06302d;
    --pair-b: #f09380;
    --ok: #63cfc6;
    --warn: #f09380;
    --focus: #63cfc6;
    --selection: #17504c;
  }
}

:root[data-tema="claro"] { color-scheme: light; }

:root[data-tema="oscuro"] {
  color-scheme: dark;
  --canvas: #101615;
  --surface: #1a2120;
  --ink: #f2f3ef;
  --ink-soft: #aeb8b5;
  --line: #333c3a;
  --accent: #63cfc6;
  --accent-ink: #06302d;
  --pair-b: #f09380;
  --ok: #63cfc6;
  --warn: #f09380;
  --focus: #63cfc6;
  --selection: #17504c;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.47 "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  caret-color: var(--accent);
}

::selection { background: var(--selection); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  text-align: center;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 600; }
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }

.lead { margin: auto 0; padding: 48px 0; }

h1 {
  margin: 0 0 12px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(34px, 9vw, 48px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lead p { margin: 0 auto; max-width: 34ch; color: var(--ink-soft); text-wrap: pretty; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.status[data-online="false"]::before { background: var(--warn); }

.actions { display: flex; justify-content: center; margin-top: 24px; }
.actions[hidden] { display: none; }

.button {
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 980px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.button:hover { opacity: 0.88; }

.theme { border: 0; margin: 0; padding: 0; min-width: 0; width: 100%; }
.theme legend { padding: 0; margin: 0 auto 8px; font-size: 14px; color: var(--ink-soft); }

.segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 2px;
  border-radius: 980px;
  background: var(--line);
}

.segments label { position: relative; display: block; cursor: pointer; }
.segments input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }

.segments span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 980px;
  font-size: 14px;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.segments input:checked + span { background: var(--surface); font-weight: 600; }
.segments input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
  .button, .segments span { transition: none; }
}
