/* ==========================================================================
   RITUAL FOR THE PEOPLE — shared stylesheet
   Every page links to this one file. Change the look here and it changes
   everywhere. Sections below are labelled in plain English.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. COLOURS
   Two sets: one for readers whose device is in Light mode, one for Dark.
   The palette is drawn from the night-sky photograph — slate blue, deep
   violet-grey, and the warm pale light at the horizon.
   -------------------------------------------------------------------------- */

:root {
  /* Light mode (the default) */
  --page:        #e9ebe7;   /* page background — pale lichen, not white */
  --page-deep:   #dfe2dd;   /* slightly darker band, used behind images */
  --ink:         #23262f;   /* body text */
  --ink-soft:    #565b67;   /* quieter text: subtitles, captions, footnotes */
  --ink-faint:   #7d828d;   /* faintest text: inactive nav links */
  --rule:        #c6cac3;   /* hairlines and dividers */
  --accent:      #414d6d;   /* links — the blue-violet of the night sky */
  --accent-deep: #232c44;   /* links on hover */
  --glow:        transparent; /* soft light behind the page; dark mode only */
}

@media (prefers-color-scheme: dark) {
  :root {
    --page:        #1a1e28;
    --page-deep:   #14171f;
    --ink:         #d8d5ce;   /* warm pale, like moonlight */
    --ink-soft:    #a09e9c;
    --ink-faint:   #74767f;
    --rule:        #333846;
    --accent:      #a9b4d4;
    --accent-deep: #cbd2e6;
    --glow:        rgba(99, 112, 150, 0.16);
  }
}


/* --------------------------------------------------------------------------
   2. PAGE FOUNDATION
   Typeface, base size, and the rule that stops sideways scrolling.
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: var(--page);
  /* A single very soft pool of light near the top. Invisible in light mode. */
  background-image: radial-gradient(120% 60% at 50% 0%, var(--glow) 0%, transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 19px;          /* body size on phones */
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 40em) {
  body { font-size: 20px; }
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}


/* --------------------------------------------------------------------------
   3. THE COLUMN
   One column, left aligned, capped at roughly 65–70 characters.
   Everything on every page sits inside this width unless it is a full-bleed
   image.
   -------------------------------------------------------------------------- */

.column {
  width: 100%;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}

@media (min-width: 40em) {
  .column {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}


/* --------------------------------------------------------------------------
   4. HEADER AND NAVIGATION
   Same on every page. Site title links home; nav is plain text, never buttons.
   The current page is shown in full-strength ink with a line beneath it;
   the other links sit back.
   -------------------------------------------------------------------------- */

.site-header {
  padding-top: 2.2rem;
  padding-bottom: 1.8rem;
}

.site-title {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1.4;
  text-transform: none;    /* the words are already written in capitals */
  color: var(--ink);
  text-decoration: none;
}

.site-title:hover,
.site-title:focus-visible {
  color: var(--accent-deep);
}

.site-nav {
  margin-top: 1.5rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
}

.site-nav a {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  color: var(--ink-faint);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

/* The page you are currently reading */
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}


/* --------------------------------------------------------------------------
   5. HEADINGS
   Only two levels are used anywhere on the site.
   h1 = the page title.  h2 = a section within the page.
   -------------------------------------------------------------------------- */

h1 {
  margin: 0 0 1.6rem;
  font-size: 1.62rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.06em;
  color: var(--ink);
}

h2 {
  margin: 0 0 0.9rem;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.055em;
  color: var(--ink);
}

@media (min-width: 40em) {
  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.12rem; }
}

/* A heading that is also a link to another page */
h2 a,
h1 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.12em;
}

h2 a:hover,
h2 a:focus-visible,
h1 a:hover,
h1 a:focus-visible {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}


/* --------------------------------------------------------------------------
   6. BODY TEXT, LISTS AND LINKS
   -------------------------------------------------------------------------- */

p {
  margin: 0 0 1.35rem;
}

p:last-child { margin-bottom: 0; }

