/* cascadia.design: quiet, mobile-first, matched to the business cards.
   Jost (a Futura-style geometric sans) throughout, navy as the only accent.
   The paintings carry the colour. */

@font-face {
  font-family: "Jost";
  src: url("/static/fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #1f1f26;
  --muted: #6b6b75;
  --rule: #e6e6ea;
  --field: #b8b8c0;
  --navy: #2b2e5e; /* the card's navy: rules, hover, focus, footer */
  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --text: 34rem;
  --wide: 76rem;
  --gutter: 1.25rem;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font);
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible {
  outline: 1px solid var(--navy);
  outline-offset: 4px;
}

h1, h2 { font-weight: 400; line-height: 1.2; }

/* ------------------------------------------------ masthead */

.masthead {
  display: flex;
  justify-content: center;
  padding: 5rem var(--gutter) 2rem;
}
.masthead h1 {
  margin: 0;
  padding-right: 1rem;
  border-right: 9px solid var(--navy); /* about a third of the cap height, as on the card */
  line-height: 0;
}
.masthead .name {
  width: clamp(6.75rem, 28vw, 9.375rem);
  height: auto;
  overflow: visible;
  fill: var(--ink);
  font-family: var(--font);
  font-size: 40px; /* in SVG units: the viewBox is 150 wide */
  font-weight: 400;
}
.masthead .name .first { font-weight: 450; } /* the card sets "Katie" a little heavier */

/* ------------------------------------------------ text column */

.art > :not(.gallery, .figure, .lightbox),
.page,
.contact {
  max-width: var(--text);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page { padding-block: 5rem; }

/* ------------------------------------------------ gallery */

.gallery {
  max-width: var(--wide);
  margin: 4rem auto;
  padding-inline: var(--gutter);
  /* A centred, wrapping row, so a short last row (or two paintings) sits in the middle. */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4.5rem;
}
.painting { width: 100%; }
@media (min-width: 44rem) {
  .gallery { gap: 5rem 3rem; --gutter: 2rem; }
  .painting { width: calc((100% - 3rem) / 2); }
}
@media (min-width: 70rem) {
  .gallery { gap: 6rem 4rem; }
  .painting { width: calc((100% - 8rem) / 3); }
}

.painting { margin: 0; scroll-margin-top: 3rem; }
.painting a { display: block; }
.painting img { width: 100%; transition: opacity 0.2s; }
.painting a:hover img { opacity: 0.9; }

figcaption, .lightbox-caption {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.figure { max-width: var(--wide); margin: 3rem auto; padding-inline: var(--gutter); }

/* ------------------------------------------------ lightbox (CSS :target, no JS) */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  padding: 1.25rem 1.25rem 4.5rem;
  background: rgb(255 255 255 / 0.98);
}
.lightbox:target {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
body:has(.lightbox:target) { overflow: hidden; }

.lightbox-backdrop { position: absolute; inset: 0; }

.lightbox img {
  position: relative; /* above the backdrop link */
  width: auto;
  max-height: calc(100vh - 8rem);
  max-height: calc(100dvh - 8rem);
}
.lightbox-caption { position: relative; text-align: center; }

.lightbox-nav {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem 1rem;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lightbox-nav a {
  padding: 0.9rem 1rem; /* generous touch target */
  text-decoration: none;
}
.lightbox-nav a[aria-label] { font-size: 1.375rem; letter-spacing: 0; }

/* ------------------------------------------------ contact */

.contact {
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}
.contact h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.16em;
}
.contact form { margin-top: 2rem; }
.contact form p { margin: 0 0 1.75rem; }

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

input, textarea {
  width: 100%;
  padding: 0.5rem 0;
  font: 400 1rem/1.5 var(--font); /* 16px or larger stops iOS zooming in */
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--field);
  border-radius: 0;
}
textarea { resize: vertical; }
input:focus, textarea:focus {
  outline: none;
  border-bottom-color: var(--navy);
  box-shadow: 0 1px 0 var(--navy);
}

button {
  padding: 0.85rem 2.25rem;
  font: 400 0.75rem/1 var(--font);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 0;
  cursor: pointer;
}
button:hover { color: var(--navy); background: transparent; }

/* Honeypot: off-screen for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------ footer: the back of the card */

.footer {
  margin-top: 6rem;
  padding: 3.5rem var(--gutter) 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  background: var(--navy);
  color: #ffffff;
}
@media (min-width: 44rem) {
  .footer { padding-inline: 3rem; }
}

.brand {
  margin: 0;
  padding-left: 0.9rem;
  border-left: 2px solid #ffffff;
}
.brand-name {
  display: block;
  font-size: 1.5rem;
  line-height: 1.15;
}
.brand-tag {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.copyright {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
