/* Public surfaces — landing and auth. Consumes the global /theme.css tokens;
   no hex brand vocabulary here (ADR-0005, #261). Pinned to light via the
   .ished-light class so MonsterUI's dark-mode script cannot flip these pages.

   The public face is the front matter of the method book (#263): ivory page,
   printed hairlines, one brass rectangle. The landing is the title page —
   promise set in Baskerville at left, the bandstand as a framed plate at
   right — then the contents, the access list, and the back cover. The auth
   pages are the book's first page: fill-in fields on the ivory, one brass
   control. */

.ished-light,
.ished-landing,
.ished-auth-page {
  color: var(--app-ink);
  background: var(--app-paper);
  font-family: var(--font-sans);
  color-scheme: light;
}

.ished-landing,
.ished-auth-page {
  min-height: 100dvh;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ished-landing {
  --pad: clamp(1.25rem, 4vw, 4rem);
  --max: 72rem;
}

.ished-landing *, .ished-landing *::before, .ished-landing *::after,
.ished-auth-page *, .ished-auth-page *::before, .ished-auth-page *::after { box-sizing: border-box; }

.ished-landing ::selection, .ished-auth-page ::selection {
  background: var(--app-accent);
  color: var(--app-ink);
}

.ished-landing a { text-decoration: none; }

.ished-landing a:focus-visible, .ished-auth-page a:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 3px;
}

.ished-landing-skip {
  position: absolute; top: .75rem; left: 1.25rem; z-index: 100;
  padding: .75rem 1rem; background: var(--app-paper); color: var(--app-ink);
  border: 1px solid var(--app-line); border-radius: .3rem;
  font-size: .875rem; font-weight: 600; font-family: var(--font-sans);
  transform: translateY(-200%);
}
.ished-landing-skip:focus { transform: none; outline: 2px solid var(--app-ink); outline-offset: 2px; }

/* — Running head — */

.ished-landing-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.1rem clamp(1.25rem, 2.5vw, 2rem);
  border-bottom: 1px solid var(--app-line);
  color: var(--app-ink);
}
.ished-landing-brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; color: inherit; }
.ished-landing-logo { display: block; border-radius: .25rem; }
.ished-landing-wordmark { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; }
.ished-landing-nav { display: flex; align-items: center; gap: 2rem; }
.ished-landing-nav-link, .ished-landing-login {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: .8125rem; font-weight: 600; color: inherit;
}
.ished-landing-login { border: 1px solid var(--app-line); padding-inline: 1.1rem; border-radius: .3rem; transition: border-color 120ms ease; }
.ished-landing-nav-link:hover { text-decoration: underline; text-underline-offset: .3em; }
.ished-landing-login:hover { border-color: var(--app-ink); }

/* — Sections — */

.ished-landing-container {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.ished-landing-section { padding-block: clamp(3.5rem, 7vw, 6rem); scroll-margin-top: 1rem; }
.ished-landing-section-ivory { background: var(--app-paper); }
.ished-landing-section-paper { background: var(--app-paper-strong); }
.ished-landing-section-ink { background: var(--app-ink); color: var(--app-paper); }

.ished-landing-h2 {
  margin: 0; color: inherit; font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3vw, 2.7rem); font-weight: 400;
  line-height: 1.25; letter-spacing: -.035em; text-wrap: balance;
}
.ished-landing-section-intro { margin: 1rem 0 2.75rem; color: var(--app-ink-soft); font-size: 1rem; line-height: 1.7; }
.ished-landing-mute { margin: 0; color: var(--app-ink-soft); font-size: .9375rem; line-height: 1.8; }

/* — Title page — */

.ished-landing-frontispiece {
  display: flex;
  min-height: max(34rem, calc(100svh - 73px));
}
.ished-landing-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
}
.ished-landing-title {
  display: grid;
  justify-items: start;
  align-self: center;
  align-content: center;
  gap: 1.5rem;
  padding: 0 clamp(2rem, 4.5vw, 4rem) 0 max(var(--pad), calc((100vw - var(--max)) / 2));
}
.ished-landing-h1 {
  margin: 0; color: inherit; font-family: var(--font-serif);
  font-size: clamp(2.75rem, 4.8vw, 4.5rem); font-weight: 400;
  line-height: 1.08; letter-spacing: -.045em;
}
.ished-landing-lede { margin: 0; max-width: 26rem; font-size: 1.0625rem; line-height: 1.75; color: var(--app-ink-soft); }
.ished-landing-title-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.75rem; }
.ished-landing-title-note { margin: 0; max-width: 26rem; font-size: .8125rem; line-height: 1.6; color: var(--app-ink-soft); }

.ished-landing-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.4rem;
  padding: .9rem 1.6rem; background: var(--app-accent); color: var(--app-ink);
  font-size: .9375rem; font-weight: 700;
  border: 1px solid transparent; border-radius: .3rem;
  transition: background-color 120ms ease, transform 120ms ease;
}
.ished-landing-cta:hover { background: var(--app-accent-hover); }
.ished-landing-cta:active { transform: translateY(1px); }
.ished-landing-cta:focus-visible { outline: 2px solid var(--app-ink); outline-offset: 2px; }

