/* Swift Ride Studio — site styles */

:root {
  --paper: #f4f5f7;
  --surface: #ffffff;
  --ink: #1a1d24;
  --muted: #596070;
  --line: #dcdfe5;
  --focus: #2b6cff;

  /* App colours, taken from each app icon */
  --torch: #6e0e0e;
  --torch-ink: #fbeee0;
  --torch-beam: rgba(255, 236, 200, 0.16);
  --status: #2bc856;
  --status-ink: #04341a;
  --motiva: #17150f;
  --motiva-ink: #f2ead8;
  --motiva-gold: #d6b26a;
  --pdf: #2a5cff;
  --pdf-ink: #ffffff;
  --prayer: #17403a;
  --prayer-ink: #e9efe9;
  --prayer-gold: #e8b84e;
  --dua: #d8b660;
  --dua-ink: #0b3d36;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-icon: 22.5%;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14161b;
    --surface: #1c1f26;
    --ink: #eceef2;
    --muted: #a2a8b5;
    --line: #2d313b;
    --focus: #7aa2ff;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 100;
}

.skip:focus {
  left: 8px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

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

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

@media (max-width: 520px) {
  .brand-name-long { display: none; }
}

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

.intro {
  padding-block: clamp(56px, 11vw, 132px) clamp(40px, 7vw, 80px);
}

.intro h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2.75rem, 8.4vw, 6.5rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.intro p {
  margin: 28px 0 0;
  max-width: 46ch;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--muted);
}

/* ---------- App bands (home) ---------- */

.apps {
  display: grid;
  gap: 0;
}

.band {
  position: relative;
  overflow: hidden;
  color: var(--band-ink);
  background: var(--band-bg);
}

.band .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px);
}

.band-icon {
  width: clamp(88px, 13vw, 168px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-icon);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
}

.band h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.band h2 a {
  text-decoration: none;
}

.band h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.band p {
  margin: 14px 0 0;
  max-width: 44ch;
  font-size: 1.1rem;
  opacity: 0.86;
}

.band-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.band-more {
  font-weight: 600;
  font-size: 0.95rem;
}

.band--torch {
  --band-bg: var(--torch);
  --band-ink: var(--torch-ink);
}

/* The torch band throws a beam of light across itself */
.band--torch::before,
.app-hero.band--torch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--torch-beam), transparent 75%);
  clip-path: polygon(0 38%, 100% -10%, 100% 110%, 0 62%);
  pointer-events: none;
}

.band--status {
  --band-bg: var(--status);
  --band-ink: var(--status-ink);
}

.band--motiva {
  --band-bg: var(--motiva);
  --band-ink: var(--motiva-ink);
}

.band--pdf {
  --band-bg: var(--pdf);
  --band-ink: var(--pdf-ink);
}

.band--prayer {
  --band-bg: var(--prayer);
  --band-ink: var(--prayer-ink);
}

.band--prayer h2,
.app-hero.band--prayer h1 {
  color: var(--prayer-gold);
}

/* Dua inverts its icon: gold ground, deep green ink, so it never sits beside Prayer looking the same */
.band--dua {
  --band-bg: var(--dua);
  --band-ink: var(--dua-ink);
}

.band--motiva h2 {
  color: var(--motiva-gold);
}

.band--motiva .band-icon {
  box-shadow: 0 0 0 1px rgba(214, 178, 106, 0.28), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

.band .wrap > * {
  position: relative;
}

@media (max-width: 820px) {
  .band .wrap {
    grid-template-columns: auto 1fr;
  }

  .band-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 20px;
  }
}

@media (max-width: 480px) {
  .band .wrap {
    grid-template-columns: 1fr;
  }
}

/* ---------- Store badges ---------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.badges a {
  display: block;
  border-radius: 10px;
}

.badge-play {
  height: 62px;
  width: auto;
  margin: -8px -8px; /* the official Play badge ships with built-in padding */
}

.badge-apple {
  height: 46px;
  width: auto;
}

/* ---------- App detail page ---------- */

.app-hero {
  color: var(--band-ink);
  background: var(--band-bg);
  position: relative;
  overflow: hidden;
}

.app-hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding-block: clamp(48px, 8vw, 104px);
}

.app-hero .band-icon {
  width: clamp(120px, 18vw, 220px);
}

.app-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6.4vw, 5rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.app-hero .lede {
  margin: 18px 0 28px;
  max-width: 40ch;
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  opacity: 0.88;
}

.app-hero.band--motiva h1 {
  color: var(--motiva-gold);
}

@media (max-width: 640px) {
  .app-hero .wrap {
    grid-template-columns: 1fr;
  }
}

.app-body {
  padding-block: clamp(48px, 8vw, 96px);
}

.app-body .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

@media (max-width: 820px) {
  .app-body .wrap {
    grid-template-columns: 1fr;
  }
}

.app-body h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-body h2 + p {
  margin-top: 0;
}

.app-body p {
  max-width: 62ch;
}

.app-body section + section {
  margin-top: 48px;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

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

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateY(-0.1rem);
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.features li {
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.35em;
  width: 12px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  color: var(--accent, var(--ink));
}

.note {
  margin-top: 40px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 0.97rem;
  color: var(--muted);
}

.note a {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Simple pages (contact, 404) ---------- */

.page-head {
  padding-block: clamp(56px, 10vw, 120px) clamp(24px, 4vw, 40px);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.page-head p {
  margin: 20px 0 0;
  max-width: 52ch;
  font-size: 1.2rem;
  color: var(--muted);
}

.contact-mail {
  display: inline-block;
  margin-top: 8px;
  font-size: clamp(1.4rem, 4.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  word-break: break-word;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.18em;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  padding-block: 24px clamp(64px, 10vw, 120px);
}

.contact-grid h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.contact-grid p,
.contact-grid ul {
  margin: 0;
}

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

/* ---------- Privacy policy ---------- */

.policy {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  padding-block: 8px clamp(64px, 10vw, 120px);
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  font-size: 0.93rem;
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--muted);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  border-left-color: var(--ink);
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin: 2.4em 0 0.6em;
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul {
  margin: 0 0 1.1em;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose li::marker {
  color: var(--muted);
}

.prose a {
  font-weight: 500;
}

.policy-meta {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 860px) {
  .policy {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  .toc ol {
    columns: 2 160px;
    column-gap: 24px;
    border-left: 0;
  }

  .toc a {
    padding-left: 0;
    border-left: 0;
  }
}

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

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}

/* ---------- One entrance, on the home headline only ---------- */

@media (prefers-reduced-motion: no-preference) {
  .intro h1,
  .intro p {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  }

  .intro p {
    animation-delay: 0.12s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
  }
}
