/* ==========================================================================
   Sabrly Learn section
   Shares the palette, type and editorial furniture of the main landing page.
   ========================================================================== */

:root {
    --parchment: #FAF6EE;
    --parchment-deep: #F0E9D8;
    --gold: #E8A838;
    --gold-muted: #D4A04A;
    --gold-logo: #fec65e;
    --gold-pale: rgba(232, 168, 56, 0.12);
    --gold-glow: rgba(232, 168, 56, 0.25);
    --ink: #1F1D36;
    --ink-soft: #2D2B52;
    --ink-faded: #5C5573;
    --stone: #867F92;
    --stone-light: #B0ABBA;
    --teal: #0D9488;
    --teal-soft: rgba(13, 148, 136, 0.1);
    --teal-glow: rgba(13, 148, 136, 0.2);
    --rose: #C4706E;
    --rose-soft: rgba(196, 112, 110, 0.08);
    --white: #FFFFFF;
    --rule: rgba(31, 29, 54, 0.1);
    --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-arabic: 'Amiri', 'Traditional Arabic', Georgia, serif;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font-body);
    background: var(--parchment);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Grain texture, matching the landing page */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

::selection { background: var(--gold-glow); color: var(--ink); }

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

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(250, 246, 238, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--rule);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-logo img { width: 36px; height: 36px; border-radius: 9px; }

.nav-cta {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    padding: 14px 28px;
    border: 1.5px solid var(--ink);
    border-radius: 100px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-cta:hover { background: var(--ink); color: var(--parchment); }

/* ===== SHARED EDITORIAL FURNITURE ===== */
.section-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold-muted);
}

.editorial-divider {
    width: 48px;
    height: 2px;
    background: var(--gold);
    margin: 20px 0 0;
    border: none;
}

.editorial-divider.center { margin: 20px auto 0; }

.geo-pattern {
    position: absolute;
    pointer-events: none;
    opacity: 0.07;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%231F1D36' stroke-width='0.8'%3E%3Cpath d='M40 0L80 40L40 80L0 40z'/%3E%3Cpath d='M40 12L68 40L40 68L12 40z'/%3E%3Cpath d='M40 24L56 40L40 56L24 40z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
}

/* ===== ARTICLE HEADER ===== */
.article-header {
    position: relative;
    padding: 148px 40px 56px;
    background: var(--parchment-deep);
    overflow: hidden;
}

.article-header-inner {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
}

.breadcrumb {
    font-size: 13px;
    color: var(--ink-faded);
    margin-bottom: 26px;
}

.breadcrumb a { color: var(--ink-faded); text-decoration: none; }
.breadcrumb a:hover { color: var(--teal); text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--ink); }
.breadcrumb .sep { margin: 0 8px; color: var(--stone-light); }

.article-header h1 {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 50px);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 16px 0 20px;
    text-wrap: balance;
}

.article-header h1 em { font-style: italic; color: var(--teal); }

.standfirst {
    font-size: clamp(17px, 2vw, 19px);
    line-height: 1.62;
    color: var(--ink-faded);
    max-width: 62ch;
}

.article-meta {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    font-size: 13px;
    color: var(--stone);
}

.article-meta b { font-weight: 600; color: var(--ink-faded); }

/* ===== ARTICLE BODY ===== */
.article-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 40px 20px;
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.2vw, 31px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 52px 0 18px;
    text-wrap: balance;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.4vw, 21px);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink-soft);
    margin: 36px 0 12px;
}

.article-body p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink-faded);
    margin-bottom: 20px;
}

.article-body p strong { color: var(--ink); font-weight: 600; }

.article-body a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--ink); }

.article-body ul, .article-body ol {
    margin: 0 0 22px 22px;
    color: var(--ink-faded);
    font-size: 17px;
}

.article-body li { margin-bottom: 10px; line-height: 1.7; }
.article-body li strong { color: var(--ink); font-weight: 600; }

