/* ==========================================================================
   Public wedding site: mobile first, right-to-left ready (logical properties)
   ========================================================================== */

:root {
    --ivory: #f8f4ee;
    --paper: #fffdf9;
    --ink: #2f2a26;
    --ink-soft: #5b534c;
    --muted: #8a8077;
    --gold: #a9834a;
    --gold-soft: #e9dcc6;
    --sage: #6f8a74;
    --sage-dark: #4f6a55;
    --blush: #f2e4df;
    --line: #e6ddd0;
    --danger: #a4433a;
    --success: #3f7a4f;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 10px 30px rgba(68, 52, 32, 0.08);
    --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-script: "Great Vibes", "Cormorant Garamond", cursive;
    --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --body-size: 1rem;
    --body-line: 1.65;
    --eyebrow-spacing: 0.18em;
}

html[lang="ar"] {
    --font-heading: "Amiri", "Noto Naskh Arabic", serif;
    --font-script: "Aref Ruqaa", "Amiri", serif;
    --font-body: "Noto Naskh Arabic", "Amiri", system-ui, sans-serif;
    --body-size: 1.08rem;
    --body-line: 1.9;
    --eyebrow-spacing: 0;
}

/* Letter spacing breaks the joined letters of Arabic script. */
html[lang="ar"] * {
    letter-spacing: 0 !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--body-size);
    line-height: var(--body-line);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--sage-dark);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

p {
    margin: 0 0 1em;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    vertical-align: -0.2em;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: -4rem;
    z-index: 100;
    background: var(--ink);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
    position: absolute;
    top: 0;
    inset-inline: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
}

.site-monogram {
    font-family: var(--font-script);
    font-size: 1.9rem;
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    gap: 0.1em;
}

.site-monogram-amp {
    color: var(--gold);
    font-size: 0.8em;
    align-self: center;
}

/* The Arabic pages' monogram is a drawing (Shared/ArabicMonogram) in the text colour. */
.site-monogram-art {
    display: block;
    height: 2.4rem;
    width: auto;
    aspect-ratio: 441 / 346;
}

.lang-switch {
    display: inline-flex;
    background: rgba(255, 253, 249, 0.85);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
    backdrop-filter: blur(6px);
}

.lang-switch a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    font-family: system-ui, sans-serif;
}

.lang-switch a[lang="ar"] {
    font-family: "Noto Naskh Arabic", system-ui, sans-serif;
}

.lang-switch a.is-active {
    background: var(--ink);
    color: #fff;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: calc(90px + env(safe-area-inset-top)) 20px 90px;
    overflow: hidden;
    isolation: isolate;
}

.hero--plain {
    background:
        radial-gradient(circle at 15% 20%, rgba(233, 220, 198, 0.9), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(242, 228, 223, 0.9), transparent 50%),
        var(--ivory);
}

.hero--plain::before {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid var(--gold-soft);
    border-radius: 28px;
    pointer-events: none;
    z-index: -1;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero--photo::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(20, 16, 12, 0.35) 0%, rgba(20, 16, 12, 0.25) 40%, rgba(20, 16, 12, 0.6) 100%);
}

.hero--photo,
.hero--photo .hero-tagline,
.hero--photo .hero-date,
.hero--photo .hero-location {
    color: #fff;
}

/* Light monogram over a photo. */
body:has(.hero--photo) .site-monogram {
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

body:has(.hero--photo) .site-monogram-art {
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.35));
}

.hero-content {
    max-width: 720px;
    animation: rise 0.9s ease both;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1.1rem, 4.5vw, 1.45rem);
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}

html[lang="ar"] .hero-tagline {
    font-style: normal;
}

.hero-names {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(3.4rem, 16vw, 7rem);
    line-height: 1.05;
    margin: 0 0 0.3em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    column-gap: 0.25em;
}

html[lang="ar"] .hero-names {
    font-size: clamp(3rem, 14vw, 6rem);
    line-height: 1.4;
}

.hero-amp {
    color: var(--gold);
    font-size: 0.7em;
}