/* The short italic line that sits under some headings, e.g. "Start Here!!" */
.subtitle {
  margin: -0.4rem 0 1.15rem;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* Small print, e.g. the travel note on the Weekend Intensive */
.note {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Plain lists of statements. No bullets — a thin rule marks each line. */
.list {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
}

.list li {
  padding: 0.55rem 0 0.55rem 1.1rem;
  border-left: 1px solid var(--rule);
  margin-bottom: 0.45rem;
}

.list li:last-child { margin-bottom: 0; }

/* A list that really is a sequence of steps, so it carries numbers */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 0 1.35rem;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 2.1rem;
  margin-bottom: 1rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.steps li:last-child { margin-bottom: 0; }

/* Links inside running text */
a {
  color: var(--accent);
}

a:hover,
a:focus-visible {
  color: var(--accent-deep);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* The "More about…" links that end a section on the home page */
.more {
  margin: 0;
  font-size: 0.95rem;
}

.more a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.12em;
}

.more a:hover,
.more a:focus-visible {
  border-bottom-color: var(--accent);
}


/* --------------------------------------------------------------------------
   7. SPACE BETWEEN SECTIONS
   Sections are given room deliberately. Adjust these two numbers to make the
   whole site tighter or airier.
   -------------------------------------------------------------------------- */

.section {
  padding-top: 3.4rem;
  padding-bottom: 0;
}

.section:first-of-type { padding-top: 2.6rem; }

@media (min-width: 40em) {
  .section { padding-top: 4.4rem; }
}

/* A hairline used sparingly to close a passage */
.divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3.4rem 0 0;
  width: 100%;
}


/* --------------------------------------------------------------------------
   8. IMAGES
   Two treatments only: full width across the screen, or held inside the
   reading column. Images never carry text on top of them.
   -------------------------------------------------------------------------- */

/* Edge to edge — used for the beach photograph at the top of the home page */
.image-full {
  margin: 0;
  background-color: var(--page-deep);
}

.image-full img {
  width: 100%;
  max-height: 58vh;
  object-fit: cover;
  /* Anchored low so the horizon and the walking figure stay in frame
     when a wide screen has to crop the photograph. */
  object-position: center 75%;
}

@media (min-width: 40em) {
  .image-full img { max-height: 62vh; }
}

/* Held inside the column, with air above and below */
.image-inline {
  margin: 2.6rem 0 0;
}

.image-inline img {
  width: 100%;
}

/* A smaller, quieter placement — used for the diagram and the portrait */
.image-quiet {
  margin: 2.6rem 0 0;
}

.image-quiet img {
  width: 100%;
  max-width: 24rem;
  max-height: 60vh;
  object-fit: contain;
  object-position: left top;
}


/* --------------------------------------------------------------------------
   9. THE PULL QUOTE
   Used once, for Antero Alli's words at the end of the No Form page.
   -------------------------------------------------------------------------- */

.quote {
  margin: 0;
  padding: 0;
}

/* Browsers indent blockquotes by default; the column stays flush left. */
.quote blockquote {
  margin: 0;
  padding: 0;
}

.quote p {
  font-size: 1.16rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
}

.quote .close {
  font-size: 1.32rem;
}

.quote figcaption {
  font-size: 0.9rem;
  font-style: normal;
  color: var(--ink-soft);
}

@media (min-width: 40em) {
  .quote p { font-size: 1.24rem; }
  .quote .close { font-size: 1.45rem; }
}

/* A single line given weight on its own — "Be nothing." */
.standalone {
  font-size: 1.16rem;
  margin-top: 1.9rem;
}


/* --------------------------------------------------------------------------
   10. FOOT OF THE PAGE
   The link that carries a reader on to the next page in sequence.
   -------------------------------------------------------------------------- */

.page-foot {
  margin-top: 4rem;
  padding-top: 1.6rem;
  padding-bottom: 4.5rem;
  border-top: 1px solid var(--rule);
}

.page-foot a {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.15em;
}

.page-foot a:hover,
.page-foot a:focus-visible {
  border-bottom-color: var(--accent);
}
