/* Tixfar — one stylesheet for the whole site.
   The parent brand is ink on paper and stays quiet; colour belongs to the three
   apps, and those three values are the ones already used in the Tixfar admin
   console so the site, the console and the store listings agree. */

:root {
  --paper:      #e8eae5;
  --paper-high: #f3f4f1;
  --paper-sunk: #dde0d9;
  --ink:        #171c26;
  --ink-soft:   #4c5563;
  --ink-faint:  #79818d;
  --rule:       #c9cdc4;

  --bible:  #8a5406;
  --songs:  #2566ac;
  --matri:  #8b2942;

  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 64px);
  --rhythm: clamp(56px, 9vw, 112px);

  --serif: "Instrument Serif", Iowan Old Style, Georgia, serif;
  --sans:  "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --tamil: "Noto Sans Tamil", var(--sans);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 0.6vw + 15px, 18px);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ── Shell ──────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 10;
}
.skip:focus { left: 0; }

/* ── Masthead ───────────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 22px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand svg { width: 28px; height: 28px; display: block; }
.brand b {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.nav { display: flex; gap: 24px; align-items: center; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); border-bottom-color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--rule); }

@media (max-width: 580px) {
  .masthead { flex-wrap: wrap; gap: 14px 18px; }
  .brand { margin-right: 0; }
  .nav { width: 100%; gap: 18px; justify-content: flex-start; flex-wrap: wrap; }
  .nav a { font-size: 14.5px; }
}

/* ── Type ───────────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(42px, 7vw, 76px); }
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: clamp(21px, 2vw, 25px); line-height: 1.2; }

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* Headings carried no bottom margin, so body copy ran straight into them. */
h2 + p, h3 + p, h2 + ul, h3 + ul, h2 + table { margin-top: 0.7em; }
h2 + .lede, h1 + .lede { margin-top: 0.8em; }

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.lede {
  font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 54ch;
}

.note { font-size: 15px; color: var(--ink-faint); }

.aside-note {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}
.aside-note p { font-size: 15.5px; color: var(--ink-soft); }

/* ── Hero: the three apps as the first thing you see ────────────────────── */

.opening { padding-block: clamp(48px, 8vw, 96px) 0; }
.opening h1 { max-width: 20ch; }
.opening .lede { margin-top: 22px; }

.marquee {
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--rule);
}