/* Phones: each name on its own line with the "&" between, so the names can be larger. */
@media (max-width: 759px) {
    .hero-names {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        font-size: clamp(4rem, 20vw, 5.4rem);
        line-height: 1.1;
    }

    html[lang="ar"] .hero-names {
        font-size: clamp(3.6rem, 18vw, 4.8rem);
        line-height: 1.35;
    }

    .hero-names .hero-amp {
        font-size: 0.55em;
        line-height: 1.1;
    }
}

/* Arabic cover: the names are a calligraphy picture (black ink on a clear background). */
.hero-names.hero-names--art {
    display: block;
    font-size: 1rem;
    line-height: 0;
    margin: 0.4rem 0 1.3rem;
}

.hero-names--art img {
    width: min(100%, clamp(330px, 46vw, 640px));
    height: auto;
    margin-inline: auto;
    opacity: 0.88; /* softens pure black to the page's ink colour */
}

/* Over a cover photo the ink turns white, like the rest of the text. */
.hero--photo .hero-names--art img {
    filter: invert(1) drop-shadow(0 2px 14px rgba(0, 0, 0, 0.35));
    opacity: 1;
}

.hero--photo .hero-amp {
    color: var(--gold-soft);
}

.hero-date {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 5vw, 1.7rem);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.hero-location {
    text-transform: uppercase;
    letter-spacing: var(--eyebrow-spacing);
    font-size: 0.8rem;
    color: var(--muted);
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: 420px;
    margin: 1.6rem auto 0;
}

.countdown-unit {
    background: rgba(255, 253, 249, 0.75);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 4px 10px;
    backdrop-filter: blur(6px);
}

.hero--photo .countdown-unit {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}

.countdown-value {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 7vw, 2.1rem);
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 6px;
    opacity: 0.8;
}

.countdown.is-today {
    grid-template-columns: 1fr;
    font-family: var(--font-heading);
    font-size: 1.6rem;
}

.hero-scroll {
    position: absolute;
    bottom: calc(18px + env(safe-area-inset-bottom));
    inset-inline: 0;
    margin-inline: auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: inherit;
    font-size: 1.4rem;
    animation: bob 2.4s ease-in-out infinite;
}

/* ---------- Sections ---------- */

.section {
    padding: 56px 0;
}

.section--tint {
    background: var(--paper);
    border-block: 1px solid var(--line);
}

.section--center {
    min-height: 70vh;
    display: grid;
    place-items: center;
    padding-top: 110px;
}

.section-inner {
    max-width: 960px;
    margin-inline: auto;
    padding-inline: 20px;
}

.section-inner.narrow {
    max-width: 680px;
}

.section-inner.wide {
    max-width: 1180px;
}

.center {
    text-align: center;
}

.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: var(--eyebrow-spacing);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.4rem;
}

.section-title {
    font-size: clamp(1.9rem, 7vw, 2.6rem);
}

/* Olive-sprig divider (Shared/Ornament.razor). */
.ornament {
    display: block;
    width: clamp(150px, 44vw, 190px);
    height: auto;
    margin-inline: auto;
    color: var(--gold);
}

.section-ornament {
    margin-block: 0.5rem 1.4rem;
}

.hero-ornament {
    margin-block: 0.2rem 1.1rem;
}

.hero--photo .hero-ornament {
    color: var(--gold-soft);
}

.lead-text {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 4.8vw, 1.55rem);
    line-height: 1.55;
    color: var(--ink);
    white-space: pre-line;
}

.body-text {
    color: var(--ink-soft);
    white-space: pre-line;
}

.muted-text {
    color: var(--muted);
}

.small-text {
    font-size: 0.85rem;
}

/* ---------- Event cards ---------- */

.event-stack {
    display: grid;
    gap: 22px;
    max-width: 680px;
    margin-inline: auto;
}

