/* crub.co · shared styles: fonts, base, the clay surface, and the legal pages. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #F6F1EA; color: #1D1815; }
a { color: inherit; }
a:hover { color: #A43B2E; }
a:focus-visible { outline: 2px solid #A43B2E; outline-offset: 2px; border-radius: 2px; }

/* The terracotta tile relief, blended over whatever ground the section sets. */
.clay-tex {
  background-image: url("/assets/clay.jpg");
  background-size: 512px 512px;
  background-repeat: repeat;
  background-blend-mode: soft-light;
}

.skip {
  position: absolute; left: 16px; top: -48px; padding: 8px 12px; border-radius: 8px;
  background: #120F0E; color: #F6F1EA; font: 600 14px "Inter", sans-serif; z-index: 10;
}
.skip:focus { top: 16px; }

/* ---------------------------------------------------------------- legal pages */

.doc {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.doc-bar {
  background-color: #A43B2E;
  color: #F6F1EA;
  padding: 0 clamp(20px, 5vw, 80px);
}
.doc-bar nav {
  max-width: 1280px; margin: 0 auto; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.doc-bar .wordmark { display: flex; }
.doc-bar .wordmark svg { height: 26px; width: auto; display: block; }
.doc-bar .links { display: flex; gap: clamp(12px, 2.4vw, 28px); font-size: 15px; font-weight: 500; }
.doc-bar .links a { color: #F6F1EA; text-decoration: none; }
.doc-bar .links a:hover { color: #120F0E; }

.doc main {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 32px) clamp(64px, 8vw, 120px);
}
.doc h1 {
  margin: 0 0 12px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.doc h1 .dot { color: #A43B2E; }
.doc .meta { margin: 0 0 40px; font-size: 14px; line-height: 20px; color: #655B53; }
.doc .lead {
  margin: 0 0 40px;
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  color: #4A423C;
}
.doc h2 {
  margin: 48px 0 12px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.doc h3 { margin: 28px 0 8px; font-size: 17px; line-height: 24px; font-weight: 600; }
.doc p, .doc li { font-size: 16px; line-height: 26px; color: #2E2723; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 0 0 6px; }
.doc a { color: #A43B2E; text-underline-offset: 2px; }
.doc a:hover { color: #7C2A20; }
.doc code {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 14px;
  background: #ECE4D9;
  border-radius: 4px;
  padding: 1px 5px;
}
.doc .note {
  margin: 0 0 24px;
  padding: 16px 20px;
  border-radius: 12px;
  background: #ECE4D9;
}
.doc .note p:last-child { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; line-height: 22px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid #E2D9CC; }
.doc th { font-weight: 600; }
.doc .toc { margin: 0 0 8px; padding: 0; list-style: none; columns: 2 220px; }
.doc .toc li { margin: 0 0 4px; font-size: 15px; line-height: 22px; }

.doc-foot {
  border-top: 1px solid #E2D9CC;
  padding: 28px clamp(20px, 5vw, 80px);
  font-size: 13px;
  line-height: 20px;
  color: #655B53;
}
.doc-foot div {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
}
.doc-foot a { color: #655B53; }
.doc-foot .links { display: flex; flex-wrap: wrap; gap: 20px; }

/* ---------------------------------------------------------------- waitlist form
   The homepage's last section: the heading on the clay ground and the form on a
   slip card beside it (under it on narrow screens). The controls follow the
   design system's inputs (umber outline, a terracotta ring on focus), sized for
   a public form: 48px fields and 16px text, so phones do not zoom in. The form
   posts to the waitlist Edge Function, which redirects to a page in /waitlist/. */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.wl-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: start;
  gap: 56px clamp(40px, 6vw, 112px);
}
.wl-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; min-width: 0; }
.wl-intro .se { text-wrap: pretty; }
.wl-points { width: 100%; max-width: 520px; margin: 8px 0 0; padding: 0; list-style: none; }
.wl-points li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(246, 241, 234, 0.24);
  font-size: 17px; line-height: 26px; color: #F6F1EA;
}
.wl-points li:last-child { border-bottom: 1px solid rgba(246, 241, 234, 0.24); }
.wl-points svg { flex: none; margin-top: 3px; }

.wl-card {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-radius: 16px;
  scroll-margin-top: 24px;
  background: #F6F1EA;
  color: #1D1815;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  /* A lit top edge, like glaze catching light, and an umber shadow on the clay. */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 1px 2px rgba(56, 18, 10, 0.16), 0 28px 64px -28px rgba(56, 18, 10, 0.6);
}
.wl-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wl-label { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: -0.006em; color: #1D1815; }
.wl-optional { margin-left: 4px; font-weight: 400; color: #71665D; }
.wl-hint { margin: -2px 0 0; font-size: 13px; line-height: 18px; color: #655B53; }

.wl-control {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background-color: #FFFDF9;
  color: #1D1815;
  font: 500 16px/24px "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.006em;
  /* The outline is a shadow, so it never changes the control's size; #8E8378 keeps 3:1. */
  box-shadow: inset 0 0 0 1px #8E8378, 0 1px 2px rgba(28, 18, 12, 0.06);
  outline: 2px solid transparent; /* shown by high-contrast modes, which drop shadows */
  outline-offset: 2px;
  transition: box-shadow 140ms cubic-bezier(0.2, 0, 0, 1);
}
.wl-control::placeholder { color: #71665D; opacity: 1; }
.wl-control:hover { box-shadow: inset 0 0 0 1px #655B53, 0 1px 2px rgba(28, 18, 12, 0.06); }
.wl-control:focus { box-shadow: inset 0 0 0 1.5px #A43B2E, 0 0 0 4px rgba(164, 59, 46, 0.16); }
/* Only after the person has tried: an untouched empty field is not an error. */
.wl-control:user-invalid { box-shadow: inset 0 0 0 1.5px #93203A, 0 0 0 4px rgba(147, 32, 58, 0.12); }
select.wl-control {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23655B53' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  cursor: pointer;
}
/* "Choose one" reads as a hint until something is picked. */
select.wl-control:invalid,
select.wl-control:has(option[value=""]:checked) { color: #71665D; }
select.wl-control option { color: #1D1815; }

.wl-hp { display: none; }

.wl-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin: 8px 0 0;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #120F0E;
  color: #F6F1EA;
  font: 600 16px/1 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.006em;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 20px -10px rgba(18, 15, 14, 0.7);
  transition: background-color 200ms cubic-bezier(0.2, 0, 0, 1);
}
.wl-submit:hover { background: #2B2320; }
.wl-submit:active { background: #1D1917; }
.wl-submit:focus-visible { outline: 2px solid #A43B2E; outline-offset: 2px; }
.wl-note { margin: -4px 0 0; font-size: 13px; line-height: 20px; text-align: center; color: #655B53; }
.wl-note a { color: #A43B2E; text-underline-offset: 2px; white-space: nowrap; }
.wl-note a:hover { color: #7C2A20; }

@media (max-width: 960px) {
  .wl-layout { grid-template-columns: minmax(0, 1fr); }
  .wl-card { max-width: 560px; }
}
@media (max-width: 480px) {
  .wl-card { padding: 24px 20px; }
}

/* The pages the form lands on: the legal page layout, one short message. */
.doc .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.doc .button {
  display: inline-flex; align-items: center; height: 48px; padding: 0 20px; border-radius: 12px;
  background: #120F0E; color: #F6F1EA; font-size: 16px; font-weight: 600; text-decoration: none;
}
.doc .button:hover { color: #F6F1EA; background: #2B2320; }
.doc .button:focus-visible { outline: 2px solid #A43B2E; outline-offset: 2px; }
