/* The website's page styles - the landing composition the home page and
   the error pages share, and the site footer. Deliberately small: the
   marketing site's real design arrives with the brand skill (spec D9) */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--po-bg);
  color: var(--po-text);
  font-family: var(--po-font);
  font-size: 17px;
  line-height: 1.6;
}

.landing {
  flex: 1;
  max-width: 44rem;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.landing__eyebrow,
.landing__code {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--po-primary);
}

.landing h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--po-ink);
  text-wrap: balance;
}

.landing p {
  margin: 0;
  max-width: 34rem;
}

.landing__ref code {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  background: var(--po-surface);
}

.landing__actions {
  padding-top: 1rem;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--po-radius);
  background: var(--po-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--po-shadow);
}

.button:hover,
.button:focus-visible {
  background: var(--po-ink);
  outline: 2px solid var(--po-accent);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--po-border);
  font-size: 0.9rem;
  color: var(--po-text-muted);
}

.site-footer nav {
  display: flex;
  gap: 1.25rem;
}

.site-footer a {
  color: inherit;
}

/* The landing page's centred variant - the home page's whole
   composition. The base .landing is a reading column pinned to the top
   for the error pages, which carry prose; this one centres the mark on
   both axes, which is what flex:1 on the base rule makes possible */
.landing--centred {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
  padding-block: 2rem;
}

.landing--centred .landing__actions {
  padding-top: 0;
}

/* The mark. max-width keeps it inside a narrow viewport even though the
   partial states a pixel size - an SVG with width and height attributes
   ignores the box otherwise */
.logo {
  display: block;
  max-width: 100%;
  height: auto;
}

/* The masthead every page but the landing carries */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--po-border);
}

.site-header__mark {
  display: flex;
  line-height: 0;
}

/* A button that recedes - the masthead action, where the page's own
   call to action has not happened yet */
.button--quiet {
  background: transparent;
  color: var(--po-primary);
  box-shadow: none;
  border: 1px solid var(--po-border);
}

.button--quiet:hover,
.button--quiet:focus-visible {
  background: var(--po-primary);
  color: #fff;
}

/* The modal. A div overlay rather than <dialog> - see layout/_modal.php
   for why. z-index sits above everything the site has; there is nothing
   else stacked */
.po-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(18, 25, 29, 0.42);
}

.po-modal__panel {
  display: flex;
  flex-direction: column;
  width: min(30rem, 100%);
  max-height: 100%;
  overflow: hidden;
  background: var(--po-surface);
  border-radius: var(--po-radius);
  box-shadow: 0 12px 34px rgba(18, 25, 29, 0.28);
  text-align: left;
}

.po-modal__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
}

.po-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--po-ink);
}

.po-modal__x {
  padding: 0.2rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--po-text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.po-modal__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.po-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0 1.5rem 1.25rem;
}

/* Fields. The note line is always present and usually empty, so a
   refusal SUBSTITUTES rather than growing the dialog and shifting the
   buttons under the pointer that is about to click them */
.po-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.po-field__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--po-ink);
}

.po-field__input {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  background: var(--po-surface);
  color: var(--po-text);
  font-family: inherit;
  font-size: 1rem;
}

.po-field__input:focus-visible {
  outline: 2px solid var(--po-accent);
  outline-offset: 1px;
}

.po-field__note {
  min-height: 1.1rem;
  font-size: 0.82rem;
  color: var(--po-text-muted);
}

.po-field__note.is-error {
  color: var(--po-warn);
}

/* The honeypot. Hidden from sight and from assistive technology, but
   NOT with display:none or hidden - some bots skip those deliberately,
   and a field that is merely off-screen is the one they still fill */
.po-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
