/* marketing.org.mx, built on the reich.com.mx card language:
   white paper, black ink, grey prose, serif wordmark, dot-matrix weeks.
   Layout: wide card rows split by hairlines; posts read in one 64ch column beside a quiet meta rail. */
:root {
  color-scheme: light;
  --paper: #FFFFFF;
  --ink: #0A0A0A;
  --grey: #737373;
  --ghost: #E4E4E4;
  --faint: #F3F3F3;
  --launch: #E0301E;   /* the one red: launch week */
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--paper); color: var(--ink); }
body { margin: 0; font: 400 14px/1.45 var(--sans); letter-spacing: -.005em; }
a { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s; }
a:hover { background-size: 100% 1px; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1440px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .wrap { padding-left: max(56px, env(safe-area-inset-left, 0px)); padding-right: max(56px, env(safe-area-inset-right, 0px)); } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 6px 10px; z-index: 9; }

/* Top line */
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 24px; font-size: 13px; }
.top nav { display: flex; gap: 22px; }
@media (max-width: 600px) { .top nav .opt { display: none; } }
.top { align-items: center; }
.site { display: inline-flex; align-items: flex-end; gap: 10px; background-image: none; }
.logo-mark { display: block; width: 46px; height: auto; }
.logo-mark .on { fill: var(--ink); }
.logo-mark .off { fill: var(--ghost); }
.logo-mark .saddle { fill: var(--launch); }
.site-name { line-height: 1; }
.site:hover .site-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Card rows */
.card { display: grid; gap: 28px; padding-block: 64px; }
@media (min-width: 900px) {
  .card { grid-template-columns: 1.15fr 1fr 1fr; gap: 48px; align-items: start; padding-block: 104px; }
  .list-card { grid-template-columns: 1.15fr 2fr; }
}
.rule { height: 1px; background: var(--ghost); border: 0; margin: 0; }

/* Hero */
.hero { padding-block: 48px 88px; align-items: end !important; }
@media (min-width: 900px) { .hero { padding-block: 96px 120px; } }

/* Cerro de la Silla in dots, set inline after the domain like a signature mark.
   Its saddle, the middle stroke of the M, carries the red dot. */
.mark-wrap { position: relative; display: inline-block; height: .58em; width: calc(.58em * 120 / 52); margin-left: .22em; vertical-align: baseline; letter-spacing: 0; }
.mark { display: block; width: 100%; height: 100%; overflow: visible; }
.mark-wrap .place { position: absolute; right: 0; top: 100%; margin-top: .32em; font: 400 max(11px, .085em)/1 var(--sans); letter-spacing: 0; color: var(--grey); white-space: nowrap; }
.mark .on { fill: var(--ink); }
.mark .off { fill: var(--ghost); }
.mark .saddle { fill: var(--launch); cursor: help; outline: none; }
.mark-wrap:has(.saddle:focus-visible) .saddle { stroke: var(--ink); stroke-width: 1; }
@media (prefers-reduced-motion: no-preference) {
  .mark .on { opacity: 0; animation: dot .5s ease-out forwards; }
}
.wordmark { font: 400 clamp(3rem, 6.6vw, 6.6rem)/.9 var(--serif); letter-spacing: -.035em; margin: 0; text-wrap: balance; }
/* The domain never breaks: it sits on its own row and scales to the row's width */
.wm-wrap { container-type: inline-size; min-width: 0; }
.wm-wrap .wordmark { white-space: nowrap; font-size: clamp(1.6rem, 11.4cqw, 9.5rem); line-height: .95; }
@media (min-width: 900px) {
  .hero .wm-wrap { grid-column: 1 / -1; grid-row: 1; }
  .hero .prose { grid-column: 1; grid-row: 2; }
  .hero .details { grid-column: 2 / 4; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; align-items: start; }
  .hero .details .weeks { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}
.wordmark .dot { color: var(--grey); }
.wordmark .dot.red { color: var(--launch); }
.hero.small .wordmark { font-size: clamp(2.6rem, 5vw, 4.6rem); }
.prose { color: var(--grey); max-width: 36ch; font-size: 14px; line-height: 1.5; }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin: 0; }
.details { font-size: 14px; line-height: 1.35; display: grid; gap: 18px; justify-items: start; }
.details p { margin: 0; }
.pair { display: flex; flex-wrap: wrap; gap: 0 22px; align-items: baseline; }
.hand { font: 400 22px/1 var(--hand); letter-spacing: .02em; display: inline-block; transform: rotate(-3deg); }

