:root {
    --amber: #f0b25e;
    --saffron: #cb6b2c;
    --terracotta: #8b3119;
    --ink: #2e2119;
    --ink-soft: #86725f;
    --card: #fffcf6;
    --page: #fbf4e9;
    --accent: #b0522d;
    --gold: #be8d38;
    --rule: rgba(108, 49, 27, 0.15);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "Noto Naskh Arabic", "Amiri", "Geeza Pro", "Damascus", serif;
    font-size: 18px;
    line-height: 1.9;
    text-rendering: optimizeLegibility;
}

header {
    background: linear-gradient(150deg, var(--amber), var(--saffron) 52%, var(--terracotta));
    color: #fff;
    padding: 64px 24px 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header .pattern {
    position: absolute;
    inset: 0;
    opacity: 0.20;
    pointer-events: none;
}

header .inner { position: relative; }

header h1 {
    margin: 0;
    font-size: 68px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 18px rgba(96, 30, 14, 0.28);
}

header p {
    margin: 6px 0 0;
    font-size: 19px;
    color: rgba(255, 252, 246, 0.9);
}

nav {
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    text-align: center;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 2;
}

nav a {
    color: var(--accent);
    text-decoration: none;
    margin: 0 14px;
    font-size: 17px;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--accent); }

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

section { margin-bottom: 44px; }

h2 {
    font-size: 27px;
    font-weight: 400;
    margin: 0 0 8px;
    color: var(--terracotta);
}

h2 + p.lede { margin-top: 0; color: var(--ink-soft); }

h3 { font-size: 20px; font-weight: 600; margin: 30px 0 6px; }

p { margin: 0 0 14px; }

ul { padding-inline-start: 22px; margin: 0 0 16px; }

li { margin-bottom: 8px; }

.card {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 18px;
    padding: 24px 26px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(108, 49, 27, 0.05);
}

.card h3 { margin-top: 0; }

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

.pledge {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: 22px 0 8px;
}

.pledge div {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 16px;
    padding: 20px;
}

.pledge.four { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.pledge strong { display: block; font-weight: 600; margin-bottom: 4px; color: var(--terracotta); }

.pledge span { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }

.contact {
    background: linear-gradient(150deg, var(--saffron), var(--terracotta));
    color: #fff;
    border-radius: 18px;
    padding: 30px;
    text-align: center;
}

.contact a { color: #fff; font-weight: 600; }

.contact p { color: rgba(255, 252, 246, 0.9); }

.dedication {
    text-align: center;
    font-size: 21px;
    color: var(--accent);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 26px 10px;
    margin: 40px 0;
}

footer {
    text-align: center;
    color: var(--ink-soft);
    font-size: 15px;
    padding: 30px 24px 50px;
    border-top: 1px solid var(--rule);
}

footer a { color: var(--accent); }

.updated { color: var(--ink-soft); font-size: 15px; }

.en {
    direction: ltr;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    color: var(--ink-soft);
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 16px;
    padding: 22px 24px;
    line-height: 1.65;
}

.en h3 { font-family: inherit; margin-top: 18px; font-size: 17px; color: var(--ink); }

.en h3:first-child { margin-top: 0; }

@media (max-width: 520px) {
    header { padding: 48px 18px 42px; }
    header h1 { font-size: 52px; }
    body { font-size: 17px; }
}

/* ── The tribute: why the app carries this name ─────────────────────────── */

.tribute {
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(240, 178, 94, 0.16), transparent 70%),
        var(--card);
    border: 1px solid var(--rule);
    border-radius: 22px;
    padding: 34px 32px 30px;
    margin: 46px 0 40px;
    box-shadow: 0 2px 10px rgba(108, 49, 27, 0.05);
}

.tribute h2 { text-align: center; margin-bottom: 20px; }

.tribute > p { color: var(--ink); }

.mnemonic {
    text-align: center;
    margin: 30px 0;
    padding: 26px 18px 22px;
    background: linear-gradient(160deg, rgba(240, 178, 94, 0.14), rgba(176, 82, 45, 0.07));
    border-radius: 18px;
    border: 1px solid rgba(190, 141, 56, 0.28);
}

.mnemonic .phrase {
    font-size: 46px;
    line-height: 1.35;
    margin: 0 0 4px;
    color: var(--terracotta);
    letter-spacing: 0.04em;
}

.mnemonic .gloss {
    margin: 0;
    font-size: 15px;
    color: var(--ink-soft);
}

.letters {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 22px 0 18px;
}

.letters div {
    background: var(--card);
    border: 1px solid rgba(190, 141, 56, 0.3);
    border-radius: 14px;
    padding: 12px 4px 10px;
}

.letters b {
    display: block;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--accent);
}

.letters span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.ayah {
    margin: 26px 0;
    padding: 20px 24px;
    border-inline-start: 3px solid var(--gold);
    background: rgba(240, 178, 94, 0.09);
    border-radius: 0 14px 14px 0;
}

.ayah p {
    margin: 0;
    font-size: 21px;
    line-height: 2.1;
    color: var(--terracotta);
}

.ayah cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-size: 14px;
    color: var(--ink-soft);
}

.signature {
    margin: 30px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    text-align: center;
    font-size: 21px;
    line-height: 1.9;
    color: var(--accent);
}

@media (max-width: 560px) {
    .tribute { padding: 26px 20px 24px; }
    .mnemonic .phrase { font-size: 36px; }
    .letters { grid-template-columns: repeat(3, 1fr); }
    .ayah p { font-size: 19px; }
    .signature { font-size: 19px; }
}