.lead {
    font-size: 19px;
    line-height: 1.7;
    color: var(--ink-soft);
}

/* ===== DUA BLOCK ===== */
.dua {
    background: var(--white);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    padding: 28px 30px;
    margin: 30px 0;
}

.dua .arabic {
    font-family: var(--font-arabic);
    font-size: 27px;
    line-height: 1.9;
    color: var(--ink);
    direction: rtl;
    text-align: right;
    margin-bottom: 18px;
}

.dua .translit {
    font-size: 15px;
    font-style: italic;
    color: var(--ink-faded);
    margin-bottom: 10px;
    line-height: 1.6;
}

.dua .meaning {
    font-size: 16px;
    color: var(--ink);
    line-height: 1.65;
    margin-bottom: 12px;
}

.dua .ref {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--gold-muted);
}

/* ===== CALLOUTS ===== */
.callout {
    background: var(--teal-soft);
    border-radius: 4px;
    padding: 24px 28px;
    margin: 30px 0;
}

.callout p { margin-bottom: 12px; font-size: 16px; color: var(--ink-soft); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); font-weight: 600; }

.callout.caution { background: var(--rose-soft); }
.callout.caution strong { color: var(--rose); }

.callout-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--teal);
    margin-bottom: 12px;
}

.callout.caution .callout-title { color: var(--rose); }

/* ===== PRACTICE STEPS ===== */
.steps {
    list-style: none;
    margin: 30px 0;
    padding: 0;
    counter-reset: step;
}

.steps li {
    position: relative;
    counter-increment: step;
    padding: 0 0 22px 52px;
    margin: 0;
    border-left: 1px solid var(--rule);
    margin-left: 17px;
}

.steps li:last-child { border-left: 1px solid transparent; padding-bottom: 0; }

.steps li::before {
    content: counter(step);
    position: absolute;
    left: -17px;
    top: -2px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps li h3 { margin: 4px 0 6px; font-size: 18px; }
.steps li p { margin-bottom: 0; font-size: 16px; }

/* ===== FEATURE TIE-IN CARD ===== */
.tool-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 26px 30px;
    margin: 34px 0;
}

.tool-card-text { flex: 1 1 300px; }

.tool-card .section-label { display: block; margin-bottom: 8px; }

.tool-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 6px;
}

.tool-card p { font-size: 15px; color: var(--ink-faded); margin: 0; }

.btn-pill {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--parchment);
    background: var(--ink);
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 100px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-pill:hover { background: var(--teal); color: var(--white); }

/* ===== RELATED READING ===== */
.related {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 40px 70px;
}

.related h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    color: var(--ink);
    margin: 14px 0 26px;
    letter-spacing: -0.015em;
}

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

.related-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 22px 24px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.related-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.related-card .kicker {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--gold-muted);
    display: block;
    margin-bottom: 10px;
}

.related-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.32;
    color: var(--ink);
    margin-bottom: 8px;
}

.related-card p { font-size: 14px; color: var(--ink-faded); line-height: 1.6; margin: 0; }

