/* PSG Studio */

:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --band: #f1f1f1;
  --text: #111111;
  --muted: #636363;
  --rule: #a4a4a4;
  --slate: #515d69;       /* brand: site title, footer */
  --slate-light: #9da9b4; /* brand: secondary buttons */
  --sage: #b5bdbc;        /* brand: tagline, footer accents */
  --accent: #d8613c;      /* required-field marker */

  --font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Cantarell, Ubuntu, Roboto, Noto, Arial, sans-serif;
  --step-0: 1.05rem;
  --step-small: 0.9rem;
  --step-1: clamp(1.39rem, 1.2rem + 0.9vw, 1.85rem);
  --step-2: clamp(1.85rem, 1.6rem + 1.25vw, 2.5rem);
  --step-3: clamp(2.5rem, 2.2rem + 1.5vw, 3.27rem);

  --gutter: min(6.5rem, 8vw);
  --narrow: 620px;
  --wide: 1280px;
  --radius: .33rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }

h1, h2, h3 { font-weight: 400; line-height: 1.1; margin: 1.6em 0 .6em; }
h1 { font-size: var(--step-3); line-height: 1.15; }
h2 { font-size: var(--step-2); scroll-margin-top: 3rem; }
h3 { font-size: var(--step-1); scroll-margin-top: 3rem; }
p, ul, ol, figure { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.25rem; }
figure { margin-inline: 0; }
a { color: var(--text); text-decoration: underline; }
a:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.small { font-size: var(--step-small); }
.center { text-align: center; }

button, .button {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: .6rem 1rem;
  font: inherit;
  font-size: var(--step-small);
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--muted); border-color: var(--muted); }

.skip-link { position: absolute; left: -999em; }
.skip-link:focus { left: 1rem; top: 1rem; padding: .75rem 1rem; background: #fff; z-index: 100; }

/* Layout */
.wrap { max-width: var(--wide); margin: 0 auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.band { padding-block: var(--gutter); }
.band-white { background: var(--surface); }
.band-grey { background: var(--band); }
.band > .wrap > :first-child, .page > :first-child { margin-top: 0; }

/* Header */
.site-header { padding-block: 20px; }
.site-header__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: min(1.5rem, 2vw); text-decoration: none; }
.brand img { display: block; width: 60px; height: 60px; }
.brand__name { display: block; color: var(--slate); font-weight: 500; line-height: 1.1; }
.brand__tagline { display: block; color: var(--sage); font-size: .75rem; line-height: .9; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: min(1.5rem, 2vw); }
.site-nav a { font-weight: 500; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
.site-nav__toggle { display: none; background: none; border: 0; color: inherit; padding: .5rem; }
.site-nav__toggle:hover { background: none; }
.site-nav__toggle svg { display: block; width: 24px; height: 24px; }
@media (max-width: 599px) {
  .site-nav { position: relative; }
  .site-nav__toggle { display: block; }
  .site-nav ul { display: none; position: absolute; right: 0; flex-direction: column; background: var(--surface); padding: 1rem 1.5rem; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 10; }
  .site-nav.is-open ul { display: flex; }
}

/* Footer */
.site-footer { background: var(--slate); color: var(--surface); padding-block: min(2.5rem, 3vw); margin-top: auto; }
.site-footer a { color: var(--surface); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer__brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.site-footer__brand img { width: 54px; height: 54px; object-fit: contain; }
.site-footer__brand p { margin: 0; color: var(--sage); font-size: var(--step-small); line-height: 1.2; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; font-size: var(--step-small); }

/* Regular pages */
.page { padding-block: var(--gutter); }
.page h1 { text-align: center; margin-bottom: min(2.5rem, 3vw); }
.page .updated { color: var(--muted); font-size: var(--step-small); }
.page .jump { font-size: var(--step-small); }

/* Home */
.lede { font-weight: 700; font-style: italic; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: min(2.5rem, 3vw); }
.cards h3 { font-size: var(--step-0); font-weight: 700; margin-top: 0; }
.cta { max-width: var(--narrow); margin-top: min(4rem, 5vw); }
.cta h2 { font-size: var(--step-1); font-weight: 500; }

/* Newsletter signup (Buttondown embed) */
.signup { width: 100%; height: 220px; border: 1px solid #ccc; display: block; margin-bottom: 1.1rem; background: var(--surface); }

/* Callout (e.g. the note at the top of the contact page) */
.note { background: var(--surface); border-left: 4px solid var(--slate); padding: .75rem 1rem; margin-bottom: 2rem; }

/* Contact form */
.contact-form { display: grid; gap: 1.25rem; margin-bottom: 2rem; }
.contact-form label { display: block; font-weight: 600; font-size: var(--step-small); margin-bottom: .35rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid #949494; border-radius: var(--radius);
  font: inherit; background: var(--surface); color: inherit;
}
.contact-form textarea { min-height: 10rem; resize: vertical; }
.contact-form .req { color: var(--accent); }
.contact-form .formcontext { position: absolute; left: -999em; width: 1em; overflow: hidden; }
.contact-form__status { margin: 0; font-weight: 500; }
.contact-form__status[data-state="error"] { color: #b32d2e; }
