/* Lato, self-hosted (SIL Open Font License, see fonts/LICENSE-Lato.txt).
   Latin subset, from @fontsource/lato 5.3.0. Light for text, Bold for links. */
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/lato-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

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

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

body {
  margin: 0;
  font-family: "Lato", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }

a { color: inherit; }

input, button, textarea, select { font: inherit; }

/* Tokens: adjust these as the design takes shape */
:root {
  --gutter: clamp(20px, 4.5vw, 64px);
  --text: #f6efe2;          /* light text on the dark band */
  --text-size: clamp(1rem, 0.85rem + 0.65vw, 1.3125rem);   /* 16px on phones, about 18.5–20px on tablets; wide screens set their own below */

  /* Dark band over the photo: fades from --shade-top at its edge to
     --shade-text where the text ends, then to clear over the fade distance.
     Narrow screens: band across the top, fading downward over --fade.
     Wide landscape screens: band down the left, fading rightward over --fade-x. */
  --shade: 26 18 12;        /* warm near-black, as R G B */
  --shade-top: 0.9;
  --shade-text: 0.65;
  --fade: clamp(5rem, 22vh, 12rem);
  --fade-x: clamp(6rem, 14vw, 16rem);
  --col: clamp(30rem, 42vw, 58rem);   /* text column width in the side-by-side layout */
  --col-align: center;                /* vertical position of the text there: start | center | end */

  /* Link palette: deep, earthy, tuned to sit on the dark band */
  --ochre: #956210;
  --burnt-orange: #ad4a1c;
  --forest: #3b6e48;
  --plum: #7e4499;
  --brick: #a1402d;
  --olive: #5f6c25;
  --indigo: #28449a;    /* deep navy-indigo */

  --image-focus: 62% 50%;   /* which part of the photo stays in view when cropped */
}

/* Full-screen background image */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  margin: 0;
  background: #c9a77c; /* kraft-paper tone while the photo loads */
}

.backdrop img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--image-focus);
}

/* Caption for the photo: bottom-right corner, tight on a dark neutral ground */
.caption {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: min(42rem, 100%);
  padding: 0.4em 0.7em;
  background: #1c1b19;
  color: #e8e3d9;
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.45;
  text-wrap: balance;
}

.caption b {
  font-weight: 700;
}

/* Narrow screens (default): full-bleed band at the top, text above and the photo below.
   Wide landscape screens: band down the left, text left and the photo right (see @media below). */
.landing {
  min-height: 100vh;
  min-height: 100svh;
}

.band {
  padding: var(--gutter) var(--gutter) calc(var(--gutter) + var(--fade));
  background: linear-gradient(to bottom,
    rgb(var(--shade) / var(--shade-top)) 0%,
    rgb(var(--shade) / var(--shade-text)) calc(100% - var(--fade)),
    rgb(var(--shade) / 0) 100%);
}

.intro {
  color: var(--text);
  font-size: var(--text-size);
  font-weight: 300;   /* Lato Light; links are Bold */
  line-height: 1.8;
  text-wrap: pretty;   /* no lone word on the last line, evener line endings */
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

/* The name is the page's main heading, set inline so it reads as the start of the sentence */
.intro .name {
  display: inline;
  font: inherit;
  font-weight: 700;
}

/* Wide landscape screens: side by side */
@media (min-width: 1024px) and (orientation: landscape) {
  :root {
    --text-size: clamp(1.25rem, 1rem + 0.5vw, 1.5625rem);   /* about 21px at 1024 up to 25px from 1920 */
  }

  .landing {
    display: flex;
  }

  .band {
    display: flex;
    align-items: var(--col-align);
    width: calc(var(--col) + var(--gutter) + var(--fade-x));
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--gutter) calc(var(--fade-x)) var(--gutter) var(--gutter);
    background: linear-gradient(to right,
      rgb(var(--shade) / var(--shade-top)) 0%,
      rgb(var(--shade) / var(--shade-text)) calc(100% - var(--fade-x)),
      rgb(var(--shade) / 0) 100%);
  }

  .intro {
    max-width: var(--col);
  }
}

/* Links: each sits on a solid, irregular four-sided panel in its own colour (--c).
   The panel is a clipped layer behind the word (--shape is its four corners).
   On hover or focus the word and its panel rise a few pixels. */
