/* Muse Egypt Heritage Letters — utility + data-attribute scoping, serif heading + sans body */

:root {
    --olive: #556b2f;
    --olive-dark: #3e4f22;
    --copper: #b87333;
    --copper-dark: #8a5727;
    --cream: #faf6ed;
    --paper: #ffffff;
    --ink: #1c1c19;
    --ink-soft: #4d4d49;
    --mute: #918d83;
    --rule: #e2dccc;
    --rule-strong: #c6bca8;
    --warn: #94342a;

    --container: 1240px;
    --gutter: 32px;

    --serif: Optima, "Iowan Old Style", Palatino, Georgia, "Times New Roman", serif;
    --sans: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

    --r: 4px;
    --r-lg: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 8px 28px rgba(85, 107, 47, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

a { color: var(--olive); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--copper); }
a:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.005em;
    margin: 0 0 .6em;
    color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.22rem; }
h4 { font-family: var(--sans); font-size: .82rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; color: var(--copper); }

p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
    display: inline-block;
    font-family: var(--sans);
    font-size: .8rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--copper);
    padding-bottom: 4px;
    border-bottom: 2px solid var(--copper);
    margin-bottom: 22px;
}

/* ==== Header ==== */
[data-me-header] {
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0; z-index: 50;
}
[data-me-header] > div {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
[data-me-logo] {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
}
[data-me-logo] span:first-child {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--olive);
    letter-spacing: -0.01em;
}
[data-me-logo] span:last-child {
    font-family: var(--sans);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--copper);
    font-weight: 700;
}

[data-me-nav] ul {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0; padding: 0;
    align-items: center;
}
[data-me-nav] a {
    color: var(--ink);
    font-size: .94rem;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color .15s, color .15s;
}
[data-me-nav] a:hover { color: var(--olive); border-bottom-color: var(--copper); }
[data-me-nav] a.is-active { color: var(--olive); border-bottom-color: var(--olive); }

[data-me-nav] a[data-cta] {
    background: var(--olive);
    color: var(--cream);
    padding: 9px 18px;
    border-radius: var(--r);
    border-bottom: none;
}
[data-me-nav] a[data-cta]:hover { background: var(--olive-dark); border-bottom: none; }
[data-me-nav] a[data-cta].is-active { background: var(--olive-dark); border-bottom: none; }

[data-me-toggle] {
    display: none;
    background: none;
    border: 1px solid var(--rule-strong);
    border-radius: var(--r);
    padding: 7px 10px;
    cursor: pointer;
    font-family: var(--sans);
    font-size: .82rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink);
}

/* ==== Buttons ==== */
.btn {
    display: inline-block;
    font-family: var(--sans);
    font-weight: 600;
    font-size: .96rem;
    padding: 13px 28px;
    text-decoration: none;
    border-radius: var(--r);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    letter-spacing: .01em;
}
.btn--primary {
    background: var(--olive);
    color: var(--cream);
}
.btn--primary:hover { background: var(--olive-dark); color: var(--cream); }
.btn--copper {
    background: var(--copper);
    color: var(--cream);
}
.btn--copper:hover { background: var(--copper-dark); color: var(--cream); }
.btn--ghost {
    background: transparent;
    color: var(--olive);
    border-color: var(--olive);
}
.btn--ghost:hover { background: var(--olive); color: var(--cream); }
.btn--link {
    background: none;
    color: var(--olive);
    padding: 0;
    text-decoration: underline;
}