@media (min-width: 1024px) {
    .event-stack--grid {
        max-width: 1140px;
        grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
        justify-content: center;
        align-items: stretch;
    }

    /* Side by side, the cards share one height and their buttons line up along the bottom. */
    .event-stack--grid .event-card,
    .event-stack--grid .event-card-body {
        display: flex;
        flex-direction: column;
    }

    .event-stack--grid .event-card-body {
        flex: 1;
    }

    .event-stack--grid .event-actions {
        margin-top: auto;
    }
}

.rsvp-message {
    font-style: italic;
}

.event-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    scroll-margin-top: 20px;
}

.event-card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.event-card-body {
    padding: 22px 20px 24px;
}

.event-card-date {
    text-transform: uppercase;
    letter-spacing: var(--eyebrow-spacing);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.event-card-title {
    font-size: clamp(1.6rem, 6.5vw, 2rem);
    margin-bottom: 0.8rem;
}

.event-facts {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 10px;
}

.event-facts li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--ink-soft);
}

.event-facts .icon {
    color: var(--sage);
    margin-top: 0.25em;
}

.event-facts strong {
    color: var(--ink);
    font-weight: 600;
    display: block;
}

.event-address {
    display: block;
}

.event-card-text {
    color: var(--ink-soft);
    white-space: pre-line;
}

.event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0.4rem;
}

/* ---------- Buttons ---------- */

