/* Ganti Solat landing page. Tokens mirror lib/ui/theme.dart; reasons live in site/README.md. */

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c2023;
  --surface: #163136;
  --elevated: #204046;
  --line: #315057;
  --text: #f0f6f3;
  --muted: #a5bcb8;
  --mint: #76c9b4;
  --bezel: #081719;
  --radius-card: 18px;
  --radius-chip: 14px;
  --gutter: 20px;
  --max: 1160px;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure,
blockquote {
  margin: 0;
}

a {
  color: var(--mint);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius-chip);
  background: var(--mint);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Header */

.top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.top nav {
  display: flex;
  gap: 4px;
}

.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}

.top nav a:hover {
  color: var(--text);
}

/* Phone frame: radii follow the iPhone screen geometry, not the page scale. */

.phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  max-width: 100%;
  padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.165);
  background: var(--bezel);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 40px 60px -30px rgb(3 14 16 / 0.9);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.137);
}

/* Hero */

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding-block: 32px 72px;
  overflow-x: clip;
}

.hero h1 {
  font-size: clamp(2.5rem, 1.55rem + 3.6vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 16ch;
  text-wrap: balance;
}

.lede {
  margin-top: 20px;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  line-height: 1.5;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 18px 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  background: var(--surface);
}

.store svg {
  width: 24px;
  height: 24px;
  fill: var(--text);
  flex: none;
}

.store span {
  display: grid;
  line-height: 1.2;
  font-weight: 600;
  font-size: 1.0625rem;
}

.store small {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8125rem;
}

.hero-shot {
  --w: min(280px, 72vw);
  position: relative;
  display: grid;
  justify-items: center;
  padding-top: 24px;
}

.hero-shot .phone {
  --w: inherit;
}

/* Sized from the phone so its tip never reaches the header; decoration only. */
.arch {
  position: absolute;
  bottom: -24px;
  left: 50%;
  width: calc(var(--w) * 1.45);
  height: auto;
  transform: translateX(-50%);
  fill: var(--surface);
  pointer-events: none;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    padding-block: 40px 96px;
  }

  .hero-shot {
    --w: clamp(260px, calc((100dvh - 200px) * 0.46), 320px);
  }
}

/* Shared section rhythm */

.section {
  padding-block: clamp(72px, 9vw, 128px);
}

.section h2 {
  font-size: clamp(1.875rem, 1.35rem + 2vw, 2.875rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}

.section-intro {
  max-width: 40rem;
}

.section-intro p,
.copy > p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 34rem;
}

/* Two ways to add: two phones, staggered against the intro on wide screens */

.ways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px clamp(16px, 4vw, 40px);
  align-items: start;
}

.ways .section-intro {
  grid-column: 1 / -1;
}

.way {
  display: grid;
  gap: 20px;
  width: min(300px, 100%);
  justify-self: center;
}

.way .phone {
  --w: min(300px, 42vw);
}

.way figcaption {
  color: var(--muted);
  font-size: 1rem;
}

.way figcaption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
}

@media (min-width: 900px) {
  .ways {
    grid-template-areas:
      "intro two"
      "one two";
    column-gap: 72px;
    row-gap: 64px;
  }

  .ways .section-intro {
    grid-area: intro;
    grid-column: auto;
  }

  .way-1 {
    grid-area: one;
  }

  .way-2 {
    grid-area: two;
  }
}

/* Split sections: phone beside copy */

.split {
  display: grid;
  gap: 48px;
  align-items: center;
}

.split .phone {
  --w: min(300px, 78vw);
  justify-self: center;
}

.copy h3 {
  margin: 32px 0 6px;
  font-size: 1.1875rem;
  font-weight: 600;
}

.copy h3 + p {
  color: var(--muted);
  max-width: 34rem;
}

.target {
  margin-top: 28px;
  max-width: 440px;
}

.target img {
  width: 100%;
  height: auto;
}

.target figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 72px;
  }

  .split--flip {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .split--flip .phone {
    order: 2;
  }
}

/* Widgets band: the only full-bleed surface on the page */

.band {
  background: var(--surface);
  text-align: center;
}

.band .section-intro,
.band .section-intro p {
  margin-inline: auto;
}

.widgets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  margin-top: 48px;
}

.widgets img {
  height: auto;
  filter: drop-shadow(0 24px 30px rgb(3 14 16 / 0.55));
}

.widgets .w-small {
  width: min(200px, 42%);
}

.widgets .w-medium {
  width: min(430px, 100%);
}

.note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Reminder quote */

.section.reminder h2 {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}

.reminder blockquote {
  max-width: 38ch;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.reminder .source {
  margin-top: 20px;
  color: var(--muted);
}

.reminder .mark {
  width: 28px;
  height: auto;
  margin-bottom: 28px;
  fill: var(--mint);
}

.sources {
  display: grid;
  gap: 4px;
  margin: 40px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  max-width: 44rem;
}

.sources p {
  margin-bottom: 8px;
  color: var(--muted);
}

.sources a {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
}

.sources svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Privacy */

.privacy {
  display: grid;
  gap: 40px;
}

.facts {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
}

.facts svg {
  width: 26px;
  height: 26px;
  fill: var(--mint);
  margin-top: 1px;
}

.facts strong {
  display: block;
  font-weight: 600;
}

.facts span {
  color: var(--muted);
}

.more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 20px;
  font-weight: 600;
}

@media (min-width: 900px) {
  .privacy {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 72px;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
    gap: 36px 32px;
  }
}

/* Footer */

.foot {
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.foot .brand {
  font-size: 1rem;
}

.foot .brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.foot p {
  margin-top: 12px;
  max-width: 44rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  margin-top: 16px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* Privacy policy page */

.policy {
  max-width: 44rem;
  padding-block: 32px 96px;
}

.policy h1 {
  font-size: clamp(2.125rem, 1.6rem + 2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.policy .updated {
  margin-top: 12px;
  color: var(--muted);
}

.policy h2 {
  margin: 44px 0 10px;
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 600;
}

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

.policy p + p,
.policy ul + p {
  margin-top: 12px;
}

.policy ul {
  margin: 12px 0 0;
  padding-left: 1.25rem;
}

.policy li + li {
  margin-top: 6px;
}

.policy strong {
  color: var(--text);
  font-weight: 600;
}

.policy .summary {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
}

/* Not found */

.lost {
  max-width: 40rem;
  padding-block: 96px 128px;
}

.lost h1 {
  font-size: clamp(2.125rem, 1.6rem + 2vw, 3rem);
  line-height: 1.1;
}

.lost p {
  margin-top: 16px;
  color: var(--muted);
}