/* ==== Hero — stats-left ==== */
[data-me-hero] {
    padding: 80px 0 90px;
    border-bottom: 1px solid var(--rule);
    background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
}
[data-me-hero] .grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: start;
}
[data-me-hero] h1 {
    font-size: clamp(2.4rem, 4.4vw, 3.6rem);
    line-height: 1.12;
    margin-bottom: 24px;
}
[data-me-hero] .lead {
    font-size: 1.12rem;
    color: var(--ink-soft);
    line-height: 1.75;
    margin-bottom: 32px;
}
[data-me-hero] .actions {
    display: flex; gap: 14px; flex-wrap: wrap;
    margin-bottom: 44px;
}
[data-me-hero] .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    list-style: none;
    margin: 0; padding: 0;
    border-left: 3px solid var(--copper);
}
[data-me-hero] .stats li {
    padding: 0 22px;
    position: relative;
}
[data-me-hero] .stats li:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 1px;
    background: var(--rule);
}
[data-me-hero] .stats strong {
    display: block;
    font-family: var(--serif);
    font-size: 2.2rem;
    color: var(--olive);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
[data-me-hero] .stats span {
    font-size: .78rem;
    color: var(--ink-soft);
    letter-spacing: .08em;
    text-transform: uppercase;
}

[data-me-hero] .visual {
    position: relative;
}
[data-me-hero] .visual img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--r);
}
[data-me-hero] .visual figcaption {
    font-family: var(--sans);
    font-size: .82rem;
    color: var(--ink-soft);
    font-style: italic;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    margin-top: 14px;
}

/* ==== Sections ==== */
.section { padding: 78px 0; }
.section--paper { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section__head {
    max-width: 760px;
    margin: 0 0 48px;
}
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ==== Page hero (inner) ==== */
[data-me-page-hero] {
    padding: 60px 0 50px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
}
[data-me-page-hero] h1 { max-width: 880px; }
[data-me-page-hero] .lead {
    max-width: 820px;
    color: var(--ink-soft);
    font-size: 1.08rem;
}

/* ==== Letters (cards) — numbered, border-left accent ==== */
.letters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}
.letter {
    background: var(--paper);
    padding: 28px 28px 30px;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--olive);
    border-radius: 0 var(--r) var(--r) 0;
    display: flex;
    flex-direction: column;
    transition: border-left-color .2s, transform .2s;
}
.letter:hover {
    border-left-color: var(--copper);
    transform: translateX(2px);
}
.letter__media {
    aspect-ratio: 16 / 10;
    margin: 0 -28px 22px;
    overflow: hidden;
}
.letter__media img { width: 100%; height: 100%; object-fit: cover; }
.letter__num {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--copper);
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 4px;
}
.letter h3 {
    font-family: var(--serif);
    font-size: 1.28rem;
    margin-bottom: 12px;
}
.letter p {
    color: var(--ink-soft);
    font-size: .96rem;
    margin-bottom: 18px;
    flex: 1;
}
.letter__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px dashed var(--rule);
    font-size: .82rem;
    color: var(--mute);
    font-family: var(--sans);
}
.letter__foot a {
    color: var(--olive);
    font-weight: 600;
}

/* ==== Index list (long lists of letters) ==== */
.index-list {
    list-style: none;
    padding: 0; margin: 0;
}
.index-list > li {
    display: grid;
    grid-template-columns: 70px 1fr 140px;
    gap: 24px;
    align-items: baseline;
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
}
.index-list > li:last-child { border-bottom: none; }
.index-list .num {
    font-family: var(--serif);
    font-size: 1.4rem;
    color: var(--copper);
    font-weight: 700;
}
.index-list .meta {
    font-size: .82rem;
    color: var(--mute);
    text-align: right;
    font-family: var(--sans);
}
.index-list h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}
.index-list p { font-size: .94rem; margin: 0; color: var(--ink-soft); }

/* ==== Two col content ==== */
.two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 56px;
    align-items: start;
}
.aside {
    background: var(--cream);
    padding: 30px 28px;
    border-radius: var(--r-lg);
    border: 1px solid var(--rule);
    position: sticky;
    top: 100px;
}
.aside h3 { font-size: 1.08rem; color: var(--olive); margin-bottom: 12px; }
.aside p, .aside ul { font-size: .94rem; color: var(--ink-soft); }
.aside ul { list-style: none; padding: 0; }
.aside ul li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.aside ul li:last-child { border-bottom: none; }