/* Weeks of the year: one dot per week, one row per quarter */
.weeks { margin: 6px 0 0; }
.weeks svg { width: 156px; height: auto; display: block; overflow: visible; }
.weeks .off { fill: var(--ghost); }
.weeks .on { fill: var(--ink); }
.weeks .now { fill: var(--ink); }
.weeks { position: relative; }
.weeks .launch { fill: var(--launch); cursor: help; outline: none; }
.weeks .halo { fill: none; stroke: var(--ink); stroke-width: 1; opacity: 0; pointer-events: none; transform-box: fill-box; transform-origin: center; }
.weeks .tip, .mark-wrap .tip { position: absolute; transform: translateY(calc(-100% - 12px)); background: var(--ink); color: var(--paper); font: 500 12px/1 var(--sans); padding: 7px 10px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; z-index: 2; }
.weeks .tip::after, .mark-wrap .tip::after { content: ""; position: absolute; left: 6px; top: 100%; border: 4px solid transparent; border-top-color: var(--ink); }
.weeks:has(.launch:hover) .tip, .weeks:has(.launch:focus-visible) .tip { opacity: 1; transform: translateY(calc(-100% - 8px)); }
.weeks:has(.launch:focus-visible) .launch { stroke: var(--ink); stroke-width: 1.2; }
@media (prefers-reduced-motion: no-preference) {
  .weeks .halo { animation: halo 2.4s ease-out infinite; }
  @keyframes halo { 0% { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.6); } }
}
.weeks figcaption { color: var(--grey); font-size: 12px; margin-top: 10px; max-width: 26ch; }
@media (prefers-reduced-motion: no-preference) {
  .weeks .on { animation: dot .5s ease-out both; }
  @keyframes dot { from { opacity: .2; } to { opacity: 1; } }
}

/* Section labels */
.label { font: 400 clamp(2rem, 3.4vw, 3rem)/.95 var(--serif); letter-spacing: -.02em; margin: 0; }
.idx { font: 400 13px/1 var(--sans); color: var(--grey); display: block; margin-bottom: 14px; }

/* Notes list */
.list-wrap { min-width: 0; }
.notes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ghost); }
.note { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 24px; padding-block: 20px; border-bottom: 1px solid var(--ghost); }
@media (min-width: 700px) { .note { grid-template-columns: 104px minmax(0, 1fr) 150px; } }
.note time { color: var(--grey); font-size: 12px; padding-top: 6px; font-variant-numeric: tabular-nums; }
.note-title { font: 400 clamp(1.45rem, 2.2vw, 1.85rem)/1.05 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.byline { display: block; color: var(--grey); font-size: 13px; margin-top: 6px; }
.note-main p { color: var(--grey); margin: 8px 0 0; max-width: 60ch; }
.note-series { color: var(--grey); font-size: 12px; padding-top: 6px; grid-column: 2; }
@media (min-width: 700px) { .note-series { grid-column: auto; text-align: right; } }
.draft { font: 500 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--ink); border-radius: 999px; padding: 3px 8px; margin-left: 10px; vertical-align: 4px; }
.empty { color: var(--grey); max-width: 44ch; margin: 0; padding-block: 18px; border-block: 1px solid var(--ghost); }

/* Series */
.series { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ghost); }
.series li { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 4px 24px; padding-block: 18px; border-bottom: 1px solid var(--ghost); }
@media (min-width: 700px) { .series li { grid-template-columns: 240px minmax(0, 1fr) 32px; align-items: baseline; } }
.s-name { font: 400 1.5rem/1.05 var(--serif); letter-spacing: -.01em; }
.s-desc { color: var(--grey); grid-column: 1; max-width: 52ch; }
@media (min-width: 700px) { .s-desc { grid-column: auto; } }
.s-count { color: var(--grey); text-align: right; font-variant-numeric: tabular-nums; grid-row: 1; grid-column: 2; }
@media (min-width: 700px) { .s-count { grid-row: auto; grid-column: auto; } }

