/* ============================================================
   Tab — the public pages: the front page (index.html), privacy.html
   and terms.html. Drawn in design/website/ (Landing, Privacy).

   These pages scroll, so they do NOT load shared-design/css/base.css,
   whose body is the app's fixed, non-scrolling shell, and whose cards
   have smooth corners: the public pages use plain ones (design/README.md).
   They load none of Tab's JavaScript either.

   The colours below are base.css's and css/app.css's, copied: warm
   paper and warm ink, Tab's mustard gold. Change one there, change it
   here. Dark first; the light scheme follows the system, as in the app.
   ============================================================ */

:root {
  --bg: #141311;
  --card: #1e1d1a;
  --fill: #2a2825;            /* the step numbers' circle */
  --text: #f3f1ec;
  --text-2: #a8a39a;
  --text-3: #6e6a63;
  --hairline: rgba(243, 241, 236, 0.07);
  --accent: #e5b23c;
  --pos: #4bd98e;
  --neg: #f27360;
  --card-shadow: none;
  --card-shadow-sm: none;
  --phone-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --glass-bg: rgba(48, 46, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.09);
  /* a trip's tint, the same formula as the app's avatars */
  --av-bg-s: 36%;
  --av-bg-l: 22%;
  --av-fg-s: 80%;
  --av-fg-l: 80%;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f2ee;
    --card: #ffffff;
    --fill: #ece9e3;
    --text: #1c1b19;
    --text-2: #6b6862;
    --text-3: #9a968f;
    --hairline: rgba(28, 27, 25, 0.08);
    --accent: #8a5a00;
    --pos: #17804c;
    --neg: #c23b2a;
    --card-shadow: 0 1px 2px rgba(28, 27, 25, 0.04), 0 6px 20px rgba(28, 27, 25, 0.05);
    --card-shadow-sm: 0 1px 2px rgba(28, 27, 25, 0.04);
    --phone-shadow: 0 24px 70px rgba(28, 27, 25, 0.18);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.95);
    --av-bg-s: 64%;
    --av-bg-l: 93%;
    --av-fg-s: 46%;
    --av-fg-l: 40%;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }

a { color: inherit; text-decoration: none; }

.serif {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Transactor's mark and wordmark, in Tab's colours. */
.brandmark { width: 20px; height: 20px; flex-shrink: 0; }
.brandmark circle { fill: var(--text); }
.brandmark path { stroke: var(--bg); }

.wordmark {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
}

.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* ============ The top bar ============ */

.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-brand img { border-radius: 8px; }

.nav-cta {
  height: 40px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.12s;
}

.nav-cta:hover { opacity: 0.85; }
.nav-cta:active { transform: scale(0.96); }

/* ============ The top of the front page ============ */

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

/* "by Transactor": a link to transactor.app, dressed as a byline. */
.hero-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(46px, 7vw, 72px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero h1 em { color: var(--accent); }

.hero-sub {
  margin-top: 20px;
  max-width: 460px;
  font-size: 17px;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* The app's main button: solid in the text colour. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 17px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.12s;
}

.btn-primary:hover { opacity: 0.85; }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: var(--card-shadow);
  font-size: 17px;
  font-weight: 600;
  transition: background 0.15s, transform 0.12s;
}

.btn-ghost:hover { background: var(--fill); }
.btn-ghost:active { transform: scale(0.97); }

.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-3);
}

/* ---- The phone ----
   Tab's Home drawn in HTML and CSS, with made-up trips only: the top bar, the
   total, the You owe / Owed to you card, and four trips. It follows the app's
   Home screen; change that, and this should follow. The same size as Balance's
   phone: 320 wide, four two-line rows. */

.hero-phone { display: flex; justify-content: center; }

.phone {
  width: 320px;
  border-radius: 40px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  outline: 8px solid var(--card);
  box-shadow: var(--phone-shadow);
  padding: 22px 16px;
}

