/* ^recap website
   Colors and type come from the ^recap brand guide (Sept 2026) and the app's
   lib/theme/app_theme.dart, so the site and the app stay in step. */

@font-face {
  font-family: "Hind";
  src: url("/fonts/hind-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("/fonts/hind-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ------------------------------------------------------------ */

:root {
  color-scheme: light;

  /* Brand, exact */
  --purple: #6D28D9;
  --blue: #6C6CF2;
  --black: #090611;
  --white: #FFFFFF;

  /* Light mode: the brand guide's own pages are white */
  --bg: #FFFFFF;
  --surface: #F5F3F9;
  --hairline: #DEDAE8;
  --text: #090611;
  --text-mid: #4A4459;
  --text-low: #6B647D;
  --link: #6D28D9;
  --fill: #6D28D9;
  --on-fill: #FFFFFF;
  --focus: #6C6CF2;
  --danger: #C2183F;
  --met: #4F4FE0;

  --font: "Devanagari Sangam MN", "Hind", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 36rem;
  --gutter: max(1.25rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --bw: clamp(8px, 2vw, 20px); /* cover band width */
  --radius: 14px;

  /* Caret mark (Hoefler Text ^, from recap_logo.dart), used as a mask */
  --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='17 -704 334 244'%3E%3Cpath d='M351 -478Q351 -470 343 -466Q338 -460 332 -460Q327 -460 322 -464L184 -602L45 -464Q40 -460 35 -460Q30 -460 24 -466Q17 -472 17 -478Q17 -481 20 -486L167 -696Q173 -704 184 -704Q194 -704 200 -696L347 -486Q351 -482 351 -478Z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #090611;
    --surface: #120E1C;
    --hairline: #2A243A;
    --text: #F5F3F9;
    --text-mid: #ADA7BE;
    --text-low: #7D7595;
    --link: #A073E6;
    --focus: #6C6CF2;
    --danger: #F2466B;
    --met: #A7A7F7;
  }
}

/* ---- Base -------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

main {
  flex: 1;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 60rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--fill);
  color: var(--on-fill);
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* ---- Header and footer ------------------------------------------------- */

/* Four thin bands across the top of inner pages: the cover, in miniature */
.strip {
  height: 12px;
  background:
    linear-gradient(90deg, var(--purple), var(--blue)) 0 0 / 100% 3px no-repeat,
    linear-gradient(90deg, var(--blue), var(--purple)) 0 3px / 100% 3px no-repeat,
    linear-gradient(90deg, var(--purple), var(--blue)) 0 6px / 100% 3px no-repeat,
    linear-gradient(90deg, var(--blue), var(--purple)) 0 9px / 100% 3px no-repeat;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.site-header--home {
  justify-content: flex-end;
}

.brand {
  display: inline-flex;
  color: var(--text);
  padding-block: 0.25rem;
}

.brand svg {
  display: block;
  height: 1.75rem;
  width: auto;
}

.site-nav a {
  color: var(--text-mid);
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 0.25rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-footer {
  margin-top: 4rem;
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--text-mid);
  font-size: 0.9375rem;
}

.site-footer ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer ul a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.site-footer ul a:hover {
  text-decoration: underline;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

/* ---- Prose ------------------------------------------------------------- */

.prose {
  max-width: var(--measure);
  padding-top: 1.5rem;
}

.prose h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

.prose h1:focus {
  outline: none;
}

.prose h2 {
  font-size: 1.3125rem;
  line-height: 1.25;
  margin: 2.75rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}

.prose h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  margin: 2rem 0 0.35rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose .lede {
  font-size: 1.1875rem;
  color: var(--text);
}

.prose .meta {
  color: var(--text-mid);
  margin-bottom: 2rem;
}

/* Bulleted lists use the caret as their marker */
.prose ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.prose ul > li {
  position: relative;
  margin-bottom: 0.55rem;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: -1.35rem;
  top: 0.42em;
  width: 0.7rem;
  height: 0.52rem;
  background: var(--link);
  -webkit-mask: var(--caret) center / contain no-repeat;
  mask: var(--caret) center / contain no-repeat;
}

.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.prose ol > li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}

.prose ol > li::marker {
  color: var(--link);
  font-weight: 700;
}

.prose strong {
  font-weight: 700;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ---- Home: the brand guide cover --------------------------------------- */

.cover {
  margin-top: 0.5rem;
}

/* Each band is an L down the right and along the bottom of what it holds.
   Neighbouring bands swap purple and blue, as on the guide's cover. */
.band {
  padding: 0 var(--bw) var(--bw) 0;
  background-repeat: no-repeat;
  background-position: right top, left bottom;
  background-size: var(--bw) 100%, 100% var(--bw);
}

.band--a {
  background-image:
    linear-gradient(to bottom, var(--blue), var(--purple)),
    linear-gradient(to right, var(--purple), var(--blue));
}

.band--b {
  background-image:
    linear-gradient(to bottom, var(--purple), var(--blue)),
    linear-gradient(to right, var(--blue), var(--purple));
}

/* Top and left edge: Recap Black warming into the bands. In dark mode it
   melts into the page, so the panel glows out of the night. */
.lid {
  padding: var(--bw) 0 0 var(--bw);
  background-repeat: no-repeat;
  background-position: left top, left top;
  background-size: 100% var(--bw), var(--bw) 100%;
  background-image:
    linear-gradient(to right, var(--black) 62%, var(--blue)),
    linear-gradient(to bottom, var(--black) 58%, var(--purple));
}

.panel {
  background: var(--bg);
  padding: clamp(1.75rem, 6vw, 4rem) clamp(1.25rem, 6vw, 4rem);
}

.lockup {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  line-height: 0;
  color: var(--text);
}

.lockup svg {
  width: clamp(240px, 64vw, 440px);
  height: auto;
}

.panel .lede {
  font-size: clamp(1.1875rem, 2.6vw, 1.4375rem);
  line-height: 1.45;
  max-width: 30rem;
  margin: 0 0 0.9rem;
}

.panel .meta {
  color: var(--text-mid);
  max-width: 30rem;
  margin: 0 0 1.75rem;
}

.soon {
  display: inline-block;
  margin: 0;
  padding: 0.6rem 1rem;
  font-size: 0.9375rem;
  white-space: nowrap;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--text-mid);
  font-weight: 700;
}

.index {
  max-width: var(--measure);
  margin-top: 3.5rem;
}

.index h2 {
  font-size: 1.3125rem;
  margin: 0 0 0.5rem;
}

.index ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.index li {
  border-top: 1px solid var(--hairline);
}

.index li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.index a {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--text);
}

.index a:hover .index-title {
  color: var(--link);
}

.index-title {
  display: block;
  font-weight: 700;
  font-size: 1.1875rem;
}

.index-desc {
  display: block;
  color: var(--text-mid);
}

/* ---- Forms (auth pages) ------------------------------------------------ */

.devnote {
  margin: 0 0 1.5rem;
  padding: 0.6rem 1rem;
  border: 1.5px dashed var(--blue);
  border-radius: var(--radius);
  color: var(--text-mid);
  font-size: 0.9375rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.input-row {
  position: relative;
}

.field input {
  width: 100%;
  font: inherit;
  font-size: 1.0625rem; /* 17px: keeps iOS from zooming in */
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.8rem 4.75rem 0.8rem 1rem;
  min-height: 3.1rem;
}

.field input:focus {
  border-color: var(--focus);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent);
}

.reveal {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--link);
  background: none;
  border: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
}

.prose ul.rules {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  color: var(--text-low);
  font-size: 0.9375rem;
}

.prose ul.rules > li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.2rem;
}

.prose ul.rules > li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.42em;
  width: 0.7rem;
  height: 0.52rem;
  background: var(--hairline);
  -webkit-mask: var(--caret) center / contain no-repeat;
  mask: var(--caret) center / contain no-repeat;
}

.prose ul.rules > li[data-met="true"] {
  color: var(--text);
}

.prose ul.rules > li[data-met="true"]::before {
  background: var(--met);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.85rem 1.4rem;
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--on-fill);
  background: var(--fill);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn[disabled] {
  opacity: 0.65;
  cursor: progress;
}

@media (min-width: 40rem) {
  .btn {
    width: auto;
  }
}

.error {
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--danger);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.error:empty {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
