/* Naamrang website. Colours and type follow the app (src/constants/theme.ts). */

@font-face {
  font-family: 'Naam Sans';
  src: url('/assets/fonts/NaamSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Naam Sans';
  src: url('/assets/fonts/NaamSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
/* One family, two files: browsers fetch the Devanagari file only on pages that use it. */
@font-face {
  font-family: 'Tiro Devanagari Hindi';
  src: url('/assets/fonts/Tiro-Latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2190-2193, U+2212;
  font-display: swap;
}
@font-face {
  font-family: 'Tiro Devanagari Hindi';
  src: url('/assets/fonts/Tiro-Devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+25CC, U+A8E0-A8FF;
  font-display: swap;
}

:root {
  --background: #fbf6ec;
  --surface: #ffffff;
  --surface-muted: #f1e6cf;
  --text: #2b2118;
  --text-secondary: #6f5b4b;
  --accent: #a8322a;
  --border: #e3d5c3;
  --temple-gold: #b8892d;
  --display: 'Tiro Devanagari Hindi', Georgia, serif;
  --body: 'Naam Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 42rem;
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
.tagline,
.promise,
.availability {
  text-wrap: balance;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

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

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--surface);
  padding: 0.5rem 1rem;
  z-index: 1;
}

/* Header and footer */

.site-header,
.site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
}
.site-nav a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 0;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  color: var(--text-secondary);
  font-size: 1rem;
}
.site-footer nav {
  display: flex;
  gap: 1.25rem;
}

/* Home */

.hero {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}
.hero-icon {
  width: 168px;
  height: 168px;
  border-radius: 38px;
  box-shadow: 0 10px 30px rgb(43 33 24 / 0.14);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 3.75rem);
  line-height: 1.15;
  margin: 1.5rem 0 0;
}
.hero .devanagari {
  display: block;
  font-size: 0.55em;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
.hero .tagline {
  font-family: var(--display);
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  line-height: 1.4;
  color: var(--accent);
  margin: 1.25rem auto 0;
  max-width: 34rem;
}
.hero .lede {
  max-width: 36rem;
  margin: 1rem auto 0;
  color: var(--text-secondary);
}
.availability {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--surface-muted);
  font-weight: 600;
}

.features {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  list-style: none;
}
.features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
}
.features h2 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.4rem;
}
.features p {
  margin: 0;
  color: var(--text-secondary);
}

.promise {
  max-width: var(--measure);
  margin: 3.5rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.5;
}

/* Text pages (privacy, support) */

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}
.page h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 2.75rem);
  line-height: 1.2;
  margin: 1rem 0 0.25rem;
}
.page h2 {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 2.5rem 0 0.5rem;
}
.page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.75rem 0 0.25rem;
}
.page .meta {
  color: var(--text-secondary);
  margin: 0;
}
.page li + li {
  margin-top: 0.35rem;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--temple-gold);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1.75rem;
}
.summary ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  background: var(--surface);
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
}
th {
  background: var(--surface-muted);
  font-weight: 600;
}

.contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}
.contact p {
  margin: 0.25rem 0;
}
.contact a {
  font-weight: 600;
  font-size: 1.2rem;
  word-break: break-all;
}

details {
  border-bottom: 1px solid var(--border);
  padding: 0.25rem 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
}
details p,
details ul {
  margin-top: 0;
  color: var(--text-secondary);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
