@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-variable.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif";
  src: url("/assets/fonts/noto-serif-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif";
  src: url("/assets/fonts/noto-serif-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Fitra Labs — shared brand foundation (all pages) */
:root {
  --paper: #fafafa;
  --gold: #af9058;
  --gold-deep: #8f703f;
  --gold-highlight: #d4b57a;
  --ink: #1c1b18;
  --ink-muted: #4a4740;
  --gold-line: rgba(175, 144, 88, 0.38);
  --gold-soft: rgba(175, 144, 88, 0.14);
  --shadow-soft: 0 12px 40px rgba(28, 27, 24, 0.06);
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif", Iowan Old Style, Palatino Linotype, Book Antiqua, Georgia, "Times New Roman", serif;
}

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.page--home main,
.page--studio main {
  flex: 1;
}

.page--home,
.page--studio {
  letter-spacing: 0.05em;
}

a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--gold-line);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Masthead */
.masthead {
  flex-shrink: 0;
  padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--gold-line);
  background: rgba(250, 250, 250, 0.94);
}

@supports (backdrop-filter: blur(8px)) {
  .masthead {
    backdrop-filter: blur(10px);
  }
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  border-bottom: none;
}

.masthead__brand:hover {
  color: var(--gold-deep);
  border-bottom: none;
}

.masthead__mark {
  display: block;
  width: 2rem;
  height: auto;
}

.masthead__name {
  letter-spacing: 0.06em;
}

/* Product hero (Quran, Qibla, etc.) */
.hero {
  position: relative;
  min-height: min(100dvh, 56rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 4vw, 2rem) clamp(2.5rem, 5vw, 3.5rem);
  background: linear-gradient(
    180deg,
    rgba(175, 144, 88, 0.22) 0%,
    rgba(250, 250, 250, 0.96) 38%,
    var(--paper) 58%
  );
}

.hero__inner {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.hero__icon {
  display: block;
  margin: 0 auto;
  width: clamp(4.5rem, 18vw, 6rem);
  height: auto;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.hero__title {
  margin: 1rem 0 0.85rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.35rem, 7.5vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  padding-bottom: 0.1em;
  background: linear-gradient(
    105deg,
    var(--gold-highlight) 0%,
    #c9a66b 24%,
    var(--gold) 48%,
    var(--gold-deep) 74%,
    var(--gold-highlight) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__title {
    color: var(--gold);
    background: none;
    -webkit-text-fill-color: var(--gold);
  }
}

.hero__lede {
  margin: 0 auto 1.75rem;
  max-width: 30rem;
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__inner > * {
    animation: hero-rise 0.75s ease backwards;
  }

  .hero__inner > *:nth-child(1) {
    animation-delay: 0.04s;
  }
  .hero__inner > *:nth-child(2) {
    animation-delay: 0.1s;
  }
  .hero__inner > *:nth-child(3) {
    animation-delay: 0.16s;
  }
  .hero__inner > *:nth-child(4) {
    animation-delay: 0.22s;
  }
  .hero__inner > *:nth-child(5) {
    animation-delay: 0.28s;
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__inner > * {
    animation: none !important;
  }
}

.section--manifesto {
  background: var(--paper);
}

.section__title--light {
  color: var(--gold-deep);
}

/* Breadcrumb */
.crumb {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.35rem clamp(1.25rem, 4vw, 2rem) 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.crumb a {
  color: var(--gold-deep);
}

.crumb__sep {
  margin: 0 0.35rem;
  opacity: 0.45;
}

.crumb__here {
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: none;
}

.btn:hover {
  border-bottom: none;
}

.btn--primary {
  background: var(--gold);
  color: #fffdf9;
  border: 1px solid var(--gold-deep);
  box-shadow: 0 2px 0 rgba(28, 27, 24, 0.06);
}

.btn--primary:hover {
  filter: brightness(1.04);
  border-bottom: none;
}

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

.btn--secondary {
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  border: 1px solid var(--gold);
  font-size: 0.6875rem;
}

.btn--secondary:hover {
  background: rgba(175, 144, 88, 0.1);
  border-bottom: 1px solid var(--gold);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--gold-line);
  cursor: default;
  pointer-events: none;
}

/* Sections (shared) */
.section {
  padding: clamp(3rem, 9vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem);
}

.section__inner {
  max-width: 72rem;
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 38rem;
}

.section__label {
  margin: 0 0 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.section__title {
  margin: 0 0 1.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--ink);
}

.manifesto__text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  line-height: 1.75;
  font-weight: 500;
  color: var(--ink);
}

.sadaqah__text {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  line-height: 1.75;
  text-align: center;
  color: var(--ink);
}

.section--sadaqah .section__title {
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  flex-shrink: 0;
  padding: clamp(2.25rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
  border-top: 1px solid var(--gold-line);
  background: var(--paper);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.footer__sanad {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.footer__nav {
  margin-bottom: 0.75rem;
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.35rem;
}

.footer__links a {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  padding: 0 0.25rem;
}

.footer__version {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-footer--legal {
  margin-top: 2.5rem;
  padding-top: 2rem;
}

.footer__links a[aria-current="page"] {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
}

/* Legal */
.page--legal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: 0.04em;
}

.wrap--legal {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2rem) clamp(2.5rem, 6vw, 4rem);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.legal h1 {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.legal .updated {
  margin: 0 0 2rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.legal section {
  margin-bottom: 1.75rem;
}

.legal h2 {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold-deep);
}

.legal p {
  margin: 0 0 0.85rem;
  color: var(--ink);
}

.legal p:last-child {
  margin-bottom: 0;
}

.legal ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.35rem;
}

/* Status pill */
.status-pill {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  color: var(--gold-deep);
  background: rgba(255, 255, 255, 0.6);
}

.status-pill--live {
  color: var(--ink);
  border-color: rgba(175, 144, 88, 0.55);
  background: rgba(175, 144, 88, 0.12);
}

.status-pill--muted {
  color: var(--ink-muted);
  border-style: dashed;
}