.phone-top {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
}

.phone-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

/* the app's round glass buttons */
.phone-dot {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.phone-dot svg { width: 16px; height: 16px; stroke: currentColor; }

.m-hero { text-align: center; padding-top: 16px; }

.m-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pos);
}

.m-amount {
  margin-top: 4px;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}

.m-sub { margin-top: 6px; font-size: 11.5px; color: var(--text-2); }

.m-card {
  margin-top: 16px;
  background: var(--card);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: var(--card-shadow-sm);
}

.m-split { display: flex; justify-content: space-between; }

.m-split > span { display: flex; flex-direction: column; gap: 2px; }
.m-split > span:last-child { align-items: flex-end; }

.m-key { font-size: 10px; color: var(--text-2); }

.m-split b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ₹300 owed against ₹7,600 owed to you */
.m-bar { display: flex; gap: 3px; margin-top: 10px; }
.m-bar span { height: 5px; border-radius: 999px; }
.m-bar span:first-child { flex: 4; background: var(--neg); }
.m-bar span:last-child { flex: 96; background: var(--pos); }

.m-list-label {
  margin: 16px 4px 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-2);
}

.m-list { padding: 0 12px; }

.m-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.m-row + .m-row { border-top: 1px solid var(--hairline); }

/* a trip's circle, in its own tint */
.m-av {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--h) var(--av-bg-s) var(--av-bg-l));
  color: hsl(var(--h) var(--av-fg-s) var(--av-fg-l));
}

.m-av svg { width: 15px; height: 15px; stroke: currentColor; }

.hue-21  { --h: 21; }
.hue-258 { --h: 258; }
.hue-240 { --h: 240; }
.hue-150 { --h: 150; }

/* the trip's name, and under it its people and what was spent, as on Home */
.m-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.m-row-main b {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-row-main i { font-style: normal; font-size: 10px; color: var(--text-2); }

.m-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}

.m-row-right b { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.m-row-right i { font-style: normal; font-size: 10px; color: var(--text-2); }
.m-row-right i.pos { color: var(--pos); }
.m-row-right i.neg { color: var(--neg); }

/* ============ What Tab does, and the three steps ============ */

.features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.features h2,
.how h2 {
  margin-bottom: 40px;
  text-align: center;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.feature {
  background: var(--card);
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow: var(--card-shadow);
}

/* a tinted circle with one symbol, in the avatars' colours */
.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: hsl(var(--h) var(--av-bg-s) var(--av-bg-l));
  color: hsl(var(--h) var(--av-fg-s) var(--av-fg-l));
}

.hue-teal   { --h: 165; }
.hue-gold   { --h: 42; }
.hue-violet { --h: 262; }
.hue-rose   { --h: 350; }

.feature h3 {
  margin-bottom: 7px;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.feature p {
  font-size: 14px;
  color: var(--text-2);
}

.how {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 88px;
  text-align: center;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  text-align: left;
}

.steps li {
  background: var(--card);
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow: var(--card-shadow);
}

.step-n {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.steps p {
  font-size: 14px;
  color: var(--text-2);
}

.how-cta { margin-top: 40px; }

/* ============ The footer ============ */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 34px 24px calc(env(safe-area-inset-bottom) + 40px);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.footer-brand img { border-radius: 6px; }

/* "by Transactor": a link to transactor.app, dressed as a byline, as Balance's. */
.footer-by {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
}

.footer-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* Privacy · Terms. Here, not in legal.css, because the front page shows the same
   line and does not load legal.css. */
.footer-legal {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-3);
}

.footer-legal a { color: var(--text-2); }
.footer-legal a:hover { color: var(--text); }

/* ============ Wide screens ============
   Only the phone width is drawn. Wider, the front page lays out as Balance's does:
   the words beside the phone, the four cards two by two, the steps side by side. */

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    padding-top: 72px;
    padding-bottom: 96px;
  }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}