.btn-primary,
.btn-soft,
.btn-link {
    font-family: inherit;
    cursor: pointer;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0.7rem 1.6rem;
    border: 0;
    border-radius: 999px;
    background: var(--sage-dark);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(79, 106, 85, 0.25);
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary:hover {
    background: #415a47;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-block {
    width: 100%;
}

.btn-whatsapp-public {
    background: #1f9d55;
    box-shadow: 0 8px 20px rgba(31, 157, 85, 0.25);
}

.btn-whatsapp-public:hover {
    background: #19854a;
}

.btn-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-soft:hover {
    border-color: var(--gold);
    color: var(--ink);
}

.btn-link {
    background: none;
    border: 0;
    padding: 0.4rem 0;
    color: var(--sage-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- RSVP ---------- */

.rsvp {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--line);
}

.rsvp-seats {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.rsvp-flash,
.rsvp-error,
.rsvp-closed {
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    font-weight: 500;
}

.rsvp-flash {
    background: #e7f2ea;
    color: var(--success);
    display: flex;
    gap: 8px;
    align-items: center;
}

.rsvp-error {
    background: #f8e6e3;
    color: var(--danger);
}

.rsvp-closed {
    background: var(--blush);
    color: var(--ink-soft);
}

.rsvp-summary {
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    background: #eef4ef;
}

.rsvp-summary--no {
    background: var(--blush);
}

.rsvp-summary-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.rsvp-summary-line {
    margin-bottom: 0.4rem;
    color: var(--ink-soft);
}

.rsvp-form {
    display: grid;
    gap: 16px;
}

.rsvp-choice {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rsvp-choice legend {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    padding: 0;
}

.choice {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 58px;
    padding: 0.6rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.choice input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
}

.choice:has(input:focus-visible) {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.choice--yes:has(input:checked) {
    border-color: var(--sage-dark);
    background: var(--sage-dark);
    color: #fff;
}

.choice--no:has(input:checked) {
    border-color: var(--ink-soft);
    background: var(--ink-soft);
    color: #fff;
}

/* Guest count and dietary fields only matter when accepting. */
.rsvp-form:not(:has(input[value="attending"]:checked)) .rsvp-attending {
    display: none;
}

.rsvp-attending {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 6px;
}

.field-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ink);
}

.field-input {
    width: 100%;
    min-height: 50px;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 16px; /* keeps iPhones from zooming in */
}

textarea.field-input {
    min-height: 96px;
    resize: vertical;
}

.field-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(169, 131, 74, 0.18);
}

.rsvp-deadline {
    font-weight: 600;
    color: var(--gold);
}

/* ---------- Invitation page ---------- */

.invite-hero {
    text-align: center;
    padding: calc(100px + env(safe-area-inset-top)) 20px 36px;
    background:
        radial-gradient(circle at 20% 10%, rgba(233, 220, 198, 0.8), transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(242, 228, 223, 0.8), transparent 50%),
        var(--ivory);
}

.invite-hero-inner {
    max-width: 640px;
    margin-inline: auto;
    animation: rise 0.8s ease both;
}

.invite-greeting {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.invite-intro {
    color: var(--ink-soft);
}

.invite-names {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(3rem, 14vw, 5.5rem);
    line-height: 1.1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0.22em;
    margin: 0.1em 0 0.3em;
}

html[lang="ar"] .invite-names {
    line-height: 1.4;
}

/* Arabic: the calligraphy picture from the home page, a little smaller to suit this header. */
.invite-names.invite-names--art {
    display: block;
    font-size: 1rem;
    line-height: 0;
    margin: 0.6rem 0 1.1rem;
}

.invite-names--art img {
    width: min(100%, clamp(300px, 40vw, 540px));
    height: auto;
    margin-inline: auto;
    opacity: 0.88; /* softens pure black to the page's ink colour, as on the home page */
}

.invite-deadline {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid var(--gold-soft);
    border-radius: 999px;
    padding: 0.3rem 1rem;
    background: rgba(255, 253, 249, 0.7);
}

.section--events {
    padding-top: 28px;
}

.preview-banner {
    background: #283a31;
    color: #fff;
    font-family: system-ui, sans-serif;
    font-size: 0.85rem;
    padding: 0.7rem 1rem;
    text-align: center;
}

/* ---------- FAQ ---------- */

.faq {
    display: grid;
    gap: 10px;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    color: var(--gold);
    font-size: 1.4rem;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: "–";
}

.faq-item p {
    padding: 0 1.1rem 1rem;
    margin: 0;
    color: var(--ink-soft);
    white-space: pre-line;
}

/* ---------- Guide page (/faq): the Fatiha and the Katb al-Kitab ---------- */

.guide-hero {
    text-align: center;
    padding: calc(96px + env(safe-area-inset-top)) 20px 30px;
    background:
        radial-gradient(circle at 15% 10%, rgba(233, 220, 198, 0.8), transparent 50%),
        radial-gradient(circle at 85% 95%, rgba(242, 228, 223, 0.8), transparent 50%),
        var(--ivory);
}

.guide-hero-inner {
    max-width: 680px;
    margin-inline: auto;
    animation: rise 0.8s ease both;
}

.guide-title {
    font-size: clamp(2.1rem, 8.5vw, 3.2rem);
    margin-bottom: 0.2rem;
}

.guide-intro {
    color: var(--ink-soft);
    margin-bottom: 1.3rem;
}

.faq-item .guide-answer {
    padding: 0 1.1rem 1.1rem;
    color: var(--ink-soft);
}

.faq-item .guide-answer p {
    padding: 0;
    margin: 0 0 0.8em;
    white-space: normal;
}

.faq-item .guide-answer > :last-child {
    margin-bottom: 0;
}

.guide-steps {
    margin: 0 0 0.8em;
    padding-inline-start: 1.4em;
    display: grid;
    gap: 0.55em;
}

html[lang="ar"] .guide-steps {
    list-style-type: arabic-indic;
}

.guide-steps li::marker {
    color: var(--gold);
    font-weight: 600;
}

.guide-steps strong {
    color: var(--ink);
    font-weight: 600;
}

.guide-quote {
    margin: 0.2em 0 0;
    padding: 0.8rem 1rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-soft);
    background: #fbf6ef;
    text-align: center;
}

/* Quranic and other Arabic religious text, shown on the English page too. */
.arabic-verse {
    margin: 0;
    font-family: "Amiri Quran", "Amiri", "Noto Naskh Arabic", serif;
    font-size: clamp(1.45rem, 5.6vw, 1.75rem);
    line-height: 2.1;
    color: var(--ink);
    letter-spacing: 0;
}

.ayat {
    list-style: none;
    margin: 1.4rem 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.ayah {
    padding: 0.9rem 1.1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    text-align: center;
}

.ayah-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    margin-inline: 0.15em;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-size: 0.55em;
    line-height: 1;
    vertical-align: 0.3em;
}

.ayah-sound {
    margin: 0.35rem 0 0.2rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-style: italic;
}

.ayah-meaning {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--ink);
}

.surah {
    margin-top: 1.4rem;
    padding: 1.1rem 1.2rem 1.3rem;
    border: 1px solid var(--gold-soft);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}

.surah .arabic-verse {
    line-height: 2.4;
}

.guide-ameen {
    margin: 1.1rem 0 0;
}

.guide-verse {
    margin-top: 2.2rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.guide-verse-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink);
}

