/* lukecorden.org: the Porcelain skin (mockups/lc/lc.css), copied by build_lc_live.py. */

/* =================================================================
   lukecorden.org: the Porcelain skin (lc-skin.md v0.1a).
   Loaded after ../style.css. Defines only what differs from NLP.
   26 Nov, Luke: "adjust the rest of the site's fonts to match Fett. Might as well mimic NLP for
   now." So the type is NLP's own, from style.css, untouched: the skin's faces (Shippori Mincho,
   EB Garamond, Courier Prime as furniture, IBM Plex Mono) and its type tokens are gone. What
   differs is the colour (Porcelain light and dark), the rim, the mark, the layout, and one type
   choice of Luke's: the site's title and the level-1 heads in Apfel Fett (below).
   ================================================================= */

/* ---- Porcelain light: the default. html:root outranks style.css's :root ---- */
html:root {
  color-scheme: light dark;
  --color_paper: #f4f6f8;  --color_surface: #e3e9f1;  --color_ink: #1c2747;
  --color_ink_soft: #394767;  --color_muted: #55617d;  --color_rule: #c8d2e0;
  --color_control_border: #738099;  --color_accent: #2a4c9b;
  --color_on_accent: #f4f6f8;  --color_error: #a2311f;
  --photo_mat: #d9e1ec;  --photo_mat_pad: 0.625rem;  /* light only: a cobalt-wash mount so the photo's white edge holds (Luke, 26 Nov) */
}

/* ---- Porcelain dark, by the device setting (no choice made) ---- */
@media screen and (prefers-color-scheme: dark) {
  html:root {
    color-scheme: dark;
    --color_paper: #131a2c;  --color_surface: #1b2438;  --color_ink: #e9edf2;
    --color_ink_soft: #c4cddb;  --color_muted: #9aa6bd;  --color_rule: #2d3953;
    --color_control_border: #6c7c9c;  --color_accent: #8eaee6;
    --color_on_accent: #131a2c;  --color_error: #f29a8e;
  --photo_mat: transparent;  --photo_mat_pad: 0;  /* dark already holds the edge */
  }
}

