/* Memarie Magazine — memarievintage.com/magazine/
   Same house rules as the link page (css/site.css): black on white, hairlines not shadows, square corners,
   capitals widely tracked, Playfair Display self-hosted. Body copy uses the reading-serif fallbacks from the
   link page's own font stack, so the page makes no third-party requests. No scripts, no inline styles (CSP). */

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: 'Bodoni Moda';
  src: url('/fonts/bodoni-moda-v1-latin.woff') format('woff');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bodoni Moda';
  src: url('/fonts/bodoni-moda-italic-v1-latin.woff') format('woff');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #111111;
  --grey: #5a5a5a;
  --hair: #dcdcdc;
  --display: 'Playfair Display', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --head: 'Bodoni Moda', 'Playfair Display', 'Didot', Georgia, serif;
  --text: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.1rem; line-height: 1.7; font-variant-numeric: lining-nums; text-rendering: optimizeLegibility; }
@media (prefers-color-scheme: dark) { body { background-color: var(--paper); color: var(--ink); } }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }

.in { max-width: 62rem; margin: 0 auto; padding-left: max(1.25rem, env(safe-area-inset-left)); padding-right: max(1.25rem, env(safe-area-inset-right)); }
.label { font-family: var(--display); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--grey); margin: 0 0 0.7rem; }

.back { padding-top: calc(1rem + env(safe-area-inset-top)); font-family: var(--display); font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; }
.back a { text-decoration: none; color: var(--grey); }
.back a:hover { color: var(--ink); }

.mast { padding-top: 1.25rem; }
.logo { margin: 0 auto; max-width: 20rem; }
.logo img { width: 100%; filter: brightness(0); }
.issueline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1.5rem; margin-top: 1.25rem; padding-block: 0.7rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-family: var(--display); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }

.front { display: grid; gap: 2.5rem 4rem; padding-block: 2.5rem 3rem; }
.front > * { min-width: 0; }
.contents { list-style: none; margin: 0; padding: 0; }
.contents li { border-top: 1px solid var(--hair); }
.contents li:last-child { border-bottom: 1px solid var(--hair); }
.contents a { display: grid; gap: 0.1rem; padding: 0.7rem 0; text-decoration: none; }
.contents .k { font-family: var(--display); font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--grey); }
.contents .t { font-family: var(--head); font-size: 1.3rem; line-height: 1.25; }
.contents a:hover .t { text-decoration: underline; text-underline-offset: 4px; }
.letter p { margin: 0 0 1rem; font-style: italic; font-size: 1.22rem; line-height: 1.55; max-width: 34rem; text-wrap: pretty; }
.letter p.label { font-style: normal; font-size: 0.7rem; line-height: 1.4; margin: 0 0 0.7rem; }
.letter .sig { font-family: var(--display); font-style: normal; font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; }
@media (min-width: 820px) { .front { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }

.story { padding-block: 3rem 3.5rem; border-top: 1px solid var(--ink); scroll-margin-top: 1rem; }
.story h2 { font-family: var(--head); font-weight: 600; font-size: clamp(2.3rem, 7vw, 4rem); line-height: 1.04; margin: 0 0 0.9rem; text-wrap: balance; }
.deck { font-family: var(--head); font-style: italic; font-size: clamp(1.2rem, 3vw, 1.5rem); line-height: 1.4; color: var(--grey); margin: 0 0 2rem; max-width: 38rem; text-wrap: balance; }
.prose { max-width: 38rem; }
.prose p { margin: 0 0 1.2rem; text-wrap: pretty; }
.pull { margin: 2rem 0; padding-block: 1.2rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-family: var(--head); font-style: italic; font-size: clamp(1.6rem, 4.5vw, 2.3rem); line-height: 1.2; max-width: 38rem; text-wrap: balance; }
.photo { margin: 0 0 2rem; max-width: 34rem; }
.photo img { width: 100%; }

/* article blocks */
.blocks { max-width: 38rem; }
.blocks::after { content: ""; display: table; clear: both; }
.b-p { margin: 0 0 1.2rem; text-wrap: pretty; }
.b-p a, .b-list a { text-decoration-thickness: 1px; }
.b-h { font-family: var(--head); font-weight: 600; font-size: 1.6rem; line-height: 1.2; margin: 2.2rem 0 0.8rem; text-wrap: balance; }
.b-list { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.b-list li { margin: 0.35rem 0; }
.b-hr { border: 0; border-top: 1px solid var(--ink); width: 3rem; margin: 2.2rem 0; }
.b-img { margin: 1.8rem 0; }
.b-img img { width: 100%; }
.b-img figcaption, .b-gal figcaption { font-size: 0.9rem; line-height: 1.45; color: var(--grey); margin-top: 0.55rem; }
.b-img.sz-small { width: 58%; }
.b-img.sz-right { float: right; width: 44%; margin: 0.4rem 0 1rem 1.5rem; }
.b-img.sz-left { float: left; width: 44%; margin: 0.4rem 1.5rem 1rem 0; }
@media (max-width: 640px) { .b-img.sz-right, .b-img.sz-left { float: none; width: 100%; margin: 1.8rem 0; } .b-img.sz-small { width: 100%; } }
.b-gal { margin: 1.8rem 0; }
.b-gal .row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.6rem; }
.b-gal img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.b-prod { margin: 1.6rem 0; }
.b-prod a { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; align-items: center; text-decoration: none; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 0.9rem 0; }
.b-prod img { width: 6.5rem; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border: 1px solid var(--hair); }
.b-prod .n { display: block; font-family: var(--head); font-size: 1.15rem; line-height: 1.25; }
.b-prod .d { display: block; font-size: 0.92rem; line-height: 1.4; color: var(--grey); margin-top: 0.2rem; }
.b-prod .p { display: block; font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.14em; margin-top: 0.45rem; }
@media (hover: hover) { .b-prod a:hover .n { text-decoration: underline; text-underline-offset: 4px; } .b-prod a:hover img { border-color: var(--ink); } }
.blocks .pull { margin: 2rem 0; }
.blocks .collage { margin-top: 1.8rem; }
.dropcap > .b-p:first-child::first-letter { float: left; font-family: var(--head); font-weight: 600; font-size: 4.3rem; line-height: 0.82; padding: 0.35rem 0.55rem 0 0; }
.sz-l.b-p, .sz-l.b-list { font-size: 1.42rem; line-height: 1.5; }
.sz-s.b-p, .sz-s.b-list { font-size: 0.95rem; line-height: 1.55; }
.sz-l.b-h { font-size: 2.2rem; } .sz-s.b-h { font-size: 1.2rem; }
.sz-l.pull { font-size: clamp(2.1rem, 6vw, 3.2rem); } .sz-s.pull { font-size: clamp(1.3rem, 3vw, 1.6rem); }
.al-c { text-align: center; }
.b-list.al-c { list-style-position: inside; padding-left: 0; }
.co-grey { color: var(--grey); }
.co-pink { color: #ff1e8e; }
.end .shop { margin-top: 0; }

.cta { margin: 0.5rem 0 0; }
.btn { display: inline-block; padding: 0.95rem 1.6rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; font-family: var(--display); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; transition: background-color 160ms ease, color 160ms ease; }
@media (hover: hover) { .btn:hover { background: var(--paper); color: var(--ink); } }

.collage { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0.5rem 1rem; margin: 1.5rem 0 0.5rem; padding: 1rem; border: 1px solid var(--hair); max-width: 44rem; }
.collage a { display: block; position: relative; text-decoration: none; }
.collage a:first-child { grid-row: 1 / span 2; align-self: center; }
.collage img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
.collage a:first-child img { aspect-ratio: 3 / 4; }
.collage .tag { position: absolute; left: 0.4rem; bottom: 0.4rem; max-width: calc(100% - 0.8rem); padding: 0.2rem 0.5rem; background: rgba(255,255,255,0.92); font-family: var(--display); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.4; }
.collage.two { grid-template-columns: 1fr 1fr; }
.collage.two a:first-child { grid-row: auto; }
.collage.two a:first-child img { aspect-ratio: 1 / 1; }
.collage a.small { align-self: end; }
.collage a.small img { width: 68%; margin: 0 auto; }
.cap { font-family: var(--display); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); margin: 0 0 1.5rem; }
@media (max-width: 520px) { .collage { padding: 0.6rem; gap: 0.6rem 0.75rem; } .collage .tag { position: static; display: block; max-width: none; padding: 0.35rem 0 0; background: none; font-size: 0.58rem; letter-spacing: 0.1em; } }

.shop { margin-top: 1.25rem; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card a { display: grid; gap: 0.3rem; text-decoration: none; }
.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border: 1px solid var(--hair); }
.card .n { font-family: var(--head); font-size: 1rem; line-height: 1.3; }
.card .d { font-size: 0.88rem; line-height: 1.4; color: var(--grey); }
.card .p { font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.14em; }
@media (hover: hover) { .card a:hover img { border-color: var(--ink); } .card a:hover .n { text-decoration: underline; text-underline-offset: 4px; } }

.foot { border-top: 1px solid var(--ink); }
.foot .in { padding-block: 2.5rem calc(3rem + env(safe-area-inset-bottom)); text-align: center; }
.foot p { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--grey); }
.foot .tag { font-family: var(--head); font-style: italic; font-size: 1.6rem; color: var(--ink); margin-bottom: 0.8rem; }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