.intro a {
  --c: var(--forest);
  --shape: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  position: relative;
  isolation: isolate;
  display: inline-block;
  white-space: nowrap;
  padding: 0 0.34em;
  margin-inline: -0.06em;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  text-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.intro a::before {
  content: "";
  position: absolute;
  inset: -0.1em 0;
  z-index: -1;
  background: var(--c);
  clip-path: var(--shape);
}

.intro a:hover,
.intro a:focus-visible {
  transform: translateY(-3px);
}

.intro a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Keeps a link and the punctuation after it together on one line */
.intro .glue {
  white-space: nowrap;
}

/* A long phrase is split into pieces (spans inside one link), each with its own
   panel, so it can wrap between pieces on narrow screens. All pieces rise together. */
.intro a.pieces {
  display: inline;
  padding: 0;
  margin: 0;
  white-space: normal;
}
.intro a.pieces::before { content: none; }

.intro a.pieces .piece {
  position: relative;
  isolation: isolate;
  display: inline-block;
  white-space: nowrap;
  padding: 0 0.34em;
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.intro a.pieces .piece::before {
  content: "";
  position: absolute;
  inset: -0.1em 0;
  z-index: -1;
  background: var(--c);
  clip-path: var(--shape);
}
.intro a.pieces .glue .piece::before { clip-path: var(--shape-2, var(--shape)); }

.intro a.pieces:hover,
.intro a.pieces:focus-visible { transform: none; }
.intro a.pieces:hover .piece,
.intro a.pieces:focus-visible .piece { transform: translateY(-3px); }

/* Touch screens have no hover: rise while the link is being tapped */
@media (hover: none) {
  .intro a:active { transform: translateY(-3px); }
  .intro a.pieces:active { transform: none; }
  .intro a.pieces:active .piece { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .intro a,
  .intro a.pieces .piece { transition: none; }
}

/* Each link's colour and panel. Corners run top-left, top-right, bottom-right, bottom-left. */
.intro a.womens-studio-workshop {        /* book maker */
  --c: var(--ochre);
  --shape: polygon(0 0.24em, 100% 0, calc(100% - 0.28em) 100%, 0.12em calc(100% - 0.1em));
}

.intro a.placearts-art-science-video {   /* young people */
  --c: var(--burnt-orange);
  --shape: polygon(0.22em 0, calc(100% - 0.08em) 0.2em, 100% calc(100% - 0.06em), 0 100%);
}

.intro a.accordion-book-project-site {   /* accordion books */
  --c: var(--forest);
  --shape: polygon(0 0.06em, calc(100% - 0.26em) 0, 100% 100%, 0.28em calc(100% - 0.18em));
}

.intro a.unfolding-practice-videos {     /* reflective practice | and creative inquiry */
  --c: var(--indigo);
  --shape: polygon(0.1em 0.18em, calc(100% - 0.16em) 0, 100% calc(100% - 0.12em), 0 100%);
  --shape-2: polygon(0 0.02em, 100% 0.2em, calc(100% - 0.22em) 100%, 0.18em calc(100% - 0.08em));
}

.intro a.art-in-transit-site {           /* metro stations as classrooms */
  --c: var(--plum);
  --shape: polygon(0.24em 0.16em, 100% 0, calc(100% - 0.08em) calc(100% - 0.24em), 0 100%);
}

.intro a.tedx-art-in-transit {           /* public art */
  --c: var(--brick);
  --shape: polygon(0 0, calc(100% - 0.22em) 0.24em, 100% 100%, 0.1em calc(100% - 0.08em));
}

.intro a.festival-of-stories-playlist {  /* story */
  --c: var(--olive);
  --shape: polygon(0.12em 0.22em, 100% 0.04em, calc(100% - 0.26em) 100%, 0 calc(100% - 0.16em));
}

.intro a.say-hello {                     /* Say hello: light panel, dark text, to set it apart as the one action */
  --c: var(--text);
  --shape: polygon(0 0.14em, calc(100% - 0.1em) 0, 100% calc(100% - 0.16em), 0.16em 100%);
  color: rgb(var(--shade));
}
