/*
 |-----------------------------------------------------------------------------
 | Mawy Mondo — coming-soon page
 |-----------------------------------------------------------------------------
 | Tokens are lifted from the site's design system
 | (mawymondo/resources/css/app.css). Nothing here invents a new brand value:
 | the holding page has to read as the same company as the site that follows it.
 |
 | Layout uses logical properties throughout (inline-start/end, padding-inline),
 | so the Arabic RTL and English LTR passes are the same stylesheet.
 */

:root {
    /* Brand — from the style tile */
    --forest-deep: #032d18;
    --forest: #043d20;
    --leaf: #418211;
    --brass: #c8932b;
    --brass-light: #e0b45a;
    --cream: #f7f6f2;

    /* Type */
    --font-ar: 'Tajawal', 'IBM Plex Sans Arabic', ui-sans-serif, system-ui, sans-serif;
    --font-latin: 'Inter', ui-sans-serif, system-ui, sans-serif;

    /* Motion — the site's two speed bands, no spring, no overshoot */
    --ease-settle: cubic-bezier(0.2, 0, 0, 1);
    --ease-state: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-feedback: 180ms;
    --duration-draw: 900ms;

    --rule: rgb(255 255 255 / 0.14);
    --rule-strong: rgb(255 255 255 / 0.28);
}

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

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--forest-deep);
    color: var(--cream);
    font-family: var(--font-ar);
    font-size: 17px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

html[lang='en'] body {
    font-family: var(--font-latin);
}

/*
 | Latin runs inside Arabic copy — the brand name and the phone number.
 | Isolates bidi so digits and punctuation do not migrate to the wrong side.
 */
.latin {
    font-family: var(--font-latin);
    direction: ltr;
    unicode-bidi: isolate;
}

/*
 | Background: a faint plan-sheet grid plus one low green wash. It reads as the
 | ruled paper an inspection is recorded on, and it is the only decoration on
 | the page.
 */
.sheet {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(
            120% 90% at 50% 0%,
            rgb(65 130 17 / 0.18) 0%,
            rgb(3 45 24 / 0) 62%
        ),
        repeating-linear-gradient(
            to right,
            rgb(255 255 255 / 0.035) 0 1px,
            transparent 1px 88px
        ),
        repeating-linear-gradient(
            to bottom,
            rgb(255 255 255 / 0.035) 0 1px,
            transparent 1px 88px
        );
    mask-image: radial-gradient(130% 100% at 50% 40%, #000 40%, transparent 100%);
}

.page {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 40px;
    max-width: 1100px;
    margin-inline: auto;
    padding: 28px 20px 32px;
}

@media (min-width: 900px) {
    .page {
        padding: 40px 48px 44px;
        gap: 56px;
    }
}

/* -- Masthead ------------------------------------------------------------- */

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--cream);
    text-decoration: none;
}

.brand__mark {
    width: 38px;
    height: 38px;
    flex: none;
    color: var(--cream);
}

.brand__type {
    display: flex;
    flex-direction: column;
    gap: 5px;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
}

.brand__name {
    font-family: var(--font-latin);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
}

.brand__sub {
    font-family: var(--font-latin);
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: 0.26em;
    line-height: 1;
    color: rgb(247 246 242 / 0.6);
}

@media (min-width: 900px) {
    .brand__name {
        font-size: 20px;
    }

    .brand__sub {
        font-size: 9.5px;
        letter-spacing: 0.28em;
    }
}

/* Language toggle — one control, both states visible, current one lit. */
.lang {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: transparent;
    color: rgb(247 246 242 / 0.62);
    font: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition:
        border-color var(--duration-feedback) var(--ease-state),
        color var(--duration-feedback) var(--ease-state);
}

.lang:hover {
    border-color: var(--rule-strong);
    color: var(--cream);
}

.lang:focus-visible {
    outline: 2px solid var(--brass-light);
    outline-offset: 3px;
}

.lang__opt {
    transition: color var(--duration-feedback) var(--ease-state);
}

.lang__opt[data-lang-opt='ar'] {
    font-family: var(--font-ar);
}

.lang__opt[data-lang-opt='en'] {
    font-family: var(--font-latin);
    letter-spacing: 0.08em;
}

.lang__opt.is-current {
    color: var(--brass-light);
    font-weight: 700;
}

.lang__sep {
    width: 1px;
    height: 13px;
    background: var(--rule);
}

/* -- Stage ---------------------------------------------------------------- */