/* ---- the reader's choice: the same selectors as style.css 9.5, later, so these win ---- */
@media screen {
  :root[data-theme="light"],
  :root:is(:has(#theme-light:checked)) {
    color-scheme: light;
    --color_paper: #f4f6f8;  --color_surface: #e3e9f1;  --color_ink: #1c2747;
    --color_ink_soft: #394767;  --color_muted: #55617d;  --color_rule: #c8d2e0;
    --color_control_border: #738099;  --color_accent: #2a4c9b;
    --color_on_accent: #f4f6f8;  --color_error: #a2311f;
  --photo_mat: #d9e1ec;  --photo_mat_pad: 0.625rem;  /* light only: a cobalt-wash mount so the photo's white edge holds (Luke, 26 Nov) */
  }
  :root[data-theme="dark"],
  :root:is(:has(#theme-dark:checked)) {
    color-scheme: dark;
    --color_paper: #131a2c;  --color_surface: #1b2438;  --color_ink: #e9edf2;
    --color_ink_soft: #c4cddb;  --color_muted: #9aa6bd;  --color_rule: #2d3953;
    --color_control_border: #6c7c9c;  --color_accent: #8eaee6;
    --color_on_accent: #131a2c;  --color_error: #f29a8e;
  --photo_mat: transparent;  --photo_mat_pad: 0;  /* dark already holds the edge */
  }
}

/* ---- the LC mark wears the cobalt (NLP's wears ink) ---- */
.bio__mark, .site-name__mark { color: var(--color_accent); }

/* ---- poems keep their lines ---- */
.poem, .poem-item { white-space: pre-line; }

/* ---- the rim and the foot (Alternate E): the one motif ---- */
.site-header { position: relative; border-bottom: 2px solid var(--color_accent); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; border-bottom: 1px solid var(--color_accent); }
.site-footer { position: relative; border-top: 2px solid var(--color_accent); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; border-top: 1px solid var(--color_accent); }

/* =================================================================
   Charta, 25 Nov: the mock-up's own rules (lc-skin.md section 9),
   after Iris's block above, which is pasted unchanged.
   ================================================================= */

/* the mark: the LC drawings (lc/mark/), square, so each takes its ratio from its own viewBox. style.css
   gives the NLP whorl's ratios to these classes; they do not apply here. */
.bio__mark, .bio__mark--master, .site-name__mark--32, .site-name__mark--64 { aspect-ratio: auto; }

/* ---- the site's title, in the header on every page (26 Nov): the mark, then "lukecorden.org", lower case,
   in Apfel Grotezk Fett (below). A clear title, not a masthead:
   22px on phones (it keeps the switch on its line at 390), growing to 36px, with the mark at 52px
   from 40rem. NLP's inner header (5.20) is 22 to 28px with a 48px mark. ---- */
html:root { --text_site_name: clamp(1.375rem, 0.8rem + 2.2vw, 2.25rem); }
@media (min-width: 40rem) { .site-name__mark--64 { height: 3.25rem; } }

/* ---- the title face (26 Nov). From the font samples Luke picked "fett": Apfel Grotezk Fett (700) for the
   site's title in the header on every page, and for the opening head of every level-1 page (the rooms,
   now, about and the rest), at their own sizes. The face is NLP's own Apfel (style.css, with liga off);
   only the weight differs, Fett where NLP's name and room titles use Satt. The one type override left. ---- */
.site-name, .page-title { font-weight: 700; }

/* ---- the home's opening (26 Nov, Luke's marked-up screenshot) ----
   - The mark has gone up beside the site's title, in the header every page shares.
   - His photo takes the mark's old place, its top level with the first line's capitals, with the
     same clear 2rem to the text. No box. Below 40rem it sits above the text at 5rem.
   - 26 Nov, Luke: "increase the image enough that the only wrapped text is the final short para."
     So paragraphs 1 and 2 sit beside the photo (the whole artwork, in its own shape) and the last
     paragraph clears it, always starting below. The width is measured in the body face (Source
     Serif 4) across every column width the float sees (40rem up, the column is always 576px):
     18px body (40 to 64rem): from 250 to 257px the photo's bottom lands 0 to 11px past the end of
     paragraph 2, so 15.8125rem (253px), mid-band: 5px past. 19px (64rem up): no width up to 460px
     reaches; only 239 to 245px keep all of paragraph 2 beside it, with its last line running about
     a line (29 to 38px) below the photo, so 15.125rem (242px), mid-band. Both under half the column.
   - Then the masthead's divider (5.14), the filter row and the feed. */
.opening {
  --bio_photo: 5rem;
  display: flow-root;
  padding-bottom: var(--space_xl);
  border-bottom: var(--rule_width) solid var(--color_rule);
}
.opening .bio__note { margin: 0; }
.opening .bio__note + .bio__note { margin-block-start: 1em; }
@media (min-width: 40rem) {
  .opening { --bio_photo: 15.8125rem; }                                         /* 253px */
  .opening .bio__photo { float: left; margin: calc(var(--text_body) * 0.48) 2rem 0.5rem 0; }
}
/* Luke, 26 Nov: "use full length of profile pic even if it means not wrapping all the text".
   The photo keeps its own shape at the slot's width, so a tall picture runs down beside paragraph 2. */
.opening img.bio__photo { height: auto; aspect-ratio: auto; }
/* Luke, 26 Nov: "works on dark but not on light, perhaps we need a slightly coloured background on the image". */
.opening img.bio__photo { background: var(--photo_mat, transparent); padding: var(--photo_mat_pad, 0); }
@media (min-width: 64rem) { .opening { --bio_photo: 15.125rem; } }            /* 242px */
/* Luke, 26 Nov, red markup ("SPLIT THE DIF", reference/2026-11-26-luke-note-lc-split-the-dif.png):
   the closing four lines move up into the text column, under paragraph 2, so all the words sit
   beside the picture, and the picture is centred against them: the spare height splits evenly above
   and below it. Phones stay stacked. */
@media (min-width: 40rem) {
  .opening { display: flex; align-items: center; gap: 2rem; }
  .opening .bio__photo { float: none; flex: none; margin: 0; }
  .opening__text { flex: 1; min-width: 0; }
}

/* poems keep their lines; a feed item shows the first two under the title */
.poem-item { margin: var(--space_xs) 0 0; }
.prose .poem { margin-block-end: 1.6em; }      /* a stanza: one blank line after it */

/* Luke, 26 Nov: "centre the last 4 lines" (the opening's closing lines, one sentence to a line). */
.opening .bio__note--lines { text-align: center; }
/* Luke, 26 Nov: "centre the first 2 paras" too, so the whole opening is centred. */
.opening .bio__note { text-align: center; }
/* Luke, 26 Nov: "let's try centring the logo under the final line". The mark, small, as a sign-off. */
.opening__mark { display: flex; justify-content: center; margin-block-start: var(--space_l, 1.5rem); }
.opening__mark-svg { width: 4rem; height: 4rem; color: var(--color_accent); }

/* The nav's word spacing is lukecorden.org's own: 0.75rem, as it launched on 28 Nov. NLP tightened the
   shared value in style.css to 0.625rem for its seventh word (nlp-design-system.md 5.27); this keeps
   LC's nav exactly as it was. */
.topnav ul { column-gap: 0.75rem; }

/* Luke, 26 Nov: "centre the masthead and the top nav". From 40rem the header is three columns: the
   middle one holds the name (row 1) and the nav (row 2), centred on the page; the switch sits top
   right and the menu button right of the nav, so the site map still opens from the column's right
   edge. Phones keep the bar as it was (the nav is the menu there). */
@media (min-width: 40rem) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    column-gap: var(--space_md);
  }
  .site-header .site-name { grid-column: 2; grid-row: 1; justify-self: center; align-self: center; margin: 0; }
  .site-header .theme     { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; margin: 0; }
  .site-header .topnav    { grid-column: 2; grid-row: 2; }
  .site-header .topnav ul { justify-content: center; }
  .site-header .menu      { grid-column: 3; grid-row: 2; justify-self: end; }
}

