/* The Unposted Week - editorial, mobile-first */

:root {
  --bg: #FAF7F2;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --border: #d9d2c8;
  --accent: #1a1a1a;
  --accent-hover: #333;
  --placeholder-bg: #efeae2;
  --max: 38rem;
  --space: clamp(1.25rem, 4vw, 2rem);
  --serif: "Libre Baskerville", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  opacity: 0.7;
}

.wrap {
  width: min(100% - 2 * var(--space), var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  padding: calc(var(--space) * 1.5) 0 var(--space);
}

.logo {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.logo:hover {
  opacity: 1;
  color: var(--text);
}

/* Hero / intro */
.hero {
  padding: clamp(2rem, 8vw, 4rem) 0 clamp(2.5rem, 6vw, 3.5rem);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.sub {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 2rem;
  line-height: 1.4;
}

.prose p {
  margin: 0 0 1.25rem;
  color: var(--text);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Image placeholder */
.photo-placeholder {
  margin: clamp(2.5rem, 6vw, 3.5rem) 0;
  aspect-ratio: 3 / 2;
  background: var(--placeholder-bg);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space);
}

.photo-placeholder span {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 16rem;
  line-height: 1.5;
}

/* Form */
.form-section {
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(3rem, 8vw, 5rem);
  scroll-margin-top: 1.5rem;
}

.form-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.form-lede {
  color: var(--muted);
  margin: 0 0 1.75rem;
  font-size: 1rem;
}

.reset-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reset-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.reset-form label .req {
  color: var(--text);
  font-weight: 600;
}

.reset-form input[type="text"],
.reset-form input[type="email"] {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
  width: 100%;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.reset-form input::placeholder {
  color: #9a9388;
}

.reset-form input:focus {
  outline: none;
  border-bottom-color: var(--text);
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.95rem 1.5rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  width: 100%;
  margin-top: 0.5rem;
}

.btn:hover {
  background: var(--accent-hover);
  opacity: 1;
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
  width: auto;
  min-width: 12rem;
}

.btn-ghost:hover {
  background: var(--text);
  color: var(--bg);
}

.privacy {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Kit formkit alerts inside our form */
.reset-form .formkit-alert {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-radius: 0;
}

.reset-form .formkit-alert:empty {
  display: none;
}

.reset-form .formkit-alert-error {
  background: #f5ebe6;
  color: #8a3a2a;
  border: 1px solid #e0c4b8;
}

.reset-form .formkit-alert-success {
  background: #e8f0e6;
  color: #2f5a2a;
  border: 1px solid #b8d0b4;
}

.reset-form .formkit-spinner {
  display: none;
}

.reset-form .formkit-submit[data-active] .formkit-spinner {
  display: none;
}

.reset-form .formkit-powered-by-convertkit-container {
  display: none;
}

/* Quiet section */
.quiet {
  border-top: 1px solid var(--border);
  padding: clamp(3rem, 8vw, 5rem) 0;
  text-align: center;
}

.quiet h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  margin: 0 0 1rem;
  line-height: 1.3;
}

.quiet p {
  margin: 0 auto 1.75rem;
  color: var(--muted);
  max-width: 28rem;
}

/* Footer */
.site-footer {
  padding: 0 0 calc(var(--space) * 2);
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* Thanks page */
.thanks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.thanks-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(3rem, 12vw, 6rem) 0;
}

.thanks-main h1 {
  margin-bottom: 0.5rem;
}

.thanks-main .sub {
  margin-bottom: 1.75rem;
}

.thanks-main .prose {
  margin-bottom: 2rem;
}

.thanks-note {
  font-size: 0.9375rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .btn {
    width: auto;
    min-width: 14rem;
  }

  .reset-form {
    max-width: 22rem;
  }
}
