:root {
    /* Palette sampled from images/logosama.png: black #000000, gold #F0C838,
       deep shade #B09030. Light warm-gold ground - distinct from the customers
       page (plain cream) without going dark. */
    --ink: #1a1508;
    --ink-2: #4a4132;
    --ink-3: #6f6757;
    --gold: #f0c838;
    --gold-deep: #a8842a;
    --gold-tint: rgba(240, 200, 56, 0.16);
    --gold-line: rgba(176, 144, 48, 0.3);

    --surface: rgba(255, 253, 246, 0.94);
    --surface-line: rgba(176, 144, 48, 0.28);
    --page-from: #fdf3d4;
    --page-to: #f6e3b4;

    --step-title: clamp(1.3rem, 5.2vw, 2.05rem);
    --step-cta: clamp(0.95rem, 3.6vw, 1.1rem);
    --step-chip: clamp(0.7rem, 2.6vw, 0.78rem);
    --step-meta: clamp(0.7rem, 2.6vw, 0.78rem);

    /* One typeface for the whole card. Tajawal ships 200/300/400/500/700/800/900 -
       never use 600: it has no real face and the browser fakes it. */
    --font-ui: 'Tajawal', system-ui, -apple-system, 'Segoe UI', 'Tahoma', sans-serif;
}

.sama-bg {
    background: linear-gradient(to bottom right, var(--page-from) 0%, var(--page-to) 100%);
}

.sama-glow-a {
    background: radial-gradient(ellipse at 30% 40%, rgba(240, 200, 56, 0.3) 0%, transparent 60%);
}

.sama-glow-b {
    background: radial-gradient(circle, rgba(176, 144, 48, 0.12) 0%, transparent 70%);
}

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

body {
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.glass-card-custom {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--surface-line);
    box-shadow: 0 20px 48px -22px rgba(90, 70, 20, 0.35);
}

.grid-pattern-custom {
    background-image: 
        linear-gradient(rgba(176, 144, 48, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(176, 144, 48, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.gradient-text {
    background: linear-gradient(135deg, #1a1508 0%, #a8842a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.smooth-transition {
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* ---------- Card layout: one flex column, one gap ---------- */

/* Language toggle: pinned to the card's top corner, out of the flex flow so it
   never adds a gap of its own. Follows dir, so it flips side with the language. */
.sama-card {
    position: relative;
}

.lang-toggle {
    position: absolute;
    top: clamp(0.9rem, 3vw, 1.25rem);
    inset-inline-end: clamp(0.9rem, 3vw, 1.25rem);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--gold-line);
    border-radius: 999px;
    background: var(--gold-tint);
    color: var(--ink-2);
    font-family: inherit;
    font-size: clamp(0.65rem, 2.4vw, 0.73rem);
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lang-toggle i {
    font-size: 0.9em;
    color: var(--gold-deep);
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
    background: rgba(240, 200, 56, 0.22);
    border-color: var(--gold-deep);
    color: var(--ink);
}

.lang-toggle:focus-visible {
    outline: 2px solid var(--gold-deep);
    outline-offset: 2px;
}

/* Every element in the card inherits the one typeface - no drift to a fallback. */
.sama-card,
.sama-card h1,
.sama-card a,
.sama-card span,
.sama-card bdi {
    font-family: var(--font-ui);
}

.sama-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1.35rem, 4.5vw, 1.9rem);
    padding: clamp(2rem, 6vw, 3rem) clamp(1.25rem, 5vw, 2.75rem);
}

.sama-logo {
    width: clamp(120px, 30vw, 168px);
    height: auto;
    object-fit: contain;
    display: block;
    margin-top: clamp(1.1rem, 3.5vw, 1.4rem);
}

.sama-logo:hover {
    transform: scale(1.02);
}

.sama-title {
    margin: 0;
    font-size: var(--step-title);
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.sama-title .brand {
    white-space: nowrap;
}

/* Parenthetical qualifier: lighter than the headline it follows. */
.sama-title .title-note {
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0;
    margin-top: 0.5em;
    color: var(--ink-3);
    -webkit-text-fill-color: var(--ink-3);
}

.gradient-text span {
    display: block;
}

.gradient-text span + span {
    margin-top: 0.15em;
}

/* ---------- Primary CTA ---------- */

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 56px;
    padding: 0.9rem 1.25rem;
    text-align: center;
    border-radius: 10px;
    background: var(--gold);
    color: #14110c;
    font-family: inherit;
    font-size: var(--step-cta);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.005em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(176, 140, 38, 0.5);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Qualifier inside the CTA: lighter so the action reads first. */
.btn-primary > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15em;
}

.btn-primary .btn-label {
    white-space: nowrap;
}

.btn-primary .btn-note {
    font-size: 0.8em;
    font-weight: 700;
    line-height: 1.25;
    opacity: 0.72;
    /* Bilingual text is long: let it wrap rather than overflow the button. */
    text-wrap: balance;
}

.btn-primary .btn-icon {
    font-size: 1em;
    color: #14110c;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #ffd84d;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -8px rgba(176, 140, 38, 0.6);
}

.btn-primary:hover .btn-icon {
    transform: translateY(2px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ---------- Trust chips ---------- */

.trust-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
}

.trust-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: var(--gold-tint);
    border: 1px solid var(--gold-line);
    font-size: var(--step-chip);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.005em;
    color: var(--ink-2);
    white-space: nowrap;
}

.trust-chip i {
    font-size: 0.9em;
    color: var(--gold-deep);
    flex-shrink: 0;
}

/* ---------- Card footer ---------- */

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem 1.25rem;
    width: 100%;
    padding-top: clamp(0.9rem, 3vw, 1.15rem);
    border-top: 1px solid rgba(240, 200, 56, 0.18);
}

.card-foot > * {
    min-width: 0;
}

.stores-note {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: var(--step-meta);
    font-weight: 700;
    line-height: 1;
    color: var(--ink-3);
    white-space: nowrap;
}

.stores-note i {
    font-size: 1.15em;
    color: var(--ink-3);
    opacity: 0.8;
    flex-shrink: 0;
}

.captain-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 3px;
    color: var(--ink-2);
    text-decoration: none;
    font-size: var(--step-meta);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border-bottom: 1.5px solid var(--gold);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.captain-link i {
    font-size: 0.9em;
    color: var(--gold-deep);
    flex-shrink: 0;
}

.captain-link:hover,
.captain-link:focus-visible {
    color: var(--gold-deep);
    border-color: var(--gold-deep);
}

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

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    /* Floor for touch targets; the primary CTA keeps its taller 56px spec. */
    .btn-touch:not(.btn-primary) {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .card-foot {
        flex-direction: column-reverse;
        justify-content: center;
        gap: 0.85rem;
    }

    .sama-title {
        line-height: 1.5;
    }
}

@media (max-width: 380px) {
    .trust-chip {
        padding: 0.4rem 0.6rem;
        font-size: 0.65rem;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f3e7c6;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gold-deep);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* The logo sits on a dark card now, so its halo must be light, not a black shadow. */
.sama-logo.animate-subtle-glow {
    animation: samaLogoGlow 4s ease-in-out infinite;
}

@keyframes samaLogoGlow {
    0%, 100% { filter: drop-shadow(0 6px 18px rgba(90, 70, 20, 0.14)); }
    50% { filter: drop-shadow(0 10px 26px rgba(176, 144, 48, 0.3)); }
}