.guide-verse-source {
    margin: 0 0 0.6rem;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
}

.guide-verse .ayah-meaning {
    margin-top: 0.4rem;
}

.guide-back {
    margin: 1.6rem 0 0;
}

/* The link to the guide on the home and invitation pages (Shared/GuideTeaser.razor). */
.guide-teaser {
    margin-top: 1.4rem;
    padding: 1.1rem 1.1rem 1.2rem;
    border-radius: var(--radius-sm);
    background:
        radial-gradient(circle at 100% 0%, rgba(233, 220, 198, 0.7), transparent 60%),
        #fbf6ef;
    border: 1px solid var(--gold-soft);
}

.guide-teaser-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.4rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
}

.guide-teaser-title .icon {
    color: var(--gold);
}

.guide-teaser-text {
    color: var(--ink-soft);
    margin-bottom: 0.7rem;
}

.guide-title .nowrap {
    white-space: nowrap;
}

/* Invitation page: the guide card sits between the events and the "Questions?" section. */
.section--guide {
    padding-top: 0;
}

.section--guide .guide-teaser {
    margin-top: 0;
}

.section--guide + .section--rsvp {
    padding-top: 0;
}

/* ---------- Footer ---------- */

.site-footer {
    text-align: center;
    padding: 48px 20px calc(40px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.footer-names {
    font-family: var(--font-script);
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
}

.footer-hashtag {
    font-weight: 600;
    color: var(--gold);
}

.footer-note {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ---------- Admin button (footer of the home page; in the header only when signed in) ---------- */

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-admin,
.header-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0.35rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

:lang(ar) .footer-admin,
:lang(ar) .header-admin {
    font-family: "Noto Naskh Arabic", system-ui, sans-serif;
}

.footer-admin {
    margin-top: 22px;
}

.header-admin {
    min-height: 42px;
    background: rgba(255, 253, 249, 0.85);
    color: var(--ink-soft);
    backdrop-filter: blur(6px);
}

.footer-admin .icon,
.header-admin .icon {
    width: 15px;
    height: 15px;
}

.footer-admin:hover,
.footer-admin:focus-visible,
.header-admin:hover,
.header-admin:focus-visible {
    color: var(--ink);
    border-color: var(--ink-soft);
}

/* Small phones: just the lock, so the language switch still fits. */
@media (max-width: 374px) {
    .header-admin {
        padding-inline: 0.7rem;
    }

    .header-admin span {
        display: none;
    }
}

/* ---------- Photos & wishes (event albums) ---------- */

/* Arrows and similar icons point the other way in Arabic. */
[dir="rtl"] .icon-flip {
    transform: scaleX(-1);
}

.album-teaser {
    margin-top: 1.4rem;
    padding: 1.1rem 1.1rem 1.2rem;
    border-radius: var(--radius-sm);
    background:
        radial-gradient(circle at 100% 0%, rgba(233, 220, 198, 0.7), transparent 60%),
        #fbf6ef;
    border: 1px solid var(--gold-soft);
}

.album-teaser-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.album-teaser-title .icon {
    color: var(--gold);
}

.album-teaser-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 0.8rem;
}

.album-teaser-strip img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    background: var(--line);
}

.album-teaser-text {
    color: var(--ink-soft);
    margin-bottom: 0.4rem;
}

.album-teaser-counts {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.8rem;
}

.album-teaser-button {
    margin-top: 0.3rem;
}

.album-hero {
    text-align: center;
    padding: calc(96px + env(safe-area-inset-top)) 20px 30px;
    background:
        radial-gradient(circle at 15% 10%, rgba(233, 220, 198, 0.8), transparent 50%),
        radial-gradient(circle at 85% 95%, rgba(242, 228, 223, 0.8), transparent 50%),
        var(--ivory);
}

.album-hero-inner {
    max-width: 680px;
    margin-inline: auto;
    animation: rise 0.8s ease both;
}

.album-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.album-title {
    font-size: clamp(2.2rem, 9vw, 3.4rem);
    margin-bottom: 0.2rem;
}

.album-date {
    color: var(--ink-soft);
    margin-bottom: 1.2rem;
}

.album-couple {
    font-family: var(--font-script);
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.album-intro {
    max-width: 30rem;
    margin: -0.4rem auto 1.2rem;
    color: var(--ink-soft);
}

.album-jump {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.album-pill {
    min-width: 1.6em;
    padding: 0 0.45em;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
}

.album-section {
    padding: 44px 0 52px;
}

.album-section .section-title {
    margin-bottom: 0.8rem;
}

.album-flash {
    max-width: 620px;
    margin: 0 auto 1.2rem;
}

.album-upload {
    max-width: 560px;
    margin: 0 auto 1.8rem;
    padding: 1.3rem 1.2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    text-align: center;
}

.album-upload p {
    margin: 0;
}

.album-name {
    text-align: start;
}

.album-pick {
    position: relative;
    width: 100%;
    cursor: pointer;
}

/* The real file input sits invisibly on top of the button, so tapping anywhere opens the photo picker. */
.album-pick input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.album-pick:has(input:focus-visible) {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.album-upload.is-busy .album-pick {
    opacity: 0.55;
    pointer-events: none;
}

.album-progress {
    display: grid;
    gap: 6px;
}

.album-progress[hidden] {
    display: none;
}

.album-progress progress {
    width: 100%;
    height: 10px;
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.album-progress progress::-webkit-progress-bar {
    background: var(--line);
}

.album-progress progress::-webkit-progress-value {
    background: var(--sage);
    border-radius: 999px;
}

.album-progress progress::-moz-progress-bar {
    background: var(--sage);
    border-radius: 999px;
}

.album-progress-text {
    font-weight: 600;
}

.album-note {
    max-width: 560px;
    margin: 0 auto 1.6rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--blush);
    color: var(--ink-soft);
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.album-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.album-tile {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background: var(--line);
}

.album-tile a {
    display: block;
    height: 100%;
}

.album-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-tile a:hover img {
    transform: scale(1.04);
}

.album-tile a:focus-visible {
    outline-offset: -3px;
}

.album-badge {
    position: absolute;
    inset-inline: 4px;
    bottom: 4px;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    background: rgba(47, 42, 38, 0.82);
    color: #fff;
    font-size: 0.68rem;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
}

.album-badge--inline {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--blush);
    color: var(--ink-soft);
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
}

/* Full-screen photo viewer */
.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(20, 17, 15, 0.97);
    color: #fff;
    overscroll-behavior: contain;
}

.lightbox::backdrop {
    background: rgba(20, 17, 15, 0.97);
}

.lightbox[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.lightbox-stage {
    display: grid;
    place-items: center;
    min-height: 0;
    padding: calc(60px + env(safe-area-inset-top)) 8px 8px;
    touch-action: pan-y pinch-zoom;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.26);
}

.lightbox-close {
    top: calc(10px + env(safe-area-inset-top));
    inset-inline-end: 10px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    inset-inline-start: 10px;
}

.lightbox-next {
    inset-inline-end: 10px;
}

.lightbox-nav[hidden] {
    display: none;
}

.lightbox-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    font-size: 0.92rem;
}

.lightbox-by {
    opacity: 0.85;
}

.lightbox-actions {
    display: flex;
    gap: 8px;
}

.lightbox-actions form {
    margin: 0;
}

.lightbox-actions form[hidden] {
    display: none;
}

.lightbox-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0.35rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lightbox-btn--danger {
    border-color: rgba(240, 150, 140, 0.55);
    color: #f6c0b8;
}

/* Wishes */
.wish-form {
    display: grid;
    gap: 16px;
    margin: 0 auto 2rem;
    padding: 1.3rem 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.wish-form p {
    margin: 0;
}

.check-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.check-line input {
    width: 20px;
    height: 20px;
    margin: 0.25em 0 0;
    flex-shrink: 0;
    accent-color: var(--sage-dark);
}

.wish-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.wish-card {
    position: relative;
    padding: 1.3rem 1.3rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.wish-card::before {
    content: "\201C";
    position: absolute;
    top: 0.05em;
    inset-inline-start: 0.3em;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3.2rem;
    line-height: 1;
    color: var(--gold-soft);
}

.wish-text {
    position: relative;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
    margin-bottom: 0.6rem;
}

.wish-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

.wish-name {
    font-weight: 600;
    color: var(--ink-soft);
}

.wish-own {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 0.7rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--line);
}

.wish-own form {
    margin: 0;
    margin-inline-start: auto;
}

.wish-delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--danger);
    font-size: 0.88rem;
}

@media (min-width: 640px) {
    .album-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
}

@media (min-width: 1024px) {
    .album-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .album-tile {
        border-radius: 10px;
    }

    .lightbox-stage {
        padding: 64px 72px 8px;
    }
}

/* ---------- Larger screens ---------- */

@media (min-width: 760px) {
    .site-header {
        padding: calc(30px + env(safe-area-inset-top)) 44px 14px;
    }

    .section {
        padding: 88px 0;
    }

    .event-card-body {
        padding: 30px 34px 32px;
    }

    .rsvp-choice {
        max-width: 460px;
    }
}

/* ---------- Home cover as an embossed card (Settings → Home page → Cover style; /?look=card to preview) ----------
   The card is cream paper on a slightly deeper backdrop; the raised flowers and frame are drawn by
   Shared/EmbossedCardArt. Its text sizes follow the card's width (cqi units), like print on a real card. */

.hero--card {
    padding: calc(68px + env(safe-area-inset-top)) 12px 64px;
}

/* The card replaces the rounded border; the backdrop fades back to the page colour at the bottom. */
.hero--card.hero--plain {
    background:
        linear-gradient(180deg, transparent 75%, var(--ivory)),
        radial-gradient(circle at 15% 20%, rgba(233, 220, 198, 0.9), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(242, 228, 223, 0.9), transparent 50%),
        #efe8dc;
}

.hero--card.hero--plain::before {
    content: none;
}

.paper-card {
    position: relative;
    width: min(100%, clamp(340px, calc((100vh - 132px) * 0.72), 600px));
    width: min(100%, clamp(340px, calc((100svh - 132px) * 0.72), 600px));
    /* Fill a phone's screen, but stay tall enough for the flowers to clear the text on small phones. */
    min-height: max(calc(100vh - 132px), 182vw);
    min-height: max(calc(100svh - 132px), 182vw);
    display: grid;
    place-items: center;
    container-type: inline-size;
    color: var(--ink);
    background-color: #f4f0e8;
    /* faint paper grain */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .36 0 0 0 0 .28 .35 0 0 0 -.16'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    border-radius: 3px;
    box-shadow:
        0 1px 1px rgba(60, 45, 25, 0.08),
        0 2px 6px rgba(60, 45, 25, 0.06),
        0 24px 50px -18px rgba(60, 45, 25, 0.35);
    animation: rise 0.9s ease both;
}

/* A soft darkening toward the card's edges. */
.paper-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(120, 100, 70, 0.06));
}