.marquee-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding-block: clamp(18px, 2.4vw, 30px);
  padding-inline: 4px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 140ms ease, color 140ms ease, padding-inline 140ms ease;
}
.marquee-row .name {
  font-family: var(--serif);
  font-size: clamp(32px, 5.4vw, 62px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.marquee-row .what { font-size: 15px; color: var(--ink-faint); transition: color 140ms ease; }

.marquee-row:hover, .marquee-row:focus-visible {
  background: var(--tint);
  color: var(--paper-high);
  padding-inline: 18px 14px;
  outline: none;
}
.marquee-row:hover .what, .marquee-row:focus-visible .what { color: var(--paper-sunk); }
.marquee-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

@media (prefers-reduced-motion: reduce) {
  .marquee-row { transition: none; }
}

/* Side by side, the long app names squeezed their one-liners into three
   ragged lines. Stacked is the only honest option at this width. */
@media (max-width: 700px) {
  .marquee-row { grid-template-columns: 1fr; gap: 7px; align-items: start; }
  .marquee-row .what { max-width: 38ch; }
}

.standfirst {
  padding-block: 28px clamp(56px, 8vw, 104px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 15px;
  color: var(--ink-faint);
}

/* ── Sections ───────────────────────────────────────────────────────────── */

.band { padding-block: var(--rhythm); border-top: 1px solid var(--rule); }
.band-sunk { background: var(--paper-high); }

.band-head { max-width: var(--measure); margin-bottom: clamp(28px, 4vw, 48px); }
.band-head p { margin-top: 18px; }

/* Two-column prose + aside, collapsing to one on narrow screens. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* The feature list runs longer than the panel beside it; sticking the panel
   keeps the example in view while you read rather than leaving a hole. */
@media (min-width: 821px) {
  .split > .specimen { position: sticky; top: 28px; }
}

/* ── App pages ──────────────────────────────────────────────────────────── */

.app-mark {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--tint);
  border-bottom: 2px solid var(--tint);
  padding-bottom: 3px;
  margin-bottom: 20px;
}

.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li {
  padding-block: 18px;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}
.feature-list li:last-child { border-bottom: 1px solid var(--rule); }
.feature-list h3 { margin-bottom: 6px; }
.feature-list p { color: var(--ink-soft); margin: 0; }

/* A specimen panel: real content from the apps, used instead of mock
   screenshots so nothing on this site claims a thing the apps don't do. */
.specimen {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(22px, 3vw, 34px);
  border-radius: 3px;
}
.specimen-label {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 16px;
  display: block;
}
.specimen ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.specimen-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 18px;
  font-size: 14.5px;
}
.specimen-cols b {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--ink-faint);
  padding-bottom: 7px;
  margin-bottom: 5px;
  border-bottom: 1px solid #2b3240;
}
.specimen-cols span { color: var(--paper-sunk); padding-block: 3.5px; }
.specimen li {
  font-size: 15px;
  padding-block: 4px;
  color: var(--paper-sunk);
  break-inside: avoid;
}
.specimen .tamil { font-family: var(--tamil); }
.specimen-verse {
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.35;
  margin: 0 0 14px;
  max-width: 30ch;
}
.specimen cite { font-style: normal; font-size: 14px; color: var(--ink-faint); }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper-high);
}
.btn:hover { background: #0e121a; border-color: #0e121a; }
.btn-tint { background: var(--tint); border-color: var(--tint); }
.btn-tint:hover { filter: brightness(0.9); background: var(--tint); border-color: var(--tint); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: transparent; border-color: var(--ink); }
.btn svg { width: 17px; height: 17px; flex: none; }

/* ── Prose pages (privacy, terms) ───────────────────────────────────────── */

.prose { max-width: var(--measure); padding-block: clamp(44px, 6vw, 76px); }
.prose h2 { margin-top: 2em; margin-bottom: 0.5em; }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.4em; }
.prose ul { padding-left: 1.1em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--songs); text-underline-offset: 3px; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 15px; }
.prose th, .prose td {
  text-align: left;
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.prose th { font-weight: 600; }

.updated { font-size: 15px; color: var(--ink-faint); margin-top: 14px; }

.toc { list-style: none; padding: 0; margin: 28px 0 0; }
.toc li { border-top: 1px solid var(--rule); }
.toc li:last-child { border-bottom: 1px solid var(--rule); }
.toc a { display: block; padding: 12px 0; text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--ink); }

/* ── Contact / support ──────────────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 36px;
}
.contact-grid > div { background: var(--paper); padding: 24px; }
.contact-grid h3 { font-size: 20px; margin-bottom: 8px; }
.contact-grid p { font-size: 15px; color: var(--ink-soft); margin: 0; }
.contact-grid a { text-decoration-color: var(--rule); text-underline-offset: 3px; }

details {
  border-top: 1px solid var(--rule);
  padding-block: 4px;
  max-width: var(--measure);
}
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary {
  cursor: pointer;
  padding-block: 16px;
  font-weight: 500;
  list-style-position: outside;
}
details p { padding-bottom: 18px; color: var(--ink-soft); }

/* ── Foot ───────────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 40px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  font-size: 15px;
  color: var(--ink-faint);
}
@media (max-width: 680px) { .foot { grid-template-columns: 1fr; } }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── Notices ────────────────────────────────────────────────────────────── */

.callout {
  border-left: 3px solid var(--tint, var(--ink));
  padding: 16px 0 16px 18px;
  margin: 28px 0;
  max-width: var(--measure);
  font-size: 15.5px;
  color: var(--ink-soft);
}
