/* andresmontiel.com
   Direction: "the listahan". Cobalt blue as the dominant color, sari-sari signage yellow as the one sharp accent,
   a heavy grotesque for display type, a reading serif for long text, and a mono for every figure.
   Fonts: Bricolage Grotesque (display), Source Serif 4 (text), IBM Plex Mono (figures, labels). */

:root {
  --blue: #1f3dbd;          /* dominant brand color: hero, result boxes, footer */
  --blue-panel: #1f3dbd;
  --yellow: #ffd23f;        /* the one accent: on blue only */
  --on-blue: #ffffff;
  --on-blue-soft: #c7d2ff;
  --ink: #10183a;
  --ink-soft: #2b3552;
  --muted: #545e78;
  --bg: #ffffff;
  --surface: #f3f5fb;
  --line: #d9deec;
  --link: #1f3dbd;
  --paper: #fffdf5;         /* receipt paper, stays light in dark mode */
  --paper-ink: #10183a;
  --todo: #fff4cc;
  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue-panel: #2346d0;
    --ink: #f1f3fa;
    --ink-soft: #c9cfe3;
    --muted: #9aa3c0;
    --bg: #0d1430;
    --surface: #141d42;
    --line: #27315e;
    --link: #8fa6ff;
    --todo: #4a3f12;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink-soft); font: 18px/1.7 var(--text); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.05; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; margin: 0 0 .35em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; margin: 2em 0 .5em; }
h3 { font-size: 1.3rem; font-weight: 700; margin: 1.4em 0 .35em; line-height: 1.2; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }

/* Gaps still to fill: every {{TOKEN}} is wrapped in .todo */
.todo { background: var(--todo); padding: 0 .2em; }

/* ---------- Header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.brand .mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--blue); color: var(--yellow); font-weight: 800; font-size: 1.05rem; letter-spacing: -.04em; }
.brand small { display: block; font-family: var(--mono); font-weight: 400; font-size: .74rem; color: var(--muted); letter-spacing: 0; margin-top: 3px; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; }
nav a { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--ink); text-decoration: none; padding: 6px 0; display: inline-block; }
nav a:hover, nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* ---------- Generic page hero ---------- */
.hero { padding: 56px 0 28px; }
.eyebrow { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin: 0 0 14px; }
.eyebrow a { color: var(--muted); }
.lede { font-size: 1.3rem; line-height: 1.55; color: var(--ink-soft); max-width: 34em; }
.meta { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin: 0 0 4px; line-height: 1.5; }

/* ---------- Buttons ---------- */
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; padding: 13px 22px; font-family: var(--display); font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid var(--blue); line-height: 1.2; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-ghost { color: var(--link); border-color: currentColor; }
.btn-yellow { background: var(--yellow); border-color: var(--yellow); color: #10183a; }
.btn-line { color: #fff; border-color: rgba(255,255,255,.7); }
.btn:hover { text-decoration: underline; }

/* ---------- Home: intro (blue band, name as the headline) ---------- */
.intro { background: var(--blue-panel); color: var(--on-blue); padding: 64px 0 0; overflow: hidden; }
.intro-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 40px; align-items: end; }
.intro-copy { padding-bottom: 64px; }
.intro-kicker { font-family: var(--mono); font-size: .9rem; color: var(--on-blue-soft); margin: 0 0 18px; }
.intro-name { font-size: clamp(3.4rem, 9.5vw, 7.6rem); line-height: .9; letter-spacing: -.045em; color: #fff; margin: 0; font-weight: 800; }
.intro-role { display: block; font-size: clamp(1.1rem, 2vw, 1.35rem); letter-spacing: -.005em; font-weight: 600; color: var(--yellow); margin-top: 18px; line-height: 1.3; }
.intro-pov { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.45; color: #fff; max-width: 26em; margin: 26px 0 0; }
.creds { list-style: none; padding: 0; margin: 28px 0 0; max-width: 30em; font-family: var(--mono); font-size: .92rem; color: #e6ebff; }
.creds li { border-top: 1px solid rgba(255,255,255,.28); padding: 9px 0; }
.creds li:last-child { border-bottom: 1px solid rgba(255,255,255,.28); }
.intro-photo { position: relative; align-self: end; }
.intro-photo::before { content: ""; position: absolute; inset: 14% -40px 0 18%; background: var(--yellow); }
.intro-photo img, .intro-photo .headshot { position: relative; filter: grayscale(1) contrast(1.08); }

/* Headshot placeholder until the photo is added */
.headshot { aspect-ratio: 4/5; background: #d8deef; color: #2b3552; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-family: var(--mono); font-size: .8rem; }

/* ---------- Home: press strip ---------- */
.press-strip { border-bottom: 1px solid var(--line); padding: 26px 0; }
.press-strip .wrap { display: flex; align-items: baseline; gap: 14px 30px; flex-wrap: wrap; }
.press-label { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin: 0; }
.press-label a { color: var(--muted); }
.press-names { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; padding: 0; }
.press-names li { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--muted); letter-spacing: -.02em; }

/* ---------- Home: the listahan (receipt) ---------- */
.ledger-band { background: var(--surface); padding: 80px 0; }
.ledger-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.ledger-grid h2 { margin-top: 0; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.ledger-grid p { max-width: 30em; }
.receipt { background: var(--paper); color: var(--paper-ink); font-family: var(--mono); font-size: .95rem; line-height: 1.5; padding: 30px 30px 46px; transform: rotate(-1.2deg); box-shadow: 0 1px 0 rgba(16,24,58,.06), 0 18px 40px -18px rgba(16,24,58,.35);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%; }
.receipt-head { text-align: center; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 2px dashed rgba(16,24,58,.35); }
.receipt-head strong { display: block; font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em; }
.receipt ol { list-style: none; margin: 0; padding: 0; }
.receipt li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; }
.receipt .item { flex: 0 1 auto; }
.receipt .dots { flex: 1 1 24px; border-bottom: 2px dotted rgba(16,24,58,.35); transform: translateY(-5px); min-width: 24px; }
.receipt .amt { flex: none; font-weight: 500; color: var(--paper-ink); }
.receipt a.amt { text-decoration: underline; text-decoration-style: dotted; }
.receipt-foot { margin: 18px 0 0; padding-top: 14px; border-top: 2px dashed rgba(16,24,58,.35); font-size: .78rem; color: #545e78; }
.receipt-foot a { color: #1f3dbd; }

/* ---------- Home: selected work as ledger rows ---------- */
.work { list-style: none; margin: 0; padding: 0; border-bottom: 2px solid var(--ink); }
.work-row { display: grid; grid-template-columns: 200px 1fr 170px; gap: 28px; padding: 26px 0; border-top: 2px solid var(--ink); align-items: start; }
.work-row + .work-row { border-top-width: 1px; border-top-color: var(--line); }
.work-when { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.work-row h3 { margin: 0 0 6px; font-size: 1.35rem; }
.work-row h3 a { color: var(--ink); text-decoration: none; }
.work-row h3 a:hover { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 3px; }
.work-row p { margin: 0; }
.work-lead h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.work-fig { font-family: var(--mono); font-size: 1.6rem; color: var(--link); text-align: right; line-height: 1.1; margin: 4px 0 0; }
.work-fig span { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.work-lead .work-fig { font-size: 2.3rem; }

/* ---------- Home: belief band ---------- */
.belief { background: var(--blue-panel); color: #fff; padding: 88px 0; margin-top: 88px; }
.belief blockquote { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.04em; max-width: 13em; }
.belief p { font-family: var(--mono); font-size: .88rem; color: var(--on-blue-soft); margin: 26px 0 0; }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.quotes figure { margin: 0; }
.quotes blockquote { margin: 0; font-family: var(--text); font-style: italic; font-size: 1.3rem; line-height: 1.5; color: var(--ink); }
.quotes figcaption { margin-top: 10px; }

/* ---------- Cards (Track record index) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 36px 32px; }
.card { border-top: 3px solid var(--ink); padding-top: 16px; }
.card h3 { margin-top: 4px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 3px; }
.cards-lead { margin-bottom: 36px; }
.card-lead { border-top-color: var(--blue); border-top-width: 6px; }
.card-lead h3 { font-size: 1.6rem; }

/* ---------- Lists (press, speaking, insights) ---------- */
.list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.list li a, .list li strong { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; line-height: 1.3; }
.list li a:hover { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.list li p:not(.meta) { margin: 6px 0 0; }
.list li p a { font-family: var(--text); font-weight: 400; font-size: inherit; color: var(--link); text-decoration: underline; letter-spacing: 0; }

/* ---------- Bios ---------- */
.bio { background: var(--surface); border-left: 5px solid var(--blue); padding: 20px 24px; margin: 10px 0 30px; }
.bio-label { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin: 0 0 4px; }

/* ---------- Case studies ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 24px; margin: 26px 0 32px; }
.facts div { border-top: 2px solid var(--ink); padding-top: 10px; font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--ink); line-height: 1.35; }
.facts b { display: block; font-family: var(--mono); font-weight: 400; font-size: .76rem; color: var(--muted); margin-bottom: 4px; }

.result { background: var(--blue-panel); color: #fff; padding: 30px 30px 26px; margin: 8px 0 34px; }
.result-figure { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(3.4rem, 10vw, 5.6rem); line-height: .95; letter-spacing: -.04em; color: var(--yellow); }
.result-caption { margin: 12px 0 18px; color: #fff; font-size: 1.08rem; }
.result .src, .result .src a { color: var(--on-blue-soft); }
.chart { display: block; width: 100%; max-width: 560px; height: auto; }
.chart .bar { fill: var(--yellow); }
.chart .bar-before { fill: rgba(255,255,255,.5); }
.chart text { fill: #e6ebff; font: 19px var(--mono); }
.chart .val { fill: #fff; font-weight: 500; }

.next-steps { margin-top: 56px; padding: 30px; background: #10183a; color: #e6ebff; border: 1px solid var(--line); }
.next-label { margin: 0 0 8px; font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; color: #fff; }
.next-steps .cta { margin-top: 18px; }
.next-steps .btn-primary { background: var(--yellow); border-color: var(--yellow); color: #10183a; }
.next-steps .btn-ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.next-case { margin: 22px 0 0; font-family: var(--mono); font-size: .88rem; }
.next-case a { color: var(--yellow); }

/* Press & Speaking switcher */
.subnav { display: flex; gap: 22px; margin: 30px 0 0; font-family: var(--display); font-weight: 700; }
.subnav a { color: var(--muted); text-decoration: none; }
.subnav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* Source links beside figures */
.src { font-family: var(--mono); font-size: .76rem; color: var(--muted); white-space: nowrap; }
.src a { color: var(--muted); }
.src-note { margin-top: 14px; }

section { padding: 8px 0 24px; }
main { padding-bottom: 72px; }

/* ---------- Footer ---------- */
.site-footer { background: #10183a; color: #c9cfe3; padding: 40px 0; font-family: var(--mono); font-size: .82rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: #fff; }

/* ---------- One orchestrated page load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .intro-name, .intro-pov, .creds, .intro-photo { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .intro-pov { animation-delay: .08s; }
  .creds { animation-delay: .16s; }
  .intro-photo { animation-delay: .24s; }
  /* Slide only, never hide: text stays visible even if the animation doesn't run */
  @keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .intro-grid, .ledger-grid { grid-template-columns: 1fr; }
  .intro-copy { padding-bottom: 8px; }
  .intro-photo { max-width: 260px; margin-left: 24px; }
  .work-row { grid-template-columns: 1fr; gap: 6px; }
  .work-fig { text-align: left; }
  .quotes { grid-template-columns: 1fr; }
  .receipt { transform: none; padding: 24px 20px 40px; font-size: .88rem; }
  .belief { margin-top: 56px; padding: 64px 0; }
}
@media (max-width: 760px) {
  .chart { overflow: visible; }
  .chart text { font-size: 26px; }
}

/* Compact menu on phones so it fits on two even lines */
@media (max-width: 480px) {
  nav ul { gap: 2px 14px; }
  nav a { font-size: .92rem; padding: 4px 0; }
}

/* ---------- Version B: listahan in the opening screen ---------- */
.intro-b { padding-bottom: 72px; }
.intro-grid-b { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.intro-b .intro-copy { padding-bottom: 0; }
.intro-line { font-family: var(--mono); font-size: .95rem; line-height: 1.6; color: #e6ebff; max-width: 34em; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.28); }
.receipt-hero { transform: rotate(-1.6deg); box-shadow: 0 24px 50px -20px rgba(0,0,0,.55); }
.receipt-hero .receipt-head strong { font-size: 1.6rem; }
.receipt-hero .receipt-head { font-size: .82rem; line-height: 1.45; color: #545e78; }
.receipt-hero li { padding: 11px 0; }
.receipt-hero a.item { color: var(--paper-ink); text-decoration: underline; text-decoration-color: rgba(16,24,58,.35); text-underline-offset: 3px; }
.receipt-hero a.item:hover { text-decoration-color: #1f3dbd; }
@media (prefers-reduced-motion: no-preference) {
  .intro-ledger { animation: rise .7s cubic-bezier(.2,.7,.2,1) .2s both; }
}

/* About: photo beside the intro */
.about-hero { display: flow-root; }
.about-photo { float: right; width: 220px; margin: 0 0 16px 28px; position: relative; }
.about-photo::before { content: ""; position: absolute; inset: 18px -14px -14px 18px; background: var(--yellow); }
.about-photo .headshot { position: relative; filter: grayscale(1) contrast(1.08); }

@media (max-width: 860px) {
  .intro-grid-b { grid-template-columns: 1fr; gap: 40px; }
  .intro-b { padding: 44px 0 56px; }
  .receipt-hero { transform: rotate(-1deg); }
  .about-photo { float: none; width: 180px; margin: 0 0 28px; }
}
/* Hero receipt: label left, figure right, dotted rule underneath (narrower column than the A receipt) */
.receipt-hero li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 18px; border-bottom: 2px dotted rgba(16,24,58,.3); }
.receipt-hero li:last-child { border-bottom: 0; }
.receipt-hero .dots { display: none; }
.receipt-hero .amt { text-align: right; }
.intro-grid-b { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) {
  .intro-grid-b { grid-template-columns: 1fr; }
}

/* About photo (real image) and work intro */
.about-photo img { position: relative; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: grayscale(1) contrast(1.06); }
.work-intro { margin-top: -6px; margin-bottom: 30px; }

@media (max-width: 560px) {
  .receipt-hero li { grid-template-columns: 1fr; gap: 2px; }
  .receipt-hero .amt { text-align: left; font-weight: 600; }
}

/* Contact form */
.contact-form { display: grid; gap: 16px; max-width: 560px; margin: 8px 0 24px; }
.contact-form label { display: grid; gap: 6px; font-family: var(--display); font-weight: 700; color: var(--ink); }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px; font: 17px/1.5 var(--text); color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 0; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); outline: none; }
.contact-form button { justify-self: start; cursor: pointer; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 12px 16px; border-left: 5px solid var(--blue); background: var(--surface); }
.form-error { border-left-color: #c2410c; }
