/* Shared styles for sanskar.studio. Colours follow the app's theme
   (sanskar-studio-app/src/utils/theme.ts). The page background must match
   the app's, because the logo artwork draws its ribbon stripe in that colour. */

:root {
  --bg: #f5f6f7;
  --card: #ffffff;
  --text: #333333;
  --text-dim: #666666;
  --border: #dedede;
  --brand: #3b82f6;
  --link: #2563eb;
  --brand-tint: #3b82f61a;
  --on-brand: #ffffff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #ffffff;
    --text-dim: #aaaaaa;
    --border: #38383a;
    --link: #60a5fa;
    --brand-tint: #3b82f629;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --text: #ffffff;
  --text-dim: #aaaaaa;
  --border: #38383a;
  --link: #60a5fa;
  --brand-tint: #3b82f629;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: var(--link);
}

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

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

.wrap {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: 24px;
  }
}

/* ---------- Header ---------- */

.site-header {
  padding-block: 16px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  display: block;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.wordmark b {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.wordmark small {
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  color: var(--text-dim);
}

.nav-link {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

/* ---------- Home ---------- */

.hero {
  padding-block: 48px 56px;
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    padding-block: 72px 88px;
  }
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 700;
  text-wrap: balance;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-dim);
  margin: 0 0 28px;
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-art {
  justify-self: center;
  width: min(320px, 70vw);
}

.hero-art img {
  width: 100%;
  height: auto;
  display: block;
}

.section {
  padding-block: 48px;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.section > .wrap > p.lede {
  color: var(--text-dim);
  margin: 0 0 28px;
  max-width: 40em;
}

.features {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.features li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.features h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.features p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 16px;
  max-width: 40em;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}

.steps li::before {
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--link);
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Legal pages ---------- */

.doc {
  max-width: 44em;
  margin-inline: auto;
  padding: 24px 16px 64px;
}

@media (min-width: 640px) {
  .doc {
    padding-inline: 24px;
  }
}

.doc h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 16px 0 8px;
}

.doc .meta {
  color: var(--text-dim);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.doc h2 {
  font-size: 1.3rem;
  margin: 40px 0 8px;
  letter-spacing: -0.01em;
  scroll-margin-top: 16px;
}

.doc h3 {
  font-size: 1.05rem;
  margin: 24px 0 4px;
}

.doc ul {
  padding-left: 1.25em;
}

.doc li + li {
  margin-top: 4px;
}

.summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 24px;
}

.summary p {
  margin: 0 0 8px;
}

.summary ul {
  margin: 0;
}

.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 8px;
}

.toc p {
  margin: 0 0 6px;
  font-weight: 600;
}

.toc ol {
  margin: 0;
  padding-left: 1.25em;
  columns: 2 14em;
  column-gap: 24px;
}

.table-scroll {
  overflow-x: auto;
  margin: 12px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 28px 40px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer p {
  margin: 0;
}
