/* Philosophies, set as a chapter opening in the same travel book as the home page: one centre line, the title in
   spaced capitals over the swelled rule, the intro on one measure, a painted plate (a hiker at a fingerpost looking
   out over the valley), and the three philosophies under it as three short numbered entries.
   Everything here is CSS and two images: the page needs no script, and nothing on it moves.
   Scoped to main.pg-phil so the rest of style.css is left as it is. */

main.pg-phil { --M: clamp(300px, 46vw, 680px); --gap: clamp(22px, 3.6vh, 40px); }
@media (min-width: 901px) and (max-width: 1179px) { main.pg-phil { --M: min(62vw, 620px); } }

/* centred on the window (from 1180px the menu is a rail down the left: the column is moved back by half of it) */
main.pg-phil .c-phil { padding: clamp(40px, 7vh, 76px) 0 clamp(20px, 3vh, 36px); }
/* (doubled class: style.css gives .pg:not(.pg-trail) .c-in a left gutter for left-aligned pages, which pushed this column off the centre) */
main.pg-phil.pg .c-in { padding: 0 24px; text-align: center; }
@media (min-width: 1180px) { main.pg-phil.pg .c-in { padding-right: calc(24px + var(--nav)); } }

/* ---- the title: spaced capitals, not huge, over the swelled rule (the home page's own pen stroke) */
main.pg-phil h1 { max-width: none; font-size: clamp(26px, 1.2vw + 18px, 38px); line-height: 1.2; letter-spacing: .3em; text-transform: uppercase;
  padding: 0; margin: 0 -.3em 0 0; white-space: nowrap; }
main.pg-phil h1::after { content: ''; display: block; position: relative; left: -.15em; width: clamp(140px, 8vw + 70px, 210px); height: clamp(12px, .5vw + 8px, 16px);
  margin: .5em auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 20' preserveAspectRatio='none'%3E%3Cpath fill='%231B242C' fill-rule='evenodd' d='M238 9.68l-32.71-1.35-13.11-0.74-19.62-0.48-13.08 0.33-6.52 0.36-10.9 0.31-4.36 0.49-2.19 0.41-0.02 2.07 2.17 0.57 4.36 0.69 6.54 0.06 17.47-0.44 8.73-0.06 19.64 0.31 32.69-1.21 6.55-0.42 4.36-0.4zM2 10.24l10.9 0.8 10.92 0.28 61.06 1.1 6.53 0.1 6.52-0.02 4.4-0.67 2.18-0.62-0.01-2.18-2.19-0.39-4.34-0.48-6.56-0.23-17.45-0.48-13.07 0.19-13.1-0.25-6.54 0.11-8.73 0.32-19.62 1.34-10.89 0.58zM119.81 17.94l8.09-7.92-8.02-7.85-7.93 7.56z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }

/* ---- the intro: the page's one paragraph, on the measure */
main.pg-phil .phil-grid { display: block; margin: 0; }
main.pg-phil .phil-main { max-width: var(--M); margin: var(--gap) auto 0; }
main.pg-phil .phil-main p { font-size: clamp(18px, .35vw + 15px, 21px); line-height: 1.6; text-wrap: pretty; }
@media (min-width: 901px) { main.pg-phil .phil-main p { text-wrap: balance; } }

/* ---- the plate: its room is kept before it arrives (the images carry their size) */
main.pg-phil .ph-plate { position: relative; width: min(100%, calc(var(--M) + 60px)); aspect-ratio: 560 / 196; margin: var(--gap) auto 0; pointer-events: none; }
main.pg-phil .ph-plate img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }

/* ---- the philosophies: three short entries, numbered like a book's parts */
main.pg-phil .phil { counter-reset: ph; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(24px, 3vw, 48px);
  max-width: calc(var(--M) + 140px); margin: calc(var(--gap) * .8) auto 0; }
main.pg-phil .ph-item { counter-increment: ph; padding: 0; }
main.pg-phil .ph-item::before { content: counter(ph, upper-roman); display: block; font-family: var(--display); font-size: 15px; line-height: 1; letter-spacing: .24em;
  margin: 0 -.24em 10px 0; color: var(--accent); }
main.pg-phil .phil .ph-item .ph-lead { font-size: clamp(20px, .5vw + 15px, 23px); line-height: 1.2; margin: 0 0 6px; text-wrap: balance; }
main.pg-phil .phil li p:not(.ph-lead) { font-size: 17px; line-height: 1.5; text-wrap: pretty; }

@media (max-width: 900px) {
  main.pg-phil .c-phil { padding-top: 36px; }
  main.pg-phil .c-in { padding: 0 20px; }
  main.pg-phil { --M: min(100%, 560px); }
  main.pg-phil .ph-plate { --pw: min(100% + 24px, 620px); width: var(--pw); margin-left: calc((100% - var(--pw)) / 2); margin-right: 0; }
  main.pg-phil .phil { grid-template-columns: minmax(0, 1fr); gap: 26px; max-width: 26em; }
}
@media (max-width: 420px) { main.pg-phil h1 { font-size: 24px; letter-spacing: .24em; margin-right: -.24em; } main.pg-phil h1::after { left: -.12em; } }

/* the footer follows the page's centre line, as on the home page */
main.pg-phil ~ .foot { max-width: none; justify-content: center; padding-left: 20px; padding-right: 20px; }
@media (min-width: 1180px) { main.pg-phil ~ .foot { padding-right: calc(20px + var(--nav)); } }

/* the fingerpost: a flat drawing set into the plate where it was painted for (its foot at 150, 156 of 560 by 196).
   js/philosophies.js draws it as a paper card over this, and then the flat one steps aside. */
main.pg-phil .ph-post { position: absolute; left: 19.643%; top: 40.816%; width: 16.071%; height: 42.857%; }
main.pg-phil .ph-post.is-card { visibility: hidden; }
main.pg-phil .ph-gl { position: absolute; left: 0; top: 0; display: block; pointer-events: none; }
/* (comment mode: the picture takes the click itself, so a note on it lands on it and not on what lies under it) */
html.rv-commenting main.pg-phil .ph-plate { pointer-events: auto; }
