@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #eef0ea;
  --sheet: #f7f8f3;
  --ink: #151713;
  --muted: #5f665d;
  --line: #ced2c7;
  --accent: #c7380f;
  --accent-wash: #f9e4dc;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--sheet); }

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

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 40px 44px;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--sheet);
  font-family: var(--mono);
  font-size: 12px;
  transform: translateY(-180%);
}

.skip:focus { transform: none; }

/* Cabecera */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 44px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .015em;
  text-transform: uppercase;
}

.brand img { display: block; }

.head-status {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--mono);
  font-size: 12px;
}

.live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.live i {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}

.clock {
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* Vista general */

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
  padding: 46px 0 44px;
  border-bottom: 1px solid var(--line);
  animation: rise .6s cubic-bezier(.22, 1, .36, 1) both;
}

.overview-progress { padding-right: 56px; }

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.label {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.stamp {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.hero-value {
  margin: 20px 0 24px;
  font-size: clamp(104px, 14vw, 178px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.075em;
  line-height: .76;
}

.ticks {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.ticks span {
  flex: 1 1 0;
  height: 6px;
  background: var(--line);
  transition: height .5s cubic-bezier(.22, 1, .36, 1), background-color .5s ease;
}

.ticks span.on {
  height: 18px;
  background: var(--accent);
}

.ledger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding-left: 48px;
  border-left: 1px solid var(--line);
}

.ledger > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
}

.ledger > div + div { border-top: 1px solid var(--line); }

.ledger dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .02em;
}

.ledger dd {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
}

.ledger .usage dd { color: var(--accent); }

/* Secciones */

.grid-main,
.grid-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
}

.grid-main {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  animation: rise .6s .08s cubic-bezier(.22, 1, .36, 1) both;
}

.grid-lower {
  padding: 44px 0 0;
  animation: rise .6s .16s cubic-bezier(.22, 1, .36, 1) both;
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}

.block h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.opt {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.opt-value {
  margin: 0;
  font-size: clamp(58px, 7vw, 88px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.065em;
  line-height: .8;
}

.opt-sub {
  max-width: 18ch;
  margin: 0 0 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  text-align: right;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 38px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.metrics dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.metrics dd {
  margin: 6px 0 0;
  font-size: 25px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

.phases {
  display: flex;
  flex-direction: column;
  gap: 27px;
}

.phase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 9px;
  font-size: 13px;
}

.phase-head b {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 8px;
  background: #dde1d6;
  overflow: hidden;
}

.bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ink);
  transition: width .8s cubic-bezier(.22, 1, .36, 1);
}

/* Hitos y registro */

.milestones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.milestones li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.35;
}

.milestones li::before {
  display: grid;
  flex: 0 0 14px;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 1px solid var(--muted);
  content: "";
}

.milestones li.done { color: var(--muted); }

.milestones li.done::before {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--sheet);
  content: "✓";
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
}

.milestones li.empty::before { content: none; }

.milestones li.empty,
.log li.empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
}

.log li.empty { display: block; }

.log {
  margin: 0;
  padding: 0;
  list-style: none;
}

.log li {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.4;
}

.log time {
  padding-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
}

/* Pie y estados */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.foot .source { text-transform: none; letter-spacing: .04em; }

.error {
  margin: 32px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--accent);
  background: var(--accent-wash);
  color: #5c1c0b;
  font-family: var(--mono);
  font-size: 12px;
}

.error[hidden] { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (max-width: 960px) {
  .shell { padding: 24px 28px 40px; }

  .overview { grid-template-columns: 1fr; padding: 40px 0; }

  .overview-progress { padding-right: 0; }

  .ledger {
    margin-top: 34px;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .grid-main,
  .grid-lower { grid-template-columns: 1fr; gap: 42px; }

  .grid-lower { padding-bottom: 0; }
}

@media (max-width: 640px) {
  .shell { padding: 18px 18px 32px; }

  .site-head { flex-wrap: wrap; gap: 12px; }

  .head-status { gap: 16px; }

  .hero-value { font-size: clamp(76px, 27vw, 122px); }

  .ticks { gap: 2px; }

  .opt { flex-direction: column; align-items: flex-start; gap: 12px; }

  .opt-sub { text-align: left; }

  .metrics { grid-template-columns: 1fr 1fr; gap: 18px 24px; }

  .milestones { grid-template-columns: 1fr; }

  .foot { flex-direction: column; gap: 6px; }
}

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