/* ===== CLOSING APP CTA ===== */
.app-cta {
    position: relative;
    background: linear-gradient(135deg, #1F1D36 0%, #2D2B52 100%);
    padding: 66px 40px;
    text-align: center;
    overflow: hidden;
}

.app-cta .geo-pattern { opacity: 0.06; }
.app-cta .geo-pattern { background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23FAF6EE' stroke-width='0.8'%3E%3Cpath d='M40 0L80 40L40 80L0 40z'/%3E%3Cpath d='M40 12L68 40L40 68L12 40z'/%3E%3Cpath d='M40 24L56 40L40 56L24 40z'/%3E%3C/g%3E%3C/svg%3E"); }

.app-cta-inner { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; }

.app-cta h2 {
    font-family: var(--font-display);
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 400;
    line-height: 1.2;
    color: var(--parchment);
    margin: 18px 0 14px;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.app-cta p {
    color: rgba(250, 246, 238, 0.66);
    font-size: 17px;
    margin-bottom: 30px;
    line-height: 1.65;
}

.app-cta .btn-pill { background: var(--gold); color: var(--ink); }
.app-cta .btn-pill:hover { background: var(--gold-logo); color: var(--ink); }

/* ===== DISCLAIMER ===== */
.disclaimer {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 40px 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--stone);
}

.disclaimer strong { color: var(--ink-faded); font-weight: 600; }
.disclaimer a { color: var(--stone); }

/* ===== FOOTER ===== */
footer {
    margin-top: 60px;
    padding: 48px 40px;
    background: linear-gradient(135deg, #1F1D36 0%, #2D2B52 100%);
    color: rgba(250, 246, 238, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }

.footer-links a {
    color: rgba(250, 246, 238, 0.5);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.25s;
}

.footer-links a:hover { color: var(--gold); }

.footer-copy { font-size: 14px; }

/* ===== LEARN INDEX (hub page) ===== */
.hub-header {
    position: relative;
    padding: 152px 40px 60px;
    background: var(--parchment-deep);
    overflow: hidden;
    text-align: center;
}

.hub-header-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hub-header h1 {
    font-family: var(--font-display);
    font-size: clamp(34px, 5.5vw, 54px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.025em;
    margin: 18px 0 20px;
    text-wrap: balance;
}

.hub-header h1 em { font-style: italic; color: var(--teal); }

.hub-header .standfirst { margin: 0 auto; }

.hub-grid {
    max-width: 1000px;
    margin: 0 auto;
    padding: 66px 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.hub-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 30px 30px 28px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-card:hover { border-color: var(--gold); transform: translateY(-4px); }

.hub-card .kicker {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--gold-muted);
    margin-bottom: 14px;
}

.hub-card h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.28;
    color: var(--ink);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.hub-card p { font-size: 15px; color: var(--ink-faded); line-height: 1.65; margin: 0 0 18px; }

.hub-card .read-on {
    margin-top: auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--teal);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav { padding: 16px 22px; }
    .nav-cta { padding: 10px 20px; font-size: 11px; letter-spacing: 1px; }
    .nav-logo { font-size: 19px; }
    .nav-logo img { width: 32px; height: 32px; }

    .article-header { padding: 116px 22px 44px; }
    .hub-header { padding: 120px 22px 48px; }
    .article-body { padding: 44px 22px 16px; }
    .related { padding: 16px 22px 56px; }
    .hub-grid { padding: 48px 22px 16px; }
    .disclaimer { padding: 32px 22px 0; }
    .app-cta { padding: 54px 22px; }

    .dua { padding: 22px 20px; }
    .dua .arabic { font-size: 23px; }
    .tool-card { padding: 22px; }
    .steps li { padding-left: 44px; }

    footer { flex-direction: column; gap: 22px; text-align: center; padding: 40px 22px; }
    .footer-links { justify-content: center; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .hub-card:hover, .related-card:hover { transform: none; }
}

/* ===== BYLINE ===== */
.byline {
    margin-top: 26px;
    font-size: 15px;
    color: var(--ink-faded);
    line-height: 1.55;
}

.byline a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid var(--gold);
    transition: color 0.25s, border-color 0.25s;
}

.byline a:hover { color: var(--teal); border-bottom-color: var(--teal); }

.byline .reviewer {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: var(--stone);
}

/* ===== EDITORIAL POLICY ===== */
.policy-role {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 26px 28px;
    margin: 20px 0;
}

.policy-role h3 { margin-top: 0; }

.policy-role .status {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.status.live { background: var(--teal-soft); color: var(--teal); }
.status.pending { background: var(--gold-pale); color: var(--gold-muted); }

/* ===== NAV RIGHT GROUP ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-link:hover { color: var(--gold-muted); }

@media (max-width: 768px) {
    .nav-right { gap: 16px; }
    .nav-link { font-size: 11px; letter-spacing: 1px; }
}