.ished-landing-signin {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: .875rem; font-weight: 600; color: var(--app-ink);
}
.ished-landing-signin:hover { text-decoration: underline; text-underline-offset: .3em; }

/* The bandstand is the right-hand page: full-bleed to the screen edge,
   divided from the promise by the printed rule, captioned over the image. */
.ished-landing-figure {
  position: relative;
  border-left: 1px solid var(--app-line);
  min-height: 100%;
}
.ished-landing-figure::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 35%;
  background: linear-gradient(180deg, transparent,
    color-mix(in oklch, var(--app-ink) 70%, transparent));
  pointer-events: none;
}
.ished-landing-plate { position: absolute; inset: 0; }
.ished-landing-plate-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ished-landing-plate-caption {
  position: absolute;
  z-index: 1;
  bottom: 1.5rem; left: 1.75rem;
  font-family: var(--font-serif); font-style: normal;
  font-size: .9375rem; line-height: 1.5;
  color: var(--app-paper);
}

/* — Contents — */

.ished-landing-rows { border-bottom: 1px solid var(--app-line); }
.ished-landing-row {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: 3rem;
  align-items: baseline;
  padding-block: 1.9rem;
  border-top: 1px solid var(--app-line);
}
.ished-landing-row-title {
  margin: 0; color: inherit;
  font-family: var(--font-serif);
  font-size: 1.375rem; font-weight: 400; line-height: 1.35; letter-spacing: -.015em;
}

/* — Access — */

.ished-landing-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ished-landing-tier {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 1rem;
  padding-inline: clamp(2rem, 4.5vw, 4rem);
}
.ished-landing-tier:first-child { padding-left: 0; }
.ished-landing-tier:last-child { padding-right: 0; }
.ished-landing-tier + .ished-landing-tier { border-left: 1px solid var(--app-line); }
.ished-landing-tier-title {
  margin: 0; color: inherit;
  font-family: var(--font-serif);
  font-size: 1.75rem; font-weight: 400; line-height: 1.3; letter-spacing: -.02em;
}
.ished-landing-price { margin: 0; color: inherit; font-family: var(--font-serif); font-size: 2.25rem; font-weight: 400; line-height: 1.2; }
.ished-landing-coming-soon {
  font-family: var(--font-sans); font-size: .8125rem; font-weight: 600;
  padding: .45rem .9rem; border: 1px solid var(--app-line); border-radius: 2rem;
  color: var(--app-ink-soft);
}
.ished-landing-tier-description { min-height: 3.5rem; margin: 0; max-width: 26rem; color: var(--app-ink-soft); font-size: .9375rem; line-height: 1.75; }
.ished-landing-inclusions { list-style: none; margin: 0; padding: 0; width: 100%; }
.ished-landing-inclusions li { padding-block: .3rem; font-size: .9375rem; line-height: 1.7; color: var(--app-ink-soft); }
.ished-landing-tier-action { margin-top: .75rem; min-height: 3.4rem; display: flex; align-items: center; }
.ished-landing-paid-note { margin-top: .75rem; max-width: 24rem; color: var(--app-ink-soft); font-size: .875rem; line-height: 1.7; border-top: 1px solid var(--app-line); padding-top: 1rem; }

/* — Back cover and colophon — */

.ished-landing-closing { display: grid; justify-items: center; text-align: center; gap: 1.5rem; }
.ished-landing-closing .ished-landing-h2 { color: var(--app-paper); }
.ished-landing-closing-copy { margin: 0; max-width: 30rem; line-height: 1.8; font-size: .9375rem; color: color-mix(in oklch, var(--app-paper) 72%, transparent); }

.ished-landing-footer {
  background: var(--app-ink); color: var(--app-paper);
  border-top: 1px solid color-mix(in oklch, var(--app-paper) 20%, transparent);
  padding-block: 1.25rem;
}
.ished-landing-footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.ished-landing-footer-brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.0625rem; }
.ished-landing-footer .ished-landing-mute { color: color-mix(in oklch, var(--app-paper) 60%, transparent); font-size: .8125rem; }
.ished-landing-footer-login {
  margin-left: auto;
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: .8125rem; font-weight: 600; color: var(--app-paper);
}
.ished-landing-footer-login:hover { text-decoration: underline; text-underline-offset: .3em; }

/* — Auth: the book's first page — */

.ished-auth-page {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .ished-auth-page {
    grid-template-columns: minmax(0, 1fr) minmax(28rem, 34rem);
  }
}

/* —— Photo panel —— */

.ished-auth-photo {
  position: relative;
  isolation: isolate;
  min-height: 16rem;
  background: var(--app-ink);
}

.ished-auth-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
  display: block;
}

.ished-auth-photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 8, 6, 0.55) 0%,
    rgba(10, 8, 6, 0.25) 45%,
    rgba(10, 8, 6, 0.8) 100%
  );
}

.ished-auth-photo-inner {
  position: relative;
  z-index: 1;
  min-height: 16rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  align-content: space-between;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  color: var(--app-paper);
}