.stage {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding-block: 8px;
}

.headline {
    margin: 0;
    font-size: clamp(3.5rem, 13vw, 8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--cream);
}

html[lang='en'] .headline {
    font-size: clamp(3rem, 10vw, 6.5rem);
    letter-spacing: -0.03em;
}

.lede {
    margin: 0;
    max-width: 46ch;
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.85;
    color: rgb(247 246 242 / 0.74);
}

/* -- Countdown ------------------------------------------------------------ */

/*
 | Read as an instrument, not as four cards: a hairline rail, a brass fill that
 | shows how far into the current day the wait has travelled, and a tick under
 | each value. `hidden` until app.js confirms a valid launch date.
 */
.countdown {
    width: 100%;
    max-width: 620px;
    margin-block-start: 6px;
}

.rail {
    position: relative;
    height: 2px;
    background: var(--rule);
    overflow: hidden;
}

.rail__progress {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 0;
    background: var(--brass);
    transition: width var(--duration-draw) var(--ease-settle);
}

.units {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}

.unit {
    position: relative;
    display: flex;
    flex-direction: column;
    /*
     | `flex-start`, not the default stretch: a stretched flex item is a full
     | width block, and `.unit__value` sets `direction: ltr` for the numeral, so
     | its text would align to *its own* start — the left — and drift away from
     | the tick. Hugging the start edge keeps every value under its own tick in
     | both directions.
     */
    align-items: flex-start;
    gap: 4px;
    padding-block-start: 18px;
    padding-inline-end: 12px;
}

/* The tick that ties each value to its place on the rail. */
.unit::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    width: 1px;
    height: 10px;
    background: var(--rule-strong);
}

.unit__value {
    font-family: var(--font-latin);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.75rem, 5.4vw, 2.75rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--brass-light);
    direction: ltr;
    unicode-bidi: isolate;
}

.unit--seconds .unit__value {
    color: rgb(224 180 90 / 0.55);
}

.unit__label {
    font-size: 13px;
    line-height: 1.5;
    color: rgb(247 246 242 / 0.5);
}

html[lang='en'] .unit__label {
    font-size: 12px;
}

.countdown__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* -- Contact -------------------------------------------------------------- */

.contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-block-start: 4px;
}

.contact__item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    color: var(--cream);
    font-size: 16px;
    line-height: 1.4;
    text-decoration: none;
    transition:
        border-color var(--duration-feedback) var(--ease-state),
        background-color var(--duration-feedback) var(--ease-state);
}

a.contact__item:hover {
    border-color: var(--brass);
    background-color: rgb(200 147 43 / 0.1);
}

a.contact__item:focus-visible {
    outline: 2px solid var(--brass-light);
    outline-offset: 3px;
}

.contact__item--primary {
    border-color: rgb(200 147 43 / 0.55);
    background-color: rgb(200 147 43 / 0.12);
}

/*
 | A contact value the client has not supplied yet renders as a dashed,
 | non-interactive chip. It states the gap instead of hiding it behind a link
 | that would dial nothing.
 */
.contact__item--pending {
    border-style: dashed;
    color: rgb(247 246 242 / 0.55);
    cursor: default;
}

.contact__icon {
    width: 17px;
    height: 17px;
    flex: none;
    color: var(--brass-light);
}

.contact__item--pending .contact__icon {
    color: rgb(247 246 242 / 0.4);
}

.contact__value {
    font-family: var(--font-latin);
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
}

/* -- Colophon ------------------------------------------------------------- */

.colophon {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    padding-block-start: 20px;
    border-block-start: 1px solid var(--rule);
    font-size: 14px;
    color: rgb(247 246 242 / 0.5);
}

.colophon p {
    margin: 0;
}

/* -- Load sequence -------------------------------------------------------- */

/*
 | One orchestrated entrance, on load only. The rail draws, the rest settles
 | behind it. Nothing animates again while the page sits open except the
 | countdown values themselves.
 */
@media (prefers-reduced-motion: no-preference) {
    .headline,
    .lede,
    .countdown,
    .contact,
    .colophon {
        animation: settle 560ms var(--ease-settle) backwards;
    }

    .lede {
        animation-delay: 80ms;
    }

    .countdown {
        animation-delay: 160ms;
    }

    .contact {
        animation-delay: 240ms;
    }

    .colophon {
        animation-delay: 320ms;
    }
}

@keyframes settle {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rail__progress {
        transition: none;
    }
}