.card-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    will-change: transform; /* paint the relief once, not again with every countdown tick */
}

.paper-card .hero-content {
    position: relative;
    z-index: 1;
    max-width: none;
    width: 100%;
    padding: 33cqi 15cqi 29cqi;
    animation: none;
}

/* On a phone the tagline goes on two short lines, clear of the lily of the valley at the top left. */
.paper-card .hero-tagline {
    max-width: 62cqi;
    margin-inline: auto;
    text-wrap: balance;
    line-height: 1.35;
    color: var(--ink-soft);
    font-size: clamp(0.95rem, 4.4cqi, 1.4rem);
    margin-bottom: 0.4rem;
}

html[lang="ar"] .paper-card .hero-tagline {
    line-height: 1.6;
}

/* Names stacked on a narrow card, on one line on a wide one. */
.paper-card .hero-names:not(.hero-names--art) {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    font-size: clamp(3rem, 13cqi, 4.8rem);
    line-height: 1.05;
    margin-bottom: 0.2em;
}

.paper-card .hero-names .hero-amp {
    color: var(--gold);
    font-size: 0.55em;
    line-height: 1.1;
}

.paper-card .hero-names.hero-names--art {
    margin: 0.2rem 0 0.8rem;
}

.paper-card .hero-names--art img {
    width: min(100%, 62cqi);
    filter: none;
    opacity: 0.88;
}

