/* MyMoneyNook coming-soon page */

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --evergreen: #1d5527;
  --evergreen-dark: #143d1c;
  --ink: #111111;
  --blue: #2f72ea;
  --card: rgba(253, 233, 210, 0.8);
  --error: #a3261d;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: #5a4038;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 7vh 4vw 6vh;
  /* Desktop: the card starts just below the desk's back edge (18.5% down the
     artwork), leaving about 3/8 inch of desk showing above it. The art fills
     the window ("cover"), so its drawn height is the larger of 75vw and 100vh. */
  padding-top: calc((100vh - max(75vw, 100vh)) / 2 + 0.185 * max(75vw, 100vh) + 36px);
}

/* The desk scene stays put while a long card scrolls over it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #5a4038 url("/img/desk-1600.webp") center / cover no-repeat;
}
@media (min-width: 1700px), (min-resolution: 1.5dppx) and (min-width: 1000px) {
  body::before { background-image: url("/img/desk-2400.webp"); }
}
@media (max-aspect-ratio: 4/5) {
  body::before { background-image: url("/img/desk-phone.webp"); background-position: center bottom; }
  body { padding-top: 7vh; }
}

.card {
  width: min(68.5vw, 1120px);
  background: var(--card);
  border-radius: 32px;
  box-shadow: 0 12px 48px rgba(40, 24, 14, 0.28);
  padding: clamp(28px, 3.4vw, 56px) clamp(24px, 4.2vw, 64px) clamp(24px, 3vw, 44px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--evergreen);
  font-weight: 700;
  font-size: clamp(18px, 1.9vw, 30px);
}

.signin {
  font: inherit;
  font-weight: 600;
  font-size: clamp(16px, 1.3vw, 20px);
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 6px 20px;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
}
.signin:hover { background: rgba(255, 255, 255, 0.45); }

h1 {
  margin: 0.2em 0 0.45em;
  text-align: center;
  color: var(--evergreen);
  font-weight: 600;
  font-size: clamp(30px, 3.7vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 0.9em;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.5;
}

.waitlist { margin-top: 1.2em; }

.field-label {
  display: block;
  color: var(--evergreen);
  font-weight: 700;
  font-size: clamp(18px, 1.6vw, 26px);
  margin-bottom: 10px;
}

input[type="email"] {
  display: block;
  width: 100%;
  font: inherit;
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
  border: 2.5px solid var(--blue);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 52px;
}
input[type="email"]:focus { outline: 3px solid rgba(47, 114, 234, 0.35); outline-offset: 1px; background: rgba(255, 255, 255, 0.6); }
input[type="email"][aria-invalid="true"] { border-color: var(--error); }

.check {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 20px;
  font-size: clamp(17px, 1.5vw, 23px);
  cursor: pointer;
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 2.5px solid var(--blue);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  display: grid;
  place-content: center;
}
.check input::after {
  content: "";
  width: 12px;
  height: 7px;
  border: solid #fff;
  border-width: 0 0 3px 3px;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.check input:checked { background: var(--blue); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: 3px solid rgba(47, 114, 234, 0.35); outline-offset: 2px; }

.join {
  font: inherit;
  font-weight: 700;
  font-size: clamp(18px, 1.55vw, 24px);
  color: #fff;
  background: var(--evergreen);
  border: 0;
  border-radius: 10px;
  padding: 12px 26px;
  min-height: 52px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}
.join:hover { background: var(--evergreen-dark); }
.join:disabled { opacity: 0.6; cursor: progress; }

.status { margin: 14px 0 0; min-height: 1.5em; font-weight: 600; }
.status.ok { color: var(--evergreen); }
.status.err { color: var(--error); }

.turnstile:empty { display: none; }
.turnstile { margin: 0 0 16px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.links {
  display: flex;
  gap: 40px;
  margin-top: 18px;
  font-size: clamp(17px, 1.45vw, 22px);
}
.links a { color: var(--ink); text-underline-offset: 3px; }
.links a:hover { color: var(--evergreen); }

a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Sign-in dialog */
.dialog {
  border: 0;
  border-radius: 24px;
  padding: 0;
  width: min(92vw, 480px);
  background: #fdf3e6;
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(30, 18, 10, 0.45);
}
.dialog::backdrop { background: rgba(35, 22, 15, 0.55); }
.dialog-body { padding: 32px; }
.dialog h2 { margin: 0 0 12px; color: var(--evergreen); font-weight: 600; font-size: 28px; }
.dialog p { font-size: 18px; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
/* Continue and Cancel: same size, right-aligned. */
.dialog-actions button {
  flex: 0 0 140px;
  min-height: 52px;
  padding: 10px 16px;
  font-size: 18px;
  border-radius: 10px;
}
.dialog-actions .ghost { border-width: 2px; }
.dialog-actions .join { border: 2px solid var(--evergreen); box-shadow: none; }
.ghost {
  font: inherit;
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px 22px;
  min-height: 52px;
  cursor: pointer;
}

/* Phones and narrow windows */
@media (max-width: 760px) {
  body { padding: 16px 10px 24px; align-items: flex-start; }
  .card { width: 100%; border-radius: 22px; padding: 22px 20px 20px; }
  .card-top { align-items: center; }
  .join { width: 100%; }
  .links { gap: 28px; }
}

/* Privacy page */
.doc h1 { font-size: clamp(28px, 3vw, 44px); }
.doc h2 { color: var(--evergreen); font-weight: 700; font-size: clamp(20px, 1.8vw, 26px); margin: 1.4em 0 0.4em; }
.doc p, .doc li { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; }
.doc ul { padding-left: 1.2em; margin: 0 0 0.9em; }
.doc .back { display: inline-block; margin-bottom: 8px; color: var(--ink); font-weight: 600; }
.doc .updated { color: #4a3b33; }
