/* =========================
   Fonts
========================= */
@font-face {
  font-family: "Akzidenz Grotesk";
  src:
    url("fonts/akzidenz-grotesk-roman-webfont.woff2") format("woff2"),
    url("fonts/akzidenz-grotesk-roman-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: Times, serif;
  margin-top: -0.5vh;
  margin-left: 2vw;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: black;
}

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

p {
  margin-top: 0;
}

/* =========================
   Typography
========================= */
h1 {
  font-family: "Akzidenz Grotesk", sans-serif;
  font-size: 3em;
  font-weight: normal;
  letter-spacing: -0.02em;
}

.hr {
  display: inline-block;
  line-height: 42px;
}
.hr::before {
  content: "";
  display: block;
  border-top: 3px solid black;
}

/* =========================
   Layout
========================= */
main {
  flex: 1;
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
} /* grows to push footer down if not fixed */

.center-block {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: flex-start;
  position: relative;
  max-width: 50vw !important;
  margin-bottom: 0;
}

/* =========================
   Newsletter
========================= */
footer.newsletter {
  font-family: "Akzidenz Grotesk", sans-serif;

  /* fixed overlay bar */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: #fff;
  border-top: 1px solid #000;
  padding: 8px 2vw;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);

  --row-h: 28px; /* 28–30px works well with 0.9rem */
}

@supports (padding: max(0px)) {
  footer.newsletter {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

/* Grid: label | input | button
   - middle track shrinks to 0 on tiny screens, but is capped on desktop */
footer.newsletter form {
  display: grid;
  grid-template-columns:
    max-content minmax(0, clamp(18ch, 40vw, 32ch))
    max-content;
  grid-template-areas: "label input button";
  column-gap: 6px;
  align-items: stretch;
  min-height: var(--row-h);
}

/* Match font size across label, input, and button */
footer.newsletter label,
footer.newsletter input[type="email"],
footer.newsletter button {
  font-size: 0.9rem;
  font-weight: 400;
  font-family: inherit;
  height: var(--row-h);
}

/* Label */
footer.newsletter label {
  grid-area: label;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Email input */
footer.newsletter input[type="email"] {
  grid-area: input;
  width: 100%;
  min-width: 0;
  line-height: 1.1;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid #000;
  background: #fff;
  color: #000;
}

/* Submit button */
footer.newsletter button {
  grid-area: button;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  white-space: nowrap;
  line-height: 1;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Thank-you message: sits in the BUTTON cell, hidden by default */
#message {
  grid-area: label; /* ← same slot as the button */
  display: none; /* hidden until success */
  height: var(--row-h);
  padding: 0;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 400;
  /* IMPORTANT: don't center the whole row — keep default positioning */
  /* no width:100%, no justify-self:center */
}

/* After success: hide controls, show message exactly where the button was */
footer.newsletter form.submitted > label,
footer.newsletter form.submitted > input[type="email"],
footer.newsletter form.submitted > button {
  display: none !important;
}

footer.newsletter form.submitted > #message {
  display: flex !important; /* render like a control */
  align-items: center;
  justify-content: center;
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
  .center-block {
    max-width: 100% !important;
    width: 100%;
  }
  .center-block img {
    width: 100% !important;
    height: auto !important;
  }
}