/* ==== Pricing plans ==== */
.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
}
.plan {
    background: var(--paper);
    padding: 32px 28px 30px;
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
}
.plan--feature {
    border: 2px solid var(--olive);
    box-shadow: var(--shadow);
    position: relative;
}
.plan--feature::before {
    content: "Reader favourite";
    position: absolute;
    top: -14px; left: 22px;
    background: var(--copper);
    color: var(--cream);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 6px 14px;
    border-radius: var(--r);
    font-family: var(--sans);
    font-weight: 700;
}
.plan h3 {
    font-family: var(--serif);
    color: var(--olive);
    margin-bottom: 6px;
}
.plan .price {
    font-family: var(--serif);
    font-size: 2.4rem;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
}
.plan .price small { font-size: .8rem; color: var(--mute); font-weight: 400; }
.plan .tag {
    font-size: .9rem;
    color: var(--ink-soft);
    padding: 12px 0 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--rule);
}
.plan ul {
    list-style: none;
    padding: 0; margin: 0 0 26px;
    flex: 1;
}
.plan ul li {
    padding: 7px 0 7px 24px;
    position: relative;
    font-size: .94rem;
    color: var(--ink-soft);
}
.plan ul li::before {
    content: "→";
    position: absolute; left: 0;
    color: var(--copper);
    font-weight: 700;
}

/* ==== FAQ accordion ==== */
.faq { max-width: 880px; margin: 0 auto; }
.faq details {
    border-bottom: 1px solid var(--rule);
}
.faq summary {
    cursor: pointer;
    padding: 20px 0;
    list-style: none;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--copper);
    font-weight: 400;
    transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer {
    padding: 0 0 22px;
    color: var(--ink-soft);
    font-size: .98rem;
}

/* ==== Form ==== */
.form {
    background: var(--paper);
    padding: 32px 30px;
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
}
.form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form .group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}
.form label {
    font-family: var(--sans);
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: 6px;
    color: var(--ink);
}
.form input,
.form select,
.form textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--rule-strong);
    border-radius: var(--r);
    font-family: var(--sans);
    font-size: .98rem;
    background: var(--paper);
    color: var(--ink);
    transition: border-color .15s;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.14);
}
.form .group--check {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}
.form .group--check input { margin-top: 4px; }
.form .group--check label {
    font-weight: 400;
    font-size: .92rem;
    color: var(--ink-soft);
    margin: 0;
}
.form .actions {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.status {
    font-size: .92rem;
    color: var(--olive);
    font-weight: 600;
}
.status.error { color: var(--warn); }

/* ==== Table ==== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
    border: 1px solid var(--rule);
    margin: 18px 0;
}
.table th, .table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--rule);
}
.table th {
    background: var(--cream);
    font-family: var(--serif);
    font-weight: 700;
    color: var(--olive);
    font-size: .96rem;
}
.table tr:last-child td { border-bottom: none; }
.table td { font-size: .94rem; color: var(--ink-soft); }

/* ==== Team ==== */
.team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}
.team__member {
    border-top: 3px solid var(--copper);
    padding-top: 20px;
}
.team__member h4 {
    font-family: var(--serif);
    color: var(--ink);
    font-size: 1.12rem;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 4px;
    font-weight: 700;
}
.team__role {
    font-family: var(--sans);
    font-size: .78rem;
    color: var(--copper);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 14px;
    font-weight: 700;
}
.team__bio { font-size: .94rem; color: var(--ink-soft); }

/* ==== Timeline ==== */
.timeline {
    list-style: none;
    padding: 0; margin: 28px 0 0;
    border-left: 2px solid var(--copper);
}
.timeline li {
    padding: 12px 0 18px 24px;
    position: relative;
}
.timeline li::before {
    content: "";
    position: absolute;
    left: -7px; top: 18px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--olive);
    border: 2px solid var(--cream);
}
.timeline strong {
    color: var(--olive);
    font-family: var(--serif);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

/* ==== CTA strip ==== */
.cta {
    background: var(--olive);
    color: var(--cream);
    padding: 64px 0;
    text-align: center;
}
.cta h2 { color: var(--cream); margin-bottom: 14px; }
.cta p {
    color: rgba(250, 246, 237, 0.85);
    max-width: 620px;
    margin: 0 auto 28px;
    font-size: 1.06rem;
}
.cta .btn--ghost {
    color: var(--cream);
    border-color: var(--cream);
}
.cta .btn--ghost:hover { background: var(--cream); color: var(--olive); }

/* ==== Thank-you ==== */
.thanks {
    padding: 90px 0;
    text-align: center;
}
.thanks .icon {
    width: 92px; height: 92px;
    margin: 0 auto 28px;
    color: var(--copper);
}
.thanks .lead {
    max-width: 680px;
    margin: 0 auto 42px;
    color: var(--ink-soft);
    font-size: 1.08rem;
}
.thanks .next {
    max-width: 780px;
    margin: 0 auto 40px;
    list-style: none;
    padding: 0;
    text-align: left;
}
.thanks .next li {
    background: var(--paper);
    padding: 22px 26px;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--copper);
    margin-bottom: 14px;
}
.thanks .next h3 { font-size: 1.05rem; margin-bottom: 6px; }
.thanks .next p { font-size: .94rem; color: var(--ink-soft); margin: 0; }
.thanks .actions {
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}