/* Luke, 26 Nov: "menu top left and light dark top right for balance". From 40rem the menu button
   sits top left on the name's row and the switch top right; the nav row spans the column, centred.
   With the button on the left, the site map can't grow leftwards from it, so it opens as a panel
   under the header, the column's full width, over the page (the rim stays). */
@media (min-width: 40rem) {
  .site-header .menu      { grid-column: 1; grid-row: 1; justify-self: start; align-self: center; }
  .site-header .topnav    { grid-column: 1 / -1; grid-row: 2; }
  .site-header .menu__panel {
    position: absolute; left: 0; right: 0; top: calc(100% + 0.75rem); z-index: 10;
    width: auto; margin: 0; direction: ltr; background: var(--color_paper);
  }
  .site-header .menu__panel .sitemap { width: 100%; margin-top: 0; border-top: 0; padding-top: var(--space_md); }  /* the rim above is its top edge */
  .site-header:has(.menu[open]) { border-bottom-color: var(--color_accent); }
}

/* ---- the email sign-up (26 Nov, lc-skin.md 11). Luke: "model this for the lukecorden.org mock up square
   and rectangle set up but with the other logo". The box is NLP's (style.css, nlp-design-system.md 5.26):
   the same parts, two lines and sizes, in LC's tokens. Only the mark differs: LC's labyrinth
   (lc/mark/lc-mark-64.svg), square, and in the cobalt, as in the header. ---- */
.email-signup__mark { aspect-ratio: auto; color: var(--color_accent); }

/* ---- the thanks page (Luke, 1 Dec 2026; mockups/thanks-page v0.2a): the large mark is LC's labyrinth in the
   cobalt, as in the header (style.css sets its size and place). ---- */
.thanks-mark { color: var(--color_accent); }
