/* Houston_ — site styles */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin-400-normal.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 Serif";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url("fonts/instrument-sans-latin-standard-normal.woff2") format("woff2-variations");
  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-stretch: 75% 100%; font-display: swap;
  src: url("fonts/instrument-sans-latin-ext-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #141414;        /* casi negro: fondo */
  --ink-raised: #1C1C1A; /* superficies elevadas */
  --rule: #2C2B28;       /* líneas y bordes */
  --paper: #ECEAE4;      /* blanco roto: texto principal */
  --mute: #9A968D;       /* texto secundario */
  --brass: #B89A5E;      /* acento, solo para el cursor y poco más */
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 90%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--brass); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--paper); color: var(--ink); padding: .5rem .9rem; z-index: 10; }
.skip:focus { top: 1rem; }

.wrap { padding-inline: var(--gutter); max-width: 84rem; margin-inline: auto; }

/* Top bar */
.top { display: flex; justify-content: space-between; align-items: center; padding-block: 1.75rem; }
.logo { display: inline-block; line-height: 0; }
.logo img { height: 1.9rem; width: auto; }
.lang { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--rule); border-radius: 3px; font-size: .8125rem; font-weight: 500; line-height: 1; color: var(--mute); text-decoration: none; }
.lang > * { padding: .4rem .6rem; border-radius: 2px; color: var(--mute); text-decoration: none; }
.lang > a:hover { color: var(--paper); }
.lang > [aria-current] { background: var(--paper); color: var(--ink); }
a.lang { padding: .45rem .7rem; }
a.lang:hover { color: var(--paper); }

/* ---------- Hero: the question, then the field ---------- */
.hero { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.ask { align-self: center; padding-block: 3rem; }
.ask form { max-width: 60rem; }
.question {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.9rem, 8.2vw, 7.5rem);
  line-height: 1.02; letter-spacing: -0.015em;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}
.question .prompt-text::after { content: "\200B"; }

.field {
  position: relative;
  background: #232321;
  border: 1px solid #3A3936;
  border-radius: 3px;
  padding: 1.1rem 1.35rem;
  cursor: text;
  transition: border-color .2s ease, background-color .2s ease;
}
.field:hover { border-color: #55534E; }
.field:focus-within { border-color: var(--brass); background: #262624; }
.field textarea {
  display: block; width: 100%;
  margin: 0; padding: 0; border: 0; outline: none; resize: none; overflow: hidden;
  background: transparent; color: var(--paper);
  font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.25;
  caret-color: var(--brass);
  min-height: 1.25em;
}
.field textarea:placeholder-shown { caret-color: transparent; }
.field textarea::placeholder { color: transparent; }
.field .hint {
  position: absolute; left: 1.35rem; top: 1.1rem; right: 1.35rem;
  pointer-events: none;
  font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.25;
  color: #7D7A73;
}
.field .hint .cursor { margin-left: 0; }
.field textarea:not(:placeholder-shown) + .hint { display: none; }
.cursor {
  display: inline-block;
  width: .42em; height: .06em; min-height: 2px;
  margin-left: .08em;
  background: var(--brass);
  vertical-align: baseline;
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.ask .lede { max-width: var(--measure); margin: 2rem 0 0; color: var(--mute); }
.print-only { display: none; }
.alt { font-size: .875rem; color: var(--mute); margin: .9rem 0 0; }
.open .alt, .has-text .alt { display: none; }
.alt a { color: var(--paper); }
.alt a:hover { color: var(--brass); }
.ask .lede strong { color: var(--paper); font-weight: 500; }

.reply { display: none; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.1rem; }
.open .reply, .has-text .reply { display: flex; animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(.4rem); } to { opacity: 1; transform: none; } }
.reply > div { flex: 0 1 31rem; min-width: 0; display: flex; align-items: baseline; gap: .9rem; }
.reply label { font-size: .875rem; color: var(--mute); white-space: nowrap; }
.reply input {
  flex: 1; min-width: 8rem; background: transparent; color: var(--paper);
  border: 0; border-bottom: 1px solid var(--mute); border-radius: 0;
  padding: .4rem 0; font: inherit; font-size: 1rem;
}
.reply input:focus { outline: none; border-bottom-color: var(--brass); }
.reply input::placeholder { color: #5E5B55; }
button, .button {
  appearance: none; cursor: pointer;
  font: inherit; font-size: .9375rem; font-weight: 500;
  color: var(--ink); background: var(--paper);
  border: 0; border-radius: 2px; padding: .55rem 1.05rem;
  text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--brass); color: var(--ink); }
button[disabled] { opacity: .5; cursor: progress; }
.fine { font-size: .8125rem; color: var(--mute); margin: 0; flex-basis: 100%; display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.reply .fine { justify-content: flex-start; white-space: normal; }
.reply .fine input { flex: 0 0 1rem; min-width: 0; width: 1rem; height: 1rem; margin: 0; padding: 0; border: 0; accent-color: var(--brass); cursor: pointer; }
.status { min-height: 1.6em; margin-top: 1.25rem; font-size: 1rem; }
.status.ok { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.25rem); color: var(--paper); line-height: 1.2; }
.status.err { color: #E0A27A; }
.sent .reply, .sent .alt { display: none; }
.sent .field { border-color: #3A3936; background: transparent; }
.sent .field textarea { color: var(--mute); }

.hero-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.5rem 2rem; font-size: .875rem; color: var(--mute);
}
.scroll-cue { display: inline-flex; align-items: center; gap: .6rem; color: var(--paper); text-decoration: none; font-size: 1rem; }
.scroll-cue svg { width: .8rem; height: 1.1rem; animation: bob 1.8s ease-in-out infinite; }
.scroll-cue:hover { color: var(--brass); }
@keyframes bob { 0%, 100% { transform: translateY(-.2rem); } 50% { transform: translateY(.25rem); } }

/* ---------- Sections: one system for the whole page ----------
   Title on the left (stays in view while you read on desktop),
   content on the right. Every section is separated by a rule. */
.block { border-top: 1px solid var(--rule); padding-block: clamp(4.5rem, 9vw, 8rem); }
.block-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: start; }
.block-head { position: sticky; top: 2rem; }
.block-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.8rem, 6vw, 5.25rem);
  line-height: .98; letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
}
.block-head h2 em { display: block; font-size: .42em; color: var(--mute); margin-top: .6rem; letter-spacing: 0; }
.block-head p { margin: 0; max-width: 24rem; color: var(--mute); }
.block-body > :first-child { margin-top: 0; }

