/* ---------------------------------------------------------------
   Design tokens — ported from the "Long Exposure" system being
   built for the main Ewan Crosbie Photography site, so this page
   reads as part of the same world rather than a bolted-on utility.
   Palette/type values are duplicated intentionally: this project is
   meant to stand alone and outlive the temporary-page use case.
----------------------------------------------------------------- */
:root {
  --ink: #15181a;
  --ink-cool: #1a2126;
  --paper: #ede6d6;
  --paper-dim: #a89f8c;
  --paper-faint: #6d6656;
  --mist: #8296a0;
  --rust: #a8623f;

  --line: rgba(237, 230, 214, 0.12);
  --line-strong: rgba(237, 230, 214, 0.24);

  --font-serif: "Bodoni Moda", "Didot", "Bodoni MT", Georgia, serif;
  --font-heading-sub: "Montserrat", -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Geist", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(20px, 5vw, 72px);

  --ease-quiet: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.4s;
  --dur-med: 0.8s;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection {
  background: rgba(130, 150, 160, 0.28);
  color: var(--paper);
}

:focus-visible {
  outline: 1px solid var(--mist);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------------------------------------------------------
   Page shell / background photograph
----------------------------------------------------------------- */
.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* matches the main site's Newsletter section: an isolated stacking
     context so the photo/overlay/content layers below stack predictably
     via plain (non-negative) z-index, same as components/Newsletter.module.css */
  isolation: isolate;
}

.page__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--bg-pos-desktop, center center);
}

.page__scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(21, 24, 26, var(--scrim-opacity, 0.82));
}

/* ---------------------------------------------------------------
   Content
----------------------------------------------------------------- */
.page__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(96px, 14vh, 150px) var(--gutter) 60px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.brand__line1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4.2vw, 2.5rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--paper);
}

.brand__line2 {
  margin-top: 8px;
  font-family: var(--font-heading-sub);
  font-weight: 500;
  font-size: clamp(0.68rem, 1.1vw, 0.85rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.fieldnotes {
  margin: clamp(32px, 6vh, 56px) 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.intro {
  margin: 18px 0 0;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: var(--paper-dim);
  max-width: 38ch;
}

/* ---------------------------------------------------------------
   Form
----------------------------------------------------------------- */
.form {
  margin-top: clamp(36px, 6vh, 52px);
  width: 100%;
  max-width: 420px;
}

.form__row {
  display: flex;
  gap: 20px;
  text-align: left;
}

.field {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field__label {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.field__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 8px 2px 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--paper);
  transition: border-color var(--dur-fast) var(--ease-quiet);
}

.field__input::placeholder {
  color: var(--paper-faint);
}

.field__input:focus {
  outline: none;
  border-color: var(--mist);
}

.field__input[aria-invalid="true"] {
  border-color: var(--rust);
}

.field__error {
  display: block;
  min-height: 16px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  color: var(--rust);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-quiet);
}

.field__error[data-visible="true"] {
  opacity: 1;
}

.submit {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  margin: 28px auto 0;
  font-family: var(--font-heading-sub);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  /* filled state uses the same colour as the EWAN CROSBIE / Field Notes
     type, inverted (dark text on light fill) for contrast */
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
  padding: 13px 34px;
  transition: background-color var(--dur-fast) var(--ease-quiet),
    border-color var(--dur-fast) var(--ease-quiet),
    color var(--dur-fast) var(--ease-quiet), opacity var(--dur-fast) var(--ease-quiet);
}

.submit:hover,
.submit:focus-visible {
  /* no fill on hover — text stays the same paper colour as the heading type */
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}

.submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.form__status {
  min-height: 18px;
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--rust);
  text-align: center;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-quiet);
}

.form__status[data-visible="true"] {
  opacity: 1;
}

.privacy {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  color: var(--paper-faint);
  text-align: center;
}

/* ---------------------------------------------------------------
   Success state
----------------------------------------------------------------- */
.success {
  margin-top: clamp(36px, 6vh, 52px);
  max-width: 420px;
}

.success__heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  color: var(--paper);
}

.success__body {
  margin: 10px 0 0;
  color: var(--paper-dim);
}

/* ---------------------------------------------------------------
   Footer
----------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 32px var(--gutter) 28px;
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer__brand {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--paper);
  transition: color var(--dur-fast) var(--ease-quiet);
}

.footer__brand:hover,
.footer__brand:focus-visible {
  color: var(--mist);
}

.footer__links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.footer__links a {
  transition: color var(--dur-fast) var(--ease-quiet);
}

.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--paper);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  max-width: 1400px;
  margin: 20px auto 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  color: var(--paper-faint);
}

/* Steady Drift credit underline — reused verbatim from the main
   site's Footer.module.css (.credit). Do not invent a new hover
   treatment here; if the main site's animation changes, mirror it. */
.footer__credit {
  position: relative;
  width: fit-content;
  color: var(--paper-faint);
}

.footer__credit::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer__credit:hover::after,
.footer__credit:focus-visible::after {
  transform: scaleX(1);
}

/* ---------------------------------------------------------------
   Mobile
----------------------------------------------------------------- */
@media (max-width: 640px) {
  .page__bg {
    object-position: var(--bg-pos-mobile, center center);
  }

  .page__content {
    padding-top: 84px;
    padding-bottom: 48px;
  }

  .form__row {
    flex-direction: column;
    gap: 22px;
  }

  .footer__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__meta {
    flex-direction: column;
  }
}