@media (min-width: 1024px) {
  .ished-auth-photo,
  .ished-auth-photo-inner {
    min-height: 100dvh;
  }
}

.ished-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  justify-self: start;
  color: var(--app-paper);
  text-decoration: none;
}

.ished-auth-brand:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 3px;
}

.ished-auth-logo {
  display: block;
  border-radius: 0.35rem;
}

.ished-auth-wordmark {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ished-auth-statement {
  margin: 0;
  align-self: end;
  max-width: 26rem;
  color: var(--app-paper);
  opacity: 0.92;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.5rem);
  line-height: 1.5;
}

/* —— Form panel —— */

.ished-auth-panel {
  background: var(--app-paper);
  border-top: 1px solid var(--app-line);
  display: flex;
  min-width: 0;
}

@media (min-width: 1024px) {
  .ished-auth-panel {
    border-top: 0;
    border-left: 1px solid var(--app-line);
  }
}

.ished-auth-form-wrap {
  margin: auto;
  width: 100%;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3rem);
}

.ished-auth-form-region {
  width: min(24rem, 100%);
  min-width: 0;
  margin-inline: auto;
  display: grid;
}

.ished-auth-shell {
  display: grid;
}

.ished-auth-page .ished-auth-title {
  margin: 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--app-line);
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.85rem, 1.45rem + 1.2vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--app-ink);
}

.ished-auth-subtitle {
  margin: 1.1rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--app-ink-soft);
}

.ished-auth-form-block {
  margin-top: 2rem;
  display: grid;
}

/* Fill-in fields: the label above, the answer on a printed rule. */

.ished-auth-fields {
  display: grid;
  gap: 1.4rem;
}

.ished-auth-fields .uk-form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--app-ink-soft);
}

.ished-auth-fields .uk-input {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--app-line);
  box-shadow: none;
  padding: 0.6rem 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--app-ink);
  caret-color: var(--app-accent);
  transition: border-color 120ms ease;
}

.ished-auth-fields .uk-input::placeholder {
  color: color-mix(in srgb, var(--app-ink-soft) 55%, transparent);
}

.ished-auth-fields .uk-input:hover {
  border-bottom-color: var(--app-ink-soft);
}

.ished-auth-fields .uk-input:focus {
  outline: none;
  border-bottom-color: var(--app-accent);
  box-shadow: 0 1px 0 0 var(--app-accent);
}

.ished-auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 12rem;
  min-height: 3.4rem;
  margin-top: 0.5rem;
  padding: 0.8rem 1.6rem;
  background: var(--app-accent);
  color: var(--app-ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}

.ished-auth-submit:hover {
  background: var(--app-accent-hover);
}

.ished-auth-submit:active {
  transform: translateY(1px);
}

.ished-auth-submit:focus-visible {
  outline: 2px solid var(--app-ink);
  outline-offset: 2px;
}

.ished-auth-switch {
  margin: 1.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--app-ink-soft);
}

.ished-auth-switch-link {
  color: var(--app-ink);
  font-weight: 600;
}

.ished-auth-switch-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.ished-auth-switch-link:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 3px;
}

/* The Launch Notification signup, set off by a printed rule. */

.ished-auth-notify {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--app-line);
  display: grid;
  gap: 1.1rem;
}

.ished-auth-notify-prompt {
  margin: 0;
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--app-ink-soft);
}

.ished-auth-notify .ished-auth-fields {
  gap: 1.2rem;
}

.ished-auth-notify-done {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--app-ink);
}

/* — Responsive — */

@media (max-width: 900px) {
  .ished-landing-spread {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ished-landing-title {
    padding: 0 var(--pad);
  }

  .ished-landing-frontispiece {
    min-height: 0;
    padding-top: 2.75rem;
  }

  .ished-landing-figure {
    border-left: 0;
    border-top: 1px solid var(--app-line);
    margin-top: 3rem;
    min-height: 0;
    aspect-ratio: 3500 / 2333;
  }

  .ished-landing-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .ished-landing-tiers {
    grid-template-columns: 1fr;
  }

  .ished-landing-tier {
    padding-inline: 0;
  }

  .ished-landing-tier + .ished-landing-tier {
    border-left: 0;
    border-top: 1px solid var(--app-line);
    margin-top: 2.5rem;
    padding-top: 2.5rem;
  }
}

@media (max-width: 700px) {
  .ished-landing-header {
    gap: 0.75rem;
    padding-block: 1rem;
  }

  .ished-landing-nav {
    gap: 1rem;
  }

  /* On a phone the running head keeps the wordmark and the door in;
     the anchors are a full page away. */
  .ished-landing-nav-link {
    display: none;
  }

  .ished-landing-title-actions {
    gap: 1.25rem;
  }

  .ished-auth-photo,
  .ished-auth-photo-inner {
    min-height: 14rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ished-landing *, .ished-landing *::before, .ished-landing *::after,
  .ished-auth-page *, .ished-auth-page *::before, .ished-auth-page *::after {
    animation: none !important;
    transition: none !important;
  }
}