/* Post */
.post-head { padding-block: 56px 64px; align-items: end !important; }
@media (min-width: 900px) { .post-head { grid-template-columns: 2.15fr 1fr; padding-block: 96px 88px; } }
.post-title { font: 400 clamp(2.6rem, 5.6vw, 5.4rem)/.95 var(--serif); letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.post-side { display: grid; gap: 28px; align-content: end; min-width: 0; }
.dots { margin: 0; }
.dots svg { display: block; width: 100%; max-width: 220px; height: auto; }
.dots .on { fill: var(--ink); }
.dots .red { fill: var(--launch); }
.dots .off { fill: var(--ghost); }
.dots figcaption { color: var(--grey); font-size: 12px; margin-top: 10px; }
.dek { color: var(--grey); font-size: 15px; line-height: 1.5; max-width: 36ch; margin: 0; }
.post-body { display: grid; gap: 32px; padding-block: 48px 72px; }
@media (min-width: 900px) { .post-body { grid-template-columns: 1fr 2.15fr; gap: 48px; padding-block: 72px 104px; } }
.post-meta { font-size: 13px; display: grid; gap: 14px; align-content: start; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (min-width: 900px) { .post-meta { grid-template-columns: 1fr; position: sticky; top: 24px; } }
.post-meta p { margin: 0; }
.post-meta span { display: block; color: var(--grey); font-size: 12px; margin-bottom: 2px; }

.article { min-width: 0; max-width: 64ch; font-size: 17px; line-height: 1.65; letter-spacing: 0; }
.article > :first-child { margin-top: 0; }
.article p { margin: 0 0 1.15em; }
.article h2 { font: 400 2rem/1.05 var(--serif); letter-spacing: -.015em; margin: 1.8em 0 .55em; text-wrap: balance; }
.article h3 { font: 500 1rem/1.3 var(--sans); margin: 1.6em 0 .4em; }
.article a { background-size: 100% 1px; }
.article a:hover { background-size: 0 1px; }
.article blockquote { margin: 1.6em 0; padding: 0; font: italic 400 1.6rem/1.25 var(--serif); letter-spacing: -.01em; }
.article blockquote p { margin: 0; }
.article ul, .article ol { padding-left: 1.2em; margin: 0 0 1.15em; }
.article li { margin-bottom: .4em; }
.article hr { border: 0; height: 1px; background: var(--ghost); margin: 2.2em 0; }
.article code { font-size: .88em; background: var(--faint); padding: .1em .3em; }
.article pre { overflow-x: auto; background: var(--faint); padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.article pre code { background: none; padding: 0; }
.article .table-wrap, .article table { display: block; overflow-x: auto; }
.article table { border-collapse: collapse; font-size: 15px; margin: 0 0 1.4em; }
.article th, .article td { text-align: left; padding: 8px 18px 8px 0; border-bottom: 1px solid var(--ghost); font-variant-numeric: tabular-nums; }
.article th { font-weight: 500; }
.article img { margin: 1.6em 0; }
.draft-note { font-size: 13px; color: var(--grey); border: 1px dashed var(--ghost); padding: 10px 14px; }
.sign { margin-top: 2em; }
.bio { margin-top: 2.4em; padding-top: 1.4em; border-top: 1px solid var(--ghost); font-size: 15px; line-height: 1.55; color: var(--grey); }
.bio p { margin: 0; }
.bio strong { color: var(--ink); font-weight: 500; }
.sign .hand { font-size: 30px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-block: 32px 48px; }
.pn { font: 400 1.35rem/1.1 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.pn span { display: block; font: 400 12px/1 var(--sans); color: var(--grey); margin-bottom: 8px; letter-spacing: 0; }
.pn.next { text-align: right; grid-column: 2; }

/* Subscribe */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 900px) { .card.sub { grid-template-columns: 1.15fr 2fr; } }
.sub .label { max-width: 14ch; text-wrap: balance; }
.sub-wrap { min-width: 0; max-width: 560px; display: grid; gap: 18px; }
.sub-lede { color: var(--grey); margin: 0; }
.sub-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.sub-form input { flex: 1 1 240px; min-width: 0; font: 400 1.6rem/1.2 var(--serif); letter-spacing: -.01em; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 6px 0 8px; }
.sub-form input::placeholder { color: var(--grey); opacity: .7; }
.sub-form input:focus { outline: none; border-bottom-width: 2px; padding-bottom: 7px; }
.sub-form button { font: 500 13px/1 var(--sans); background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 999px; padding: 12px 20px; cursor: pointer; }
.sub-form button:hover { background: var(--paper); color: var(--ink); }
.sub-form button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sub-msg { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--grey); }
.sub-alt { margin: 0; font-size: 12px; color: var(--grey); }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 28px 40px; font-size: 12px; color: var(--grey); border-top: 1px solid var(--ghost); }

@media (pointer: coarse) {
  .top a { display: inline-block; padding-block: 10px; }
  .top { padding-block: 12px; }
}

/* Ridge tooltip: opens leftward from the saddle dot (after the shared .tip rules so it wins) */
.mark-wrap .tip { right: calc(3.1% - 10px); bottom: calc(35% + 6px); top: auto; transform: translateY(4px); }
.mark-wrap .tip::after { left: auto; right: 6px; }
.mark-wrap:has(.saddle:hover) .tip, .mark-wrap:has(.saddle:focus-visible) .tip { opacity: 1; transform: translateY(0); }