.paper-card .hero-ornament {
    color: var(--gold);
    width: clamp(130px, 30cqi, 170px);
}

.paper-card .hero-date {
    color: var(--ink);
    font-size: clamp(1.2rem, 5cqi, 1.6rem);
}

.paper-card .hero-location {
    color: var(--muted);
    margin-bottom: 0;
}

.paper-card .countdown {
    max-width: 340px;
    gap: 8px;
    margin-top: 1.3rem;
}

.paper-card .countdown-unit {
    background: rgba(255, 253, 249, 0.45);
    border-color: var(--line);
    border-radius: 12px;
    padding: 10px 2px 8px;
    backdrop-filter: none;
}

.paper-card .countdown-value {
    font-size: clamp(1.4rem, 6cqi, 1.9rem);
}

.paper-card .countdown-label {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
}

html[lang="ar"] .paper-card .countdown-label {
    font-size: 0.78rem;
    line-height: 1.3;
}

/* Wider screens: a 4 × 5 card that fits the window. The flowers scale with the card's height, so the extra width is
   room between them and the text. Everything on the card, gaps included, is sized to the card, so on a short
   window the text shrinks with the flowers and stays clear of them. */
@media (min-width: 760px) {
    .paper-card {
        width: min(100%, clamp(340px, calc((100vh - 132px) * 0.8), 672px));
        width: min(100%, clamp(340px, calc((100svh - 132px) * 0.8), 672px));
        min-height: 0;
        aspect-ratio: 4 / 5;
    }

    .paper-card .hero-content {
        padding: 18cqi 15cqi 16.5cqi;
    }

    .paper-card .hero-tagline {
        max-width: none;
        line-height: inherit;
        font-size: max(0.8rem, 3.57cqi);
        margin-bottom: 1cqi;
    }

    html[lang="ar"] .paper-card .hero-tagline {
        line-height: 1.4;
    }

    .paper-card .hero-names:not(.hero-names--art) {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: baseline;
        column-gap: 0.22em;
        font-size: max(2rem, 9.8cqi);
    }

    .paper-card .hero-names .hero-amp {
        font-size: 0.7em;
    }

    .paper-card .hero-names.hero-names--art {
        margin: 0.4cqi 0 1.5cqi;
    }

    .paper-card .hero-names--art img {
        width: 30cqi;
    }

    .paper-card .hero-ornament {
        width: clamp(100px, 27cqi, 170px);
        margin-block: 0.5cqi 2.8cqi;
    }

    .paper-card .hero-date {
        font-size: max(0.9rem, 4.1cqi);
        margin-bottom: 0.5cqi;
    }

    .paper-card .countdown {
        max-width: 55cqi;
        gap: 1.25cqi;
        margin-top: 2.6cqi;
    }

    .paper-card .countdown-unit {
        padding: 1.6cqi 0.35cqi 1.35cqi;
    }

    .paper-card .countdown-value {
        font-size: max(1rem, 4.8cqi);
    }

    .paper-card .countdown-label {
        margin-top: 0.9cqi;
    }

    html[lang="ar"] .paper-card .countdown-label {
        font-size: max(0.66rem, 1.85cqi);
    }
}

/* ---------- Motion ---------- */

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
