/* LUSTHAUS — the SFW site (sfw.lusthaus.app). A light editorial magazine: paper, ink,
   one red accent, photographs doing the talking. Mobile first: two frames across on a
   phone, four on a desktop, five on a wide screen; nothing ever overflows sideways. */

:root {
  --paper: #f6f4f1;
  --paper-2: #ffffff;
  --ink: #16130f;
  --ink-2: #4a443c;
  --ink-3: #8a8378;
  --line: #e0dad2;
  --accent: #c0272d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1680px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* ---------- masthead ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.top__brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.22em;
  font-weight: 600;
}

.top__nav { display: flex; gap: 18px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.top__nav a { color: var(--ink-2); }
.top__nav a:hover { color: var(--accent); }

/* ---------- layout ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px 72px; }
.wrap--prose { max-width: 720px; }
.wrap--item { max-width: 1240px; }

.hero { padding: 40px 0 24px; border-bottom: 1px solid var(--line); }
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  max-width: 22ch;
}
.hero__lead { color: var(--ink-2); max-width: 52ch; margin: 0; font-size: 15px; }

.strip { padding: 28px 0 8px; }
.strip__h {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 16px;
}

/* ---------- the grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card { margin: 0; min-width: 0; }
.card__link { display: block; min-width: 0; }
.card__img {
  width: 100%;
  background: var(--paper-2);
  object-fit: cover;
  border: 1px solid var(--line);
}
.card__title {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  padding: 7px 2px 0;
  overflow-wrap: break-word;
  line-height: 1.35;
}
.card__badge {
  display: inline-block;
  margin: -26px 0 0 8px;
  position: relative;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
}

.more { padding: 22px 0 8px; text-align: center; }

/* ---------- concepts ---------- */

.concepts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.concept {
  display: block;
  border: 1px solid var(--line);
  background: var(--paper-2);
  min-width: 0;
}
.concept img { width: 100%; object-fit: cover; }
.concept__t {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  padding: 9px 10px 0;
  overflow-wrap: break-word;
}
.concept__n { display: block; font-size: 11px; color: var(--ink-3); padding: 2px 10px 10px; }

/* ---------- a concept page ---------- */

.head { padding: 30px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 5vw, 42px); margin: 0 0 8px; line-height: 1.1; }
.head__tag { color: var(--accent); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 14px; }
.head__copy { color: var(--ink-2); max-width: 62ch; margin: 0 0 12px; }
.head__count { color: var(--ink-3); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0; }

.crumbs { font-size: 12px; color: var(--ink-3); padding: 20px 0 0; }
.crumbs a { color: var(--ink-3); }

/* ---------- an item page ---------- */

.item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 0 0; }
.item__media { min-width: 0; }
.viewer { width: 100%; height: auto; border: 1px solid var(--line); background: var(--paper-2); }
.item__side { min-width: 0; }
.item__side h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 4vw, 32px); line-height: 1.15; margin: 4px 0 12px; overflow-wrap: break-word; }
.item__desc { color: var(--ink-2); margin: 0 0 18px; }
.item__more { margin: 20px 0 0; }
.item__dl { font-size: 13px; color: var(--ink-3); margin: 10px 0 0; }
.item__dl a { text-decoration: underline; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 8px; }
.tags li {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 4px 8px;
}

/* ---------- prose ---------- */

.wrap--prose h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 5vw, 40px); margin: 18px 0 16px; }
.wrap--prose p { color: var(--ink-2); max-width: 68ch; margin: 0 0 16px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  min-height: 44px;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.4; cursor: default; }

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 26px 20px 40px;
  max-width: var(--max);
  margin: 0 auto;
  color: var(--ink-3);
  font-size: 12px;
}
.foot__note { max-width: 70ch; margin: 0 0 14px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; }
.foot__links a { color: var(--ink-2); }
.foot__adult { border-left: 1px solid var(--line); padding-left: 16px; }

/* ---------- wide ---------- */

@media (min-width: 720px) {
  .top { padding: 20px 32px; }
  .wrap { padding: 0 32px 96px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .concepts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .item { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .item__side { position: sticky; top: 90px; }
}

@media (min-width: 1080px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .concepts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .concepts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
