/* shoprewatch.com coming-soon. Tokens are the storefront's light theme
   (frontend/src/styles.css): warm cream ground, chocolate wordmark, copper
   primary. Light only: the photography is shot on white. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/geist-latin.9b6f5ff45b.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/assets/fonts/playfair-display-latin.5d91eb5d52.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --card: #fefcf8;
  --sunk: #f3f1ed;
  --raise: #ece7e0;
  --ink: #26211c;
  --ink-2: #4a4036;
  --muted: #6e685f;
  --line: #e7e3dd;
  --line-strong: #d8d2c9;
  --primary: #7d5440;
  --primary-deep: #6a4636;
  --on-primary: #faf8f4;
  --wordmark: #3b2317;
  --error: #b91c1c;
  --success: #2c764f;
  --radius-control: 12px;
  --radius-box: 14px;
  --radius-card: 20px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 5vw, 80px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: var(--primary);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--primary-deep);
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Headings take focus only from script (tabindex="-1"), to move a screen
   reader to the new state; they are not controls and get no ring. */
[tabindex="-1"]:focus {
  outline: none;
}
h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

.wordmark {
  display: inline-flex;
  color: var(--wordmark);
  line-height: 0;
}
.wordmark svg {
  height: 22px;
  width: auto;
  fill: currentColor;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ---- Home ------------------------------------------------------------- */

.home {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "masthead"
    "photo"
    "intro"
    "facts"
    "foot";
}
.masthead {
  grid-area: masthead;
  padding: 20px 16px 16px;
}
.photo {
  grid-area: photo;
  margin: 0 16px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  aspect-ratio: 4 / 3;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 58%;
}
.intro {
  grid-area: intro;
  padding: 32px 16px 8px;
  max-width: 560px;
}
.intro h1 {
  margin-top: 14px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 8.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}
.lede {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
}

.waitlist {
  margin-top: 28px;
}
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}
.field-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field-row input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.field-row input::placeholder {
  color: #8f877c;
}
.field-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(125 84 64 / 0.16);
}
.field-row input[aria-invalid="true"] {
  border-color: var(--error);
}
.button {
  height: 52px;
  padding: 0 24px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--on-primary);
  background: var(--primary);
  border: 0;
  border-radius: var(--radius-control);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.button:hover {
  background: var(--primary-deep);
  color: var(--on-primary);
}
.button:active {
  transform: translateY(1px);
}
.button[disabled] {
  opacity: 0.7;
  cursor: progress;
}
.button.secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.button.secondary:hover {
  border-color: rgb(125 84 64 / 0.5);
  background: var(--raise);
}

.consent {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.consent label {
  cursor: pointer;
}
.form-error {
  margin-top: 14px;
  font-size: 14px;
  color: var(--error);
}
.fine {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.fine a {
  color: var(--ink-2);
}
.trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.challenge {
  margin-top: 16px;
}

.done {
  margin-top: 30px;
  padding: 22px 22px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-box);
}
.done:focus {
  outline: none;
}
.done h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
}
.done p {
  margin-top: 8px;
  color: var(--ink-2);
}
.done strong {
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.linkish {
  font: inherit;
  color: var(--ink-2);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.facts {
  grid-area: facts;
  list-style: none;
  margin: 36px 16px 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  max-width: 560px;
}
.facts li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.facts strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}
.foot {
  grid-area: foot;
  padding: 28px 16px 32px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.foot a {
  color: var(--muted);
}
.foot a:hover {
  color: var(--ink);
}

@media (min-width: 560px) {
  .field-row {
    flex-direction: row;
  }
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 960px) {
  .home {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto auto;
    grid-template-areas:
      "masthead photo"
      "intro photo"
      "facts photo"
      "foot photo";
  }
  .masthead {
    padding: 32px var(--gutter) 0;
  }
  .masthead .wordmark svg {
    height: 28px;
  }
  .photo {
    margin: 16px 16px 16px 0;
    aspect-ratio: auto;
    min-height: 0;
    position: sticky;
    top: 16px;
    height: calc(100svh - 32px);
  }
  .intro {
    align-self: center;
    padding: 24px var(--gutter);
    max-width: calc(560px + 2 * var(--gutter));
  }
  .facts {
    margin: 0 var(--gutter);
  }
  .foot {
    padding: 18px var(--gutter) 24px;
  }
}

/* ---- Documents (terms, privacy) --------------------------------------- */

.doc-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.doc-header-inner,
.doc-main,
.doc-footer-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
.doc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.doc-header .wordmark svg {
  height: 24px;
}
.doc-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}
.doc-nav a {
  color: var(--ink-2);
  text-decoration: none;
}
.doc-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}
.doc-main {
  padding-top: 40px;
  padding-bottom: 64px;
}
.doc-main h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.doc-meta {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  font-size: 14px;
  line-height: 1.6;
}
.doc-meta strong {
  font-weight: 600;
}
.doc-meta p + p {
  margin-top: 6px;
  font-style: italic;
  color: var(--muted);
}
.doc-section {
  margin-top: 40px;
  scroll-margin-top: 16px;
}
.doc-section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
}
.doc-section p {
  margin-top: 12px;
  color: var(--ink-2);
  line-height: 1.7;
}
.doc-section ul {
  margin: 16px 0 0;
  padding: 18px 20px 18px 38px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
}
.doc-section li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.doc-section li + li {
  margin-top: 8px;
}
.doc-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.doc-actions .button {
  height: 46px;
  font-size: 14px;
}
.doc-footer {
  border-top: 1px solid var(--line);
}
.doc-footer-inner {
  padding-top: 22px;
  padding-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13px;
  color: var(--muted);
}
.doc-footer a {
  color: var(--muted);
}

/* ---- Result pages (unsubscribe, 404) ------------------------- */

.result {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}
.result .masthead {
  padding: 40px 0 0;
}
.result-card {
  margin: auto 0;
  width: 100%;
  max-width: 520px;
  padding: 36px 32px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 10px -6px rgb(38 33 28 / 0.08), 0 16px 36px -14px rgb(38 33 28 / 0.16);
}
.result-card h1 {
  margin-top: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 6vw, 2.2rem);
  line-height: 1.15;
}
.result-card p {
  margin-top: 12px;
  color: var(--ink-2);
}
.result-card .eyebrow {
  margin-top: 0;
  color: var(--primary);
}
.result-card .actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.result-card .actions .button {
  height: 48px;
}
.result .foot {
  padding: 24px 0 32px;
  justify-content: center;
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  vertical-align: -3px;
  margin-right: 10px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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