/* aionai.uk — section pages.
   Shared so the four doors look and behave like one house. Palette taken from
   the existing site: sage, parchment, ink, gold. */

:root {
  --sage: #5f6e5d;
  --parchment: #fcfaf5;
  --ink: #2c2c2c;
  --gold: #b08d57;
  --gold-deep: #8f6f3f;
  --rule: #ddd6c8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.7;
}

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 34px;
  border-bottom: 1px solid var(--rule);
  background: #faf7f0;
}
.site-head .back {
  text-decoration: none;
  color: var(--sage);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.site-head .back span {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a8577;
  margin-left: 10px;
}
.site-head .back:hover { color: var(--gold-deep); }
.site-head .pillar {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 26px 40px;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  font-weight: normal;
  color: var(--sage);
  margin: 0 0 22px;
  line-height: 1.15;
}

h2 {
  font-size: 1.18rem;
  font-weight: normal;
  color: var(--sage);
  margin: 40px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.lead { font-size: 1.16rem; color: #3a3a35; margin: 0 0 26px; }

p { margin: 0 0 17px; }

ul { margin: 0 0 20px; padding-left: 22px; }
li { margin-bottom: 9px; }

.note {
  border-left: 3px solid var(--gold);
  background: #f8f4ea;
  padding: 16px 20px;
  margin: 30px 0;
  font-size: 0.95rem;
  color: #4d4a41;
}
.note strong { color: var(--sage); font-weight: normal; }

.cta {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--sage);
  color: #fdfbf6;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: background .2s;
}
.btn:hover { background: #4d5a4b; }

footer {
  padding: 30px 24px 46px;
  text-align: center;
  font-size: 0.76rem;
  color: #8a8577;
}
footer .sig { font-family: 'Courier New', monospace; }

@media (max-width: 640px) {
  /* two rows, not three: the back-link and the language tab share the first,
     the pillar and its spiral the second, right-aligned. */
  .site-head {
    flex-wrap: wrap; align-items: center; row-gap: 10px; padding: 14px 20px;
  }
  .site-head .back { flex: 1 1 auto; }
  .site-head .langtab { order: 2; margin-left: 8px; }
  .site-head .headmark {
    order: 3; flex: 1 1 100%; justify-content: flex-end;
  }
  main { padding-top: 40px; }
}

/* the production table on Wales' Actors Company */
table.productions {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 26px;
  font-size: 0.92rem;
}
table.productions th {
  text-align: left;
  font-weight: normal;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 12px 8px 0;
  border-bottom: 1px solid var(--rule);
}
table.productions td {
  padding: 7px 12px 7px 0;
  border-bottom: 1px solid #eee8db;
  vertical-align: top;
  color: #4a4a45;
}
table.productions td:first-child {
  white-space: nowrap;
  color: var(--sage);
  font-variant-numeric: tabular-nums;
}
.provenance {
  margin-top: 34px;
  font-size: 0.82rem;
  font-style: italic;
  color: #7d786c;
}

/* ── the triskele in the header ──────────────────────────────────────────────
   Moving and sparkling: three runners travel the three arms, and little dots
   on the arms twinkle out of phase. Stroke is thinned to 2.4 because at header
   size a heavier line closes the gaps between the arms and the mark turns into
   a dot. */
.headmark { display: inline-flex; align-items: center; gap: 14px; }
.triskele { color: var(--gold); flex: 0 0 auto; overflow: visible; }
@keyframes ts-twinkle { 0%,100% { opacity:.10 } 50% { opacity:.95 } }
.ts-shimmer { animation: ts-twinkle 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .ts-shimmer { animation: none; opacity: .45; }
  .ts-runner { display: none; }
}

/* the production that has not happened yet */
table.productions tr.upcoming td {
  background: #f8f2e3;
  border-bottom: 1px solid #e6ddc8;
  padding-top: 11px; padding-bottom: 11px;
}
table.productions tr.upcoming td:first-child {
  color: #a2821f; font-weight: bold;
}
table.productions tr.upcoming strong { color: #3f3f39; }
.soon {
  display: inline-block; font-size: .6rem; letter-spacing: .18em;
  text-transform: uppercase; color: #2b2b26; background: #d9b573;
  padding: 2px 8px; border-radius: 999px; margin-right: 9px;
  vertical-align: 1px;
}

/* ── figures: small, warm, and faded at the edges ───────────────────────── */
.figure {
  float: right;
  width: 224px;
  margin: 6px 0 22px 30px;
}
.figure img { display: block; width: 100%; height: auto; }

/* the fade: a page-coloured vignette laid over the picture, so the edges melt
   into the parchment. A mask would be tidier but it does not survive everywhere;
   this does, and on a parchment page it looks identical. */
.figure .shot { position: relative; display: block; }
.figure .shot::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  background: radial-gradient(ellipse 74% 74% at 50% 50%,
              rgba(252,250,245,0) 46%,
              rgba(252,250,245,.55) 72%,
              rgba(252,250,245,.96) 92%,
              #fcfaf5 100%);
}
.figure.photo img {
  filter: saturate(.82) sepia(.14) contrast(1.02);
}
.figure figcaption {
  font-size: .72rem; color: #8a8577; text-align: center;
  margin-top: 8px; letter-spacing: .04em; line-height: 1.55;
}
.figure.left { float: left; margin: 6px 30px 22px 0; }
@media (max-width: 640px) {
  /* a tall portrait eats the whole first screen on a phone — keep it modest */
  .figure, .figure.left { float: none; width: 54%; max-width: 210px; margin: 0 auto 26px; }
  table.productions { font-size: 0.84rem; }
  table.productions td:first-child { width: 4.6em; }
}
.figure figcaption span { display: block; }

ul.posts { margin-top: -2px; }
ul.posts li strong { color: #3f3f39; }

/* ── the tree on a narrow screen ─────────────────────────────────────────
   The labels are SVG text in the drawing's own units, so they shrink with it.
   On a phone the mark is only ~330 px wide, which renders 17-unit labels at
   about 6 px — unreadable. Two things: give the panel a floor so it can be
   swiped, and lift the label size so what you land on is legible. */
@media (max-width: 640px) {
  /* the tree now FITS the phone: the drawing itself is compressed and its labels
     enlarged by tree.js, so nothing has to be swiped sideways. */
  .tree-panel { overflow: visible; }
  .tree-panel .anya-tree { min-width: 0; width: 100%; }
  .tree-hint { font-size: .72rem; }
}

/* a line that is a statement rather than a sentence */
.creed {
  font-size: 1.14rem;
  letter-spacing: 0.02em;
  color: #5f6e5d;
  border-left: 3px solid #d9b573;
  padding-left: 18px;
  margin: 26px 0 34px;
}
.creed strong { font-weight: normal; }

/* leave room for the phone bar so nothing hides beneath it */
@media (max-width: 760px) {
  main { padding-bottom: 78px; }
}
