/* Mente Directiva · manual de marca v0.2: cream ground, ink, wine as the lead colour. A one-page newsletter. */
:root {
  --ink: #1F1E1C;
  --paper: #F0EDE4;
  --sheet: #FAF7EF;
  --wine: #731718;
  --wine-2: #5C1213;
  --grey: #8B8780;
  --line: #D9D4C7;
  --wa: #1F8A4C;
  --serif: "Noto Serif Display", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: clip; } /* a rotated card or a long word never adds a sideways scroll on phones */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(rgba(31,30,28,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(31,30,28,.035) 1px, transparent 1px);
  background-size: 40px 40px;
}
a { color: var(--wine); }
button, input, select, a { touch-action: manipulation; } /* no double-tap zoom delay on phones */
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 2px; }
input:focus-visible, select:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

.page, #app { max-width: 620px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(20px, env(safe-area-inset-right)); }

/* masthead */
.masthead { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0 8px; }
.masthead img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.masthead span { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }

/* headline + form */
.lead-block { text-align: center; padding: 18px 0 24px; }
/* one line always: the size follows the width. 9.2 is the measured width/font-size ratio of this text at 64% stretch
   (app.js corrects it after the font loads, in case a fallback font is wider) */
h1 { font-family: var(--serif); font-stretch: 64%; font-weight: 800; font-size: min(calc((100vw - 44px) / 9.2), 64px); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 14px; white-space: nowrap; }
h1 em { font-style: normal; color: var(--wine); }
.sub { font-size: 18px; color: #4A4843; margin: 0 auto 24px; max-width: 520px; }
.proof { font-size: 14px; color: var(--grey); margin: 12px 0 0; }
.proof b { color: var(--ink); }

.signup { max-width: 520px; margin: 0 auto; text-align: left; }
.pick-label { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 15px; margin: 0 0 10px; text-align: center; color: var(--wa); }
.get { list-style: none; padding: 0; margin: 14px auto 0; max-width: 520px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 14px; color: #4A4843; }
.get li::before { content: "✓"; color: var(--wa); font-weight: 800; margin-right: 5px; }
.after { font-size: 13.5px; color: var(--grey); text-align: center; max-width: 480px; margin: 12px auto 0; }
.after b { color: var(--ink); }
.welcome-line { background: #E7F3EC; border-radius: 10px; padding: 10px 12px; font-size: 15px; font-weight: 600; text-align: center; margin: 8px 0 14px; }
.name-form .err { margin: 0; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; cursor: pointer; padding: 4px 2px; }
.toggle input { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; accent-color: var(--wa); -webkit-appearance: checkbox; appearance: checkbox; }
input:disabled { background: #F3F1EA; color: var(--grey); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--sheet); border: 2px solid var(--ink); border-radius: 14px; padding: 5px; margin-bottom: 12px; }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; min-height: 50px; border-radius: 10px; font-weight: 800; font-size: 17px; cursor: pointer; color: var(--ink); }
.tab:hover { background: rgba(31,30,28,.06); }
.tab.on { background: var(--ink); color: var(--paper); }
.tab.on[data-ch="whatsapp"] { background: var(--wa); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row select { flex: 1 1 100%; }
.row input { flex: 1 1 180px; }
.row .btn { flex: 1 1 100%; }
input, select { font: inherit; font-size: 17px; min-height: 54px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; color: var(--ink); width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input[name="phone"] { font-family: var(--mono); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
input::-webkit-search-decoration, input::-webkit-search-cancel-button { -webkit-appearance: none; }
input:focus, select:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(115,23,24,.15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--wine); font-weight: 700; margin: 8px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.err .fix { font: inherit; font-weight: 700; color: var(--wa); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.row input.bad { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(115, 23, 24, .12); }
.row input.good { border-color: var(--wa); }
.ts:empty { display: none; }
.ts { margin-top: 8px; }
.fine { font-size: 12.5px; color: var(--grey); margin: 10px 0 0; }

@media (min-width: 560px) {
  .row .btn { flex: 0 0 auto; }
  .row input { flex: 1 1 0; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 22px; border-radius: 12px; border: 2px solid var(--ink); background: var(--sheet); font-weight: 800; font-size: 17px; text-decoration: none; color: var(--ink); cursor: pointer; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--wine); border-color: var(--wine); color: var(--paper); box-shadow: 0 4px 0 var(--wine-2); }
.btn.primary:hover { background: var(--wine-2); }
.btn.primary:disabled { background: var(--grey); border-color: var(--grey); box-shadow: none; cursor: progress; }
.btn.ghost { background: var(--sheet); }
.btn.ghost:hover { border-color: var(--wine); }
.btn.go { background: var(--wa); border-color: var(--wa); color: #fff; box-shadow: 0 4px 0 #166B3A; font-size: 18px; position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn.go .arrow { display: inline-block; transition: transform .2s ease; }
.btn.go:hover { background: #197A43; transform: translateY(-2px); box-shadow: 0 6px 0 #166B3A, 0 12px 24px rgba(31,138,76,.35); }
.btn.go:hover .arrow { transform: translateX(5px); }
.btn.go:active { transform: translateY(2px); box-shadow: 0 2px 0 #166B3A; }
/* a soft pulse while the field waits, a light sweep every few seconds, and a stronger beat once the number is valid */
.btn.go.pulse { animation: pulse 2.6s ease-in-out infinite; }
.btn.go.pulse::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.38) 50%, transparent 65%); transform: translateX(-130%); animation: shine 3.4s ease-in-out infinite; pointer-events: none; }
.btn.go.ready { animation: beat 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 4px 0 #166B3A, 0 0 0 0 rgba(31,138,76,.45); } 55% { box-shadow: 0 4px 0 #166B3A, 0 0 0 12px rgba(31,138,76,0); } }
@keyframes shine { 0%, 65% { transform: translateX(-130%); } 90%, 100% { transform: translateX(130%); } }
@keyframes beat { 0%, 100% { transform: scale(1); box-shadow: 0 4px 0 #166B3A, 0 0 0 0 rgba(31,138,76,.5); } 40% { transform: scale(1.035); box-shadow: 0 6px 0 #166B3A, 0 0 0 10px rgba(31,138,76,0); } }
.btn.go.busy, .btn.go:disabled { background: #197A43; border-color: #197A43; box-shadow: none; cursor: progress; animation: none; transform: none; }
.btn.go.busy .arrow { display: none; }
.btn.go.busy::before { content: ""; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wide { width: 100%; }

/* after subscribing */
.done-card { background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; animation: in .25s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ok { font-weight: 800; color: var(--wine); margin: 0; }
.ask-n, .hint { font-size: 14px; color: var(--grey); margin: 0; }
.ask { font-family: var(--serif); font-stretch: 75%; font-weight: 700; font-size: 24px; line-height: 1.1; margin: 0; }
.choices { display: grid; gap: 8px; }
.skip { background: none; border: 0; color: var(--grey); text-decoration: underline; cursor: pointer; font-size: 14px; justify-self: center; }

/* after subscribing: the survey takes the page, one question per screen */
.flow { display: none; }
body.in-flow .flow { display: block; padding: 8px 0 24px; }
body.in-flow .lead-block { display: none; }
.flow-card { background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--r); padding: 14px 16px 18px; animation: in .25s ease both; max-width: 520px; margin: 0 auto; }
.flow h2, .flow .sub, .opt { overflow-wrap: anywhere; }
.flow-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; text-align: center; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--grey); }
.icon { background: none; border: 0; font-size: 20px; width: 40px; height: 40px; cursor: pointer; border-radius: 50%; }
.icon:hover { background: rgba(31,30,28,.06); }
.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0 18px; }
.progress i { display: block; height: 100%; background: var(--wa); border-radius: 4px; transition: width .35s ease; }
.flow h2 { font-family: var(--serif); font-stretch: 72%; font-weight: 800; font-size: clamp(28px, 7.5vw, 36px); line-height: 1.05; margin: 0 0 8px; text-align: center; }
.flow .sub { font-size: 16px; text-align: center; margin: 0 auto 16px; }
.options { display: grid; gap: 10px; margin: 6px 0 12px; }
.opt { text-align: left; min-height: 58px; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 600; font-size: 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: border-color .15s ease, background .15s ease; }
.opt:hover { border-color: var(--ink); }
.opt.on { border-color: var(--wa); background: #E7F3EC; }
.check .box { flex: 0 0 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink); background: #fff; position: relative; }
.check.on .box { background: var(--wa); border-color: var(--wa); }
.check.on .box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.name-form { display: grid; gap: 10px; margin-bottom: 4px; }
.flow .skip { display: block; margin: 10px auto 0; }
.flow .btn.primary:disabled { background: var(--grey); border-color: var(--grey); box-shadow: none; cursor: not-allowed; }
.done { text-align: center; }
.done .seal { width: 64px; height: 64px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; font-size: 34px; margin: 10px auto 10px; }
.next { text-align: left; padding-left: 22px; display: grid; gap: 10px; margin: 6px 0 14px; }
.note { background: #fff; border: 1.5px dashed var(--wine); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 15px; }
.offer { background: #fff; border: 2px solid var(--wine); border-radius: var(--r); padding: 16px; margin: 14px 0; text-align: left; }
.offer h3 { font-family: var(--serif); font-stretch: 75%; font-size: 24px; margin: 0 0 6px; }
.offer p { margin: 0 0 12px; font-size: 15px; }
.done .btn.wa { margin-top: 6px; }

/* footer */
.foot { text-align: center; font-size: 13px; color: var(--grey); padding: 28px 0 32px; border-top: 1.5px solid var(--line); margin-top: 28px; }
.foot p { margin: 6px 0 0; }
.foot a { color: var(--grey); }

/* privacy page */
.top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 60px; }
.brand { justify-self: center; white-space: nowrap; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-stretch: 70%; font-weight: 700; font-size: 22px; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.legal { font-size: 12px; color: var(--grey); text-align: center; margin: 18px 0 0; }