/* What we solve: the four problems sit inside the section, one level down */
.problem { padding-block: 0 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--rule); }
.problem h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; letter-spacing: -0.01em;
  margin: 0 0 .4rem;
}
.problem .tag { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 1.6vw, 1.4rem); line-height: 1.3; color: var(--mute); margin: 0 0 1.4rem; }
.problem .symptom { margin: 0 0 .8rem; }
.problem p { margin: 0; max-width: var(--measure); color: var(--mute); }
.problem:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.problem.plain h3 { margin-bottom: .9rem; }

/* How */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem clamp(2rem, 4vw, 3.5rem); }
.principles h3 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.1; margin: 0 0 .6rem; }
.principles p { margin: 0; color: var(--mute); }

/* Where */
.contexts { list-style: none; padding: 0; margin: 0; }
.contexts li { padding: 1rem 0; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: clamp(1.3rem, 1.9vw, 1.6rem); line-height: 1.3; }
.contexts li:last-child { border-bottom: 1px solid var(--rule); }

/* Who */
.who-body p { margin: 0 0 1.1rem; max-width: var(--measure); font-size: 1.125rem; }

/* Close */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.ways div { border-top: 1px solid var(--rule); padding-top: 1rem; }
.ways h3 { font-size: .875rem; font-weight: 500; color: var(--mute); margin: 0 0 .35rem; }
.ways p { margin: 0; font-size: 1.125rem; }
.block.close { background: var(--paper); color: var(--ink); border-top: 0; padding-block: clamp(3rem, 5vw, 4.5rem); }
.close ::selection { background: var(--ink); color: var(--paper); }
.close .block-head { position: static; }
.close .block-head h2 { font-size: clamp(2rem, 3.2vw, 2.75rem); margin-bottom: .8rem; }
.close .block-head p, .close .ways h3 { color: #5C5A55; }
.close .ways div { border-top-color: #CFCCC3; }
.close a:hover { color: #7A6230; }
.close + .foot { border-top: 0; }
.block.who { padding-block: clamp(3rem, 5vw, 4.5rem); }
.who .block-head { position: static; }
.who .block-head h2 { font-size: clamp(2rem, 3.2vw, 2.75rem); margin: 0; }
.who .block-head h2 em { font-size: .55em; margin-top: .35rem; }
.who-body p { font-size: 1.0625rem; color: var(--mute); }
.who-body a { color: var(--paper); }
.who-body p:last-child { margin-bottom: 0; }

/* Standby: after a while with no activity the page dims to a waiting cursor. */
.standby { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center start; padding-inline: var(--gutter); background: rgba(8, 8, 8, .955); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 1.2s ease, visibility 0s 1.2s; }
.standby.on { opacity: 1; visibility: visible; transition: opacity 1.2s ease; }
.standby .cursor { width: clamp(6rem, 16vw, 14rem); height: clamp(.5rem, 1.3vw, 1.1rem); margin: 0; }

/* Footer */
.foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem;
  padding-block: .9rem; border-top: 1px solid var(--rule);
  font-size: .8125rem; color: var(--mute);
}
.foot nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.foot a { color: var(--mute); }
.foot a:hover { color: var(--paper); }
.foot .logo img { height: 1.25rem; }
.foot .lang { font-size: .75rem; }
.foot .lang > * { padding: .3rem .5rem; }
.foot .lang > [aria-current] { color: var(--ink); }

/* Legal pages */
.legal { max-width: 44rem; padding-block: 3rem 6rem; }
.back { display: inline-flex; align-items: center; gap: .6rem; color: var(--paper); text-decoration: none; font-size: 1rem; }
.back svg { width: 1.1rem; height: .8rem; animation: nudge 1.8s ease-in-out infinite; }
.back:hover { color: var(--brass); }
@keyframes nudge { 0%, 100% { transform: translateX(.2rem); } 50% { transform: translateX(-.25rem); } }
.back-end { margin: 3.5rem 0 0; }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1.05; margin: 2rem 0 1rem; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; margin: 2.75rem 0 .75rem; }
.legal p, .legal li { color: #CFCCC4; }
.legal dl { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem 1.5rem; margin: 1.5rem 0; }
.legal dt { color: var(--mute); }
.legal dd { margin: 0; }
.legal .updated { color: var(--mute); font-size: .875rem; }
.todo { background: #3A2F1B; color: #F0D9A8; padding: 0 .3em; border-radius: 2px; }

/* 404 */
.lost { font-family: var(--serif); font-weight: 400; font-size: clamp(2.9rem, 8.2vw, 7.5rem); line-height: 1.02; letter-spacing: -0.015em; margin: 0; }

@media (max-width: 860px) {
  .block-grid, .principles, .ways { grid-template-columns: 1fr; }
  .block-head { position: static; }
  .reply > div { flex-basis: 100%; flex-wrap: wrap; gap: .3rem .9rem; }
  .reply input { flex-basis: 100%; }
  .legal dl { grid-template-columns: 1fr; gap: .1rem; }
  .legal dd { margin-bottom: .8rem; }
  .logo img { height: 1.6rem; }
  .hero { min-height: 92svh; }
  .ask { align-self: start; padding-top: 8svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .scroll-cue svg, .back svg { animation: none; }
  .open .reply, .has-text .reply { animation: none; }
}

/* ---------- Print: the site becomes a one-page confidential memo ---------- */
@page { size: A4; margin: 0; }
@media print {
  html { font-size: 9.5pt; }
  body { box-sizing: border-box; min-height: 297mm; padding: 15mm 16mm; background: #ECEAE4; color: #141414; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-stretch: 90%; }
  .hero, .standby, .skip, .foot, .screen-only, .lang { display: none !important; }
  .print-only { display: block; }
  .wrap { padding-inline: 0; max-width: none; }
  .print-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 5mm; border-bottom: 1px solid #141414; }
  .print-head img { height: 9mm; width: auto; }
  .print-head span { font-size: 9pt; letter-spacing: .02em; }
  .block { border-top: 0; padding-block: 7mm 0; break-inside: avoid; background: none !important; color: #141414 !important; }
  .block-grid { display: block; }
  .block-head { position: static; margin-bottom: 5mm; }
  .block-head h2 { font-size: 26pt; margin: 0 0 2mm; }
  .block-head p { max-width: 120mm; color: #45433F; }
  #solve .block-body { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm 10mm; }
  .problem { padding: 3mm 0 0; margin: 0; border-bottom: 0; border-top: 1px solid #BDBAB1; break-inside: avoid; }
  .problem h3 { font-size: 17pt; margin: 0 0 .5mm; }
  .problem .tag { font-size: 10.5pt; margin: 0 0 2mm; color: #45433F; }
  .problem p { color: #2A2927; max-width: none; }
  .problem .symptom { margin-bottom: 1.5mm; }
  .block.who { padding-top: 8mm; }
  .who .block-head { margin-bottom: 2mm; }
  .who .block-head h2, .close .block-head h2 { font-size: 15pt; }
  .who .block-head h2 em { display: inline; font-size: .7em; margin-left: 2mm; color: #45433F; }
  .who-body p { color: #2A2927; max-width: 150mm; margin: 0; font-size: inherit; }
  .who-body p:last-child { display: none; }
  .block.close { padding-top: 8mm; }
  .close .block-head { margin-bottom: 3mm; }
  .close .block-head p { display: none; }
  .ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8mm; }
  .ways div { border-top: 1px solid #141414; padding-top: 2mm; }
  .ways h3 { color: #45433F; font-size: 8.5pt; }
  .ways p { font-size: 11pt; }
  a { text-decoration: none; color: inherit; }
}