/* ==== Footer ==== */
[data-me-footer] {
    background: var(--olive-dark);
    color: var(--cream);
    padding: 64px 0 0;
}
[data-me-footer] .grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter) 44px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 44px;
}
[data-me-footer] [data-me-logo] span:first-child { color: var(--cream); }
[data-me-footer] [data-me-logo] span:last-child { color: var(--copper); }
[data-me-footer] p, [data-me-footer] address {
    color: rgba(250, 246, 237, 0.78);
    font-style: normal;
    font-size: .92rem;
    line-height: 1.75;
}
[data-me-footer] h4 {
    color: var(--cream);
    margin-bottom: 18px;
    font-size: .82rem;
    letter-spacing: .14em;
}
[data-me-footer] ul { list-style: none; padding: 0; margin: 0; }
[data-me-footer] ul li { margin-bottom: 9px; }
[data-me-footer] a {
    color: rgba(250, 246, 237, 0.85);
    font-size: .93rem;
    text-decoration: none;
}
[data-me-footer] a:hover { color: var(--copper); text-decoration: underline; }
[data-me-footer] .bottom {
    border-top: 1px solid rgba(250, 246, 237, 0.14);
    padding: 22px var(--gutter);
    text-align: center;
}
[data-me-footer] .bottom p {
    margin: 0;
    font-size: .85rem;
    color: rgba(250, 246, 237, 0.55);
}

/* ==== Misc ==== */
.facts {
    list-style: none;
    padding: 0; margin: 0;
}
.facts li {
    padding: 7px 0;
    border-bottom: 1px solid var(--rule);
    font-size: .92rem;
    color: var(--ink-soft);
}
.facts li:last-child { border-bottom: none; }
.facts strong { color: var(--ink); margin-right: 4px; }

.figure { margin: 26px 0; }
.figure img { border-radius: var(--r); }
.figure figcaption {
    font-size: .85rem;
    color: var(--mute);
    padding-top: 8px;
    font-style: italic;
}

/* ==== Breakpoints ==== */
@media (max-width: 900px) {
    [data-me-hero] .grid { grid-template-columns: 1fr; gap: 44px; }
    [data-me-hero] .visual img { aspect-ratio: 16/11; }
    .two-col { grid-template-columns: 1fr; gap: 36px; }
    .aside { position: static; }
    [data-me-footer] .grid { grid-template-columns: 1fr 1fr; }
    .index-list > li { grid-template-columns: 50px 1fr; }
    .index-list .meta { grid-column: 2; text-align: left; margin-top: 6px; }
}
@media (max-width: 720px) {
    [data-me-toggle] { display: block; }
    [data-me-nav] ul {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--cream);
        flex-direction: column;
        padding: 22px var(--gutter);
        gap: 16px;
        align-items: stretch;
        border-bottom: 1px solid var(--rule);
    }
    [data-me-nav] ul.is-open { display: flex; }
    .section { padding: 56px 0; }
    [data-me-hero] { padding: 56px 0; }
    [data-me-hero] h1 { font-size: 2.1rem; }
    h2 { font-size: 1.55rem; }
    .form .row { grid-template-columns: 1fr; }
    [data-me-footer] .grid { grid-template-columns: 1fr; gap: 30px; }
    [data-me-hero] .stats { grid-template-columns: 1fr; border-left: none; border-top: 3px solid var(--copper); padding-top: 16px; }
    [data-me-hero] .stats li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
    [data-me-hero] .stats li::before { display: none; }
}
@media (max-width: 480px) {
    :root { --gutter: 20px; }
    .letter { padding: 22px 22px 24px; }
    .letter__media { margin: 0 -22px 18px; }
    .plan { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
