/* Salati site — light palette only (theme/Color.kt Light*) */

:root {
  color-scheme: light;
  --bg: #f6f0e5;
  --surface: #fffdf8;
  --surface-variant: #eee6d8;
  --text: #26312c;
  --text-secondary: #59635e;
  --primary: #174b38;
  --on-primary: #ffffff;
  --primary-soft: #d1e1d9;
  --brass: #7c5c24;
  --brass-ink: #4c3c1e;
  --outline: #dcd2c3;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --radius-control: 12px;
  --radius-card: 20px;
  --page: 68rem;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--page), calc(100% - 2rem));
  margin-inline: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

/* --- nav --- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--outline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--primary);
}

/* --- home: copy + daily screen --- */

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24.5rem);
  gap: 3rem 4rem;
  align-items: center;
  padding: 3.25rem 0 3.5rem;
}

.hero { min-width: 0; }

.hero .logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--primary);
}

.hero p {
  margin: 0 0 1.4rem;
  color: var(--text-secondary);
  font-size: 1.12rem;
  max-width: 34rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
}

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

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--outline);
}

.btn-ghost:hover { background: var(--surface-variant); }

/* --- daily preview --- */

.preview { margin: 0; min-width: 0; }

.preview figcaption {
  margin-top: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.daily {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--outline);
  border-radius: 24px;
  padding: 1.1rem 1rem 1rem;
}

.daily-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.daily-kicker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.daily-kicker svg {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0.22rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 99px;
  flex-shrink: 0;
}

.daily-date {
  color: var(--primary);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.daily-meta {
  text-align: right;
  font-size: 0.76rem;
  line-height: 1.4;
}

.daily-meta .hijri { color: var(--brass); font-weight: 600; }
.daily-meta .place { color: var(--text-secondary); }

.hero-card {
  background: var(--surface-variant);
  border: 1px solid var(--outline);
  border-radius: var(--radius-card);
  padding: 0.85rem 1rem 0.95rem;
  text-align: center;
  margin-bottom: 0.65rem;
}

.countdown {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 550;
  letter-spacing: -0.04em;
  color: var(--primary);
  line-height: 1.15;
}

.hero-card .next {
  margin-top: 0.3rem;
  color: var(--brass);
  font-size: 0.9rem;
  font-weight: 550;
}

.hero-card .next time {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-inline-start: 0.35rem;
}

.prayer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 0.35rem;
  border-radius: var(--radius-control);
  background: var(--surface);
  border: 1px solid var(--outline);
  font-size: 0.94rem;
}

.prayer .name { font-weight: 550; }
.prayer time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.prayer.is-muted { color: var(--text-secondary); }

.prayer.is-next {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.prayer.is-next .mark {
  width: 3.5px;
  height: 16px;
  border-radius: 99px;
  background: var(--brass);
  margin-inline-end: 0.45rem;
}

.prayer .left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.badge {
  margin-inline-start: 0.45rem;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: #eee6d8;
  color: var(--brass-ink);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.night {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.3rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-control);
  background: var(--surface);
  border: 1px solid var(--outline);
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.night div:last-child { text-align: right; }
.night strong {
  display: block;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  margin-top: 0.1rem;
}

/* --- features --- */

.features {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.6rem 2rem;
  padding: 2.25rem 0 2.75rem;
  border-top: 1px solid var(--outline);
}

.features h2 {
  grid-column: 1 / -1;
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.feature h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 650;
}

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

.note {
  max-width: 42rem;
  padding: 1.35rem 0 3rem;
  border-top: 1px solid var(--outline);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.note strong { color: var(--text); font-weight: 650; }

/* --- privacy document --- */

.doc {
  max-width: 42rem;
  padding-bottom: 4rem;
}

.doc-header { padding: 2.4rem 0 1.35rem; }

.doc-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--primary);
}

.doc-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.doc-lede {
  margin: 0 0 2rem;
  color: var(--text-secondary);
}

.doc h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.12rem;
  font-weight: 650;
}

.doc h3 {
  margin: 1.35rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 650;
}

.doc p, .doc li { color: var(--text-secondary); }
.doc p { margin: 0 0 0.85rem; }

.doc ul, .doc ol {
  margin: 0 0 1rem;
  padding-inline-start: 1.2rem;
}

.doc li { margin-bottom: 0.35rem; }
.doc strong { color: var(--text); font-weight: 650; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-variant);
  padding: 0.08em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.75rem 0 1.1rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius-control);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

th {
  background: var(--surface-variant);
  color: var(--text);
  font-weight: 650;
}

td { color: var(--text-secondary); }

tr:last-child th,
tr:last-child td { border-bottom: 0; }

.callout {
  margin: 0.9rem 0 1.1rem;
  padding: 0.85rem 1rem;
  background: var(--surface-variant);
  border-radius: var(--radius-control);
  border-left: 3px solid var(--primary);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* --- footer --- */

.footer {
  border-top: 1px solid var(--outline);
  padding: 1.4rem 0 2.25rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.15rem;
  list-style: none;
  margin: 0 0 0.7rem;
  padding: 0;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  min-height: 2.4rem;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover { color: var(--primary); }

.footer p { margin: 0; }
.footer code { background: transparent; padding: 0; }

/* tablet */
@media (max-width: 960px) {
  .features { grid-template-columns: 1fr 1fr; }
}

/* phone + small tablet */
@media (max-width: 800px) {
  .hero-row {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0 2.4rem;
  }

  .hero .logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .actions { width: 100%; }

  .actions .btn {
    flex: 1 1 8.5rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.75rem 0 2rem;
  }

  .doc-header { padding-top: 1.75rem; }
}

@media (max-width: 480px) {
  .wrap { width: min(var(--page), calc(100% - 1.5rem)); }

  .nav { padding: 0.9rem 0; }

  .brand { font-size: 1.05rem; }

  .nav-links { gap: 0.2rem 0.85rem; }

  .nav-links a { font-size: 0.9rem; }

  .hero p { font-size: 1.02rem; }

  .daily { padding: 0.95rem 0.8rem 0.85rem; }

  .daily-kicker { font-size: 1.15rem; }

  table { font-size: 0.86rem; }
}
