/* Anvay — getanvay.com
   One stylesheet, no dependencies, no build step.
   Brand tokens are fixed: see CLAUDE.md. Do not introduce new brand colours.

   Dark mode follows the reader's OS setting via prefers-color-scheme.
   There is deliberately NO toggle: a toggle needs JavaScript, and /privacy
   must render fully with JS disabled (Play rejects policy pages that don't). */

/* ---------- light (default) ---------- */

:root {
  color-scheme: light dark;

  --primary: #234e70;
  --primary-bright: #2f6a97;
  --accent: #c9772e;
  --accent-soft: #e8a568;

  --surface: #fbfaf7;
  --panel: #f4f1ea;
  --card: #ffffff;

  --ink: #1c1f23;
  --ink-soft: #4a5259;
  --rule: #e2ddd4;

  --shadow: 0 1px 2px rgba(28, 31, 35, 0.04), 0 8px 24px rgba(28, 31, 35, 0.06);
  --measure: 44rem;
}

/* ---------- dark ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    /* The deep navy of --primary becomes the *background* in dark, and the
       readable tints of it become the text. Same hue family, inverted role. */
    --primary: #8ab6dc;
    --primary-bright: #a9cdec;
    --accent: #e39a56;
    --accent-soft: #b9793d;

    --surface: #11151a;
    --panel: #1a212a;
    --card: #171d25;

    --ink: #e4e6e9;
    --ink-soft: #a2adba;
    --rule: #2b343f;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

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

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

body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  /* a whisper of brand colour bleeding down from the top of the page */
  background-image: radial-gradient(
    ellipse 80% 40% at 50% -10%,
    color-mix(in srgb, var(--primary) 12%, transparent),
    transparent 70%
  );
  background-repeat: no-repeat;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

/* ---- masthead ---- */

.masthead {
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  position: relative;
}

/* the brand rule: primary bleeding into accent */
.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 55%, transparent 100%);
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-block;
  transition: color 0.15s ease;
}

.wordmark:hover {
  color: var(--accent);
}

.wordmark .deva {
  font-family: ui-sans-serif, system-ui, "Noto Sans Devanagari", sans-serif;
  font-weight: 500;
  color: var(--accent);
  margin-left: 0.4rem;
  font-size: 1.25rem;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

/* ---- type ---- */

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  color: var(--primary);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--primary);
  margin: 3rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  position: relative;
  letter-spacing: -0.005em;
}

/* short accent tick sitting on the section rule */
h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent);
}

strong {
  font-weight: 700;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.5rem;
}

.meta {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--panel);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* ---- callout ---- */

.lede {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 1.15rem 1.25rem;
  margin: 0 0 1.5rem;
}

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

/* the contact address, given room to breathe */
.address {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.5rem;
  word-break: break-word;
}

/* ---- tables: must scroll inside themselves, never the page ---- */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--card);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 28rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--rule);
}

tr:last-child td {
  border-bottom: none;
}

th {
  background: var(--panel);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

/* ---- kept / deleted cards (replaces a cramped 2-column table) ---- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card--removed h3 {
  color: var(--accent);
}

.card--kept h3 {
  color: var(--primary);
}

/* the little square bullet next to each card heading */
.card h3::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 2px;
  flex: none;
  background: currentColor;
}

.card ul {
  margin: 0;
  padding-left: 1.15rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.card li:last-child {
  margin-bottom: 0;
}

.card .note {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
}

/* ---- footer ---- */

.foot {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
}

.foot .spacer {
  flex: 1 1 auto;
}

/* ---- holding page ---- */

.hero {
  padding: 2.5rem 0 1rem;
}

.hero h1 {
  font-size: 2.125rem;
}

.hero .sub {
  font-size: 1.125rem;
  color: var(--ink-soft);
}

/* the three-language line on the holding page */
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-family: ui-sans-serif, system-ui, "Noto Sans Devanagari", sans-serif;
  font-size: 0.9375rem;
}

.langs li {
  margin: 0;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
}

@media (max-width: 30rem) {
  .wrap {
    padding: 1.75rem 1rem 3.5rem;
  }
  h1 {
    font-size: 1.5rem;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .foot .spacer {
    flex-basis: 100%;
  }
}

/* respect a reader who has asked for less motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
