/* Islamic Tools: one stylesheet, no external fonts or scripts. */

:root {
  --bg: #0d1522;
  --bg-alt: #111c2c;
  --card: #16233599;
  --text: #e8ecf2;
  --muted: #9aa7b8;
  --gold: #e4c166;
  --green: #3ddc84;
  --line: #ffffff14;
  --radius: 16px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  /* Eight-pointed star pattern, very faint. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23e4c166' stroke-opacity='0.06' stroke-width='1'%3E%3Crect x='24' y='24' width='32' height='32'/%3E%3Crect x='24' y='24' width='32' height='32' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
}

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

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

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: #0d1522e6;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.topbar nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.topbar nav a:hover, .topbar nav a:focus-visible { color: var(--gold); }

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.bismillah {
  margin: 0 0 0.5rem;
  color: var(--gold);
  font-style: italic;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
}

.accent { color: var(--gold); }

.lead { color: var(--muted); font-size: 1.1rem; max-width: 36rem; }

.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.button {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.button.primary { background: var(--gold); color: #1c1608; }

.button:hover, .button:focus-visible { filter: brightness(1.1); }

.hero-visual { position: relative; min-height: 320px; }

/* Round watch screenshots */
.watch {
  border-radius: 50%;
  box-shadow: 0 0 0 10px #05080e, 0 0 0 12px #2a3547, 0 20px 50px #0009;
  background: #000;
}

.hero-visual .big { position: absolute; top: 0; left: 0; width: min(300px, 70%); }

.hero-visual .small { position: absolute; right: 0; bottom: 0; width: min(200px, 45%); }

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}

.section.alt {
  max-width: none;
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section.alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

h2 { margin: 0 0 0.5rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }

.section-lead { color: var(--muted); max-width: 44rem; margin-bottom: 2rem; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}

.feature h3 { margin: 0 0 0.4rem; color: var(--gold); font-size: 1.1rem; }

.feature p { margin: 0; color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin: 3rem 0 2rem;
  text-align: center;
}

.gallery figure { margin: 0; }

.gallery .watch { width: 220px; }

.gallery figcaption { margin-top: 1.2rem; }

.muted { color: var(--muted); font-size: 0.95rem; }

.note {
  border-left: 3px solid var(--green);
  background: #3ddc8414;
  padding: 0.8rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.store { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }

.badge {
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  background: #000;
  border: 1px solid #ffffff40;
  font-weight: 600;
}

/* ESP32 clock */
.split {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 2.5rem;
  align-items: center;
}

.device {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, #2b3546, #121821);
  box-shadow: 0 20px 50px #0009;
}

.device-screen {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  background: #000;
  color: #fff;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
}

.device-date { color: var(--muted); font-size: 0.75rem; }

.device-time { color: #ffe04a; font-size: 2.6rem; font-weight: 700; line-height: 1.1; }

.device-next { color: var(--green); font-size: 0.8rem; margin-bottom: 0.4rem; }

.device-prayers { list-style: none; margin: auto 0 0; padding: 0; font-size: 0.8rem; }

.device-prayers li { display: flex; justify-content: space-between; border-top: 1px solid #ffffff1a; padding: 1px 0; }

.device-prayers .next { color: #ffe04a; font-weight: 700; }

.checklist { list-style: none; margin: 0; padding: 0; }

.checklist li { position: relative; padding: 0.35rem 0 0.35rem 1.8rem; color: var(--muted); }

.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

.checklist strong { color: var(--text); }

/* Free / contact */
.free { text-align: center; max-width: 46rem; }

.free p { font-size: 1.1rem; }

.signature { color: var(--muted); font-style: italic; }

.signature strong { color: var(--text); font-style: normal; }

#contact { text-align: center; }

.mail { font-size: 1.3rem; font-weight: 700; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Text pages (privacy policy) */
.page { max-width: 46rem; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 4rem; }

.page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }

.page h2 { font-size: 1.3rem; margin-top: 2rem; color: var(--gold); }

.page p, .page li { color: var(--muted); }

.page strong { color: var(--text); }

/* Small screens */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; display: flex; justify-content: center; gap: 1rem; }
  .hero-visual .big, .hero-visual .small { position: static; width: 46%; }
  .split { grid-template-columns: 1fr; }
  .topbar nav { display: none; }
}

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