/* ============================================================
   Ahlan Pet — premium contact page.
   Same design language as the .pp/.hp/.pf/.ph/.bp systems,
   namespaced under .ct. Self-contained tokens with fallbacks;
   loaded only on the contact page. Mobile-first, logical
   properties for RTL, reduced-motion aware.
   ============================================================ */

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

main.ct {
    --pp-ink: #14231f;
    --pp-ink-soft: #5d6b66;
    --pp-faint: #8a948f;
    --pp-line: #e8e6df;
    --pp-surface: #f6f5f0;
    --pp-card: #ffffff;
    --pp-primary: #0b7d67;
    --pp-primary-deep: #085e4e;
    --pp-primary-tint: #e6f4f0;
    --pp-accent: #b45309;
    --pp-accent-tint: #fdf0dd;
    --pp-danger: #b42318;
    --pp-r-lg: 20px;
    --pp-r-md: 14px;
    --pp-r-sm: 10px;
    --pp-sh-1: 0 1px 2px rgb(20 35 31 / 6%), 0 1px 4px rgb(20 35 31 / 6%);
    --pp-sh-2: 0 2px 6px rgb(20 35 31 / 6%), 0 14px 34px -14px rgb(20 35 31 / 20%);
    --pp-ease: cubic-bezier(.22, .61, .21, 1);

    font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--pp-ink);
    background: var(--pp-surface);
    padding-bottom: 34px;
}

main.ct a {
    text-decoration: none;
}

main.ct img {
    max-width: 100%;
}

.ct-container {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: 16px;
}

/* ---------- Reveal ---------- */
main.ct .pp-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .65s var(--pp-ease), transform .65s var(--pp-ease);
}

main.ct .pp-reveal.is-revealed {
    opacity: 1;
    transform: none;
}

/* ---------- Page hero band ---------- */
.ct-hero {
    background:
        radial-gradient(120% 150% at 90% -20%, rgb(11 125 103 / 40%), transparent 55%),
        linear-gradient(120deg, #0f2c26, #123a31 55%, #0e4d40);
    color: #fff;
    padding-block: 34px 30px;
}

[dir="rtl"] .ct-hero {
    background:
        radial-gradient(120% 150% at 10% -20%, rgb(11 125 103 / 40%), transparent 55%),
        linear-gradient(-120deg, #0f2c26, #123a31 55%, #0e4d40);
}

.ct-hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

.ct-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #9fdccb;
}

.ct-h1 {
    margin: 0;
    font-size: clamp(1.4rem, 1.05rem + 2.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ct-hero-sub {
    margin: 8px 0 0;
    max-width: 52ch;
    font-size: .92rem;
    line-height: 1.65;
    color: rgb(255 255 255 / 78%);
}

.ct-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .8rem;
    color: rgb(255 255 255 / 62%);
}

.ct-crumb a {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 9px;
    background: rgb(255 255 255 / 8%);
    color: #fff;
    transition: background .2s var(--pp-ease);
}

.ct-crumb a:hover {
    background: rgb(255 255 255 / 20%);
}

.ct-crumb li:not(:last-child)::after {
    content: "›";
    margin-inline-start: 6px;
    color: rgb(255 255 255 / 45%);
}

/* ---------- Success alert ---------- */
.ct-success {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-block: 22px 0;
    padding: 13px 16px;
    border: 1px solid #bfe3cf;
    border-radius: var(--pp-r-md);
    background: #ecf9f1;
    color: #14713f;
    font-size: .88rem;
    font-weight: 600;
}

/* ---------- Contact tiles ---------- */
.ct-tiles {
    display: grid;
    gap: 14px;
    margin-top: 26px;
}

.ct-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--pp-card);
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-r-lg);
    box-shadow: var(--pp-sh-1);
    transition: transform .25s var(--pp-ease), box-shadow .25s var(--pp-ease), border-color .25s var(--pp-ease);
}

.ct-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--pp-sh-2);
    border-color: var(--pp-primary);
}

.ct-tile-icon {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--pp-primary-tint);
    color: var(--pp-primary-deep);
    font-size: 1.05rem;
    transition: background .25s var(--pp-ease), color .25s var(--pp-ease);
}

.ct-tile:hover .ct-tile-icon {
    background: var(--pp-primary);
    color: #fff;
}

.ct-tile--amber .ct-tile-icon {
    background: var(--pp-accent-tint);
    color: var(--pp-accent);
}

.ct-tile--amber:hover .ct-tile-icon {
    background: var(--pp-accent);
    color: #fff;
}

.ct-tile-body {
    min-width: 0;
}

.ct-tile-label {
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pp-faint);
}

.ct-tile-value {
    display: block;
    margin-top: 3px;
    font-size: .92rem;
    font-weight: 700;
    color: var(--pp-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    unicode-bidi: plaintext;
}

.ct-tile:hover .ct-tile-value {
    color: var(--pp-primary-deep);
}

.ct-tile-go {
    flex: 0 0 auto;
    align-self: center;
    font-size: .75rem;
    color: var(--pp-faint);
    transition: translate .2s var(--pp-ease), color .2s var(--pp-ease);
}

[dir="rtl"] .ct-tile-go {
    rotate: 180deg;
}

.ct-tile:hover .ct-tile-go {
    translate: 3px 0;
    color: var(--pp-primary-deep);
}

[dir="rtl"] .ct-tile:hover .ct-tile-go {
    translate: -3px 0;
}

/* ---------- Shell: form + visual ---------- */
.ct-shell {
    display: grid;
    gap: 22px;
    margin-top: 22px;
}

.ct-visual {
    display: grid;
    gap: 22px;
    align-content: start;
}

.ct-image-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-r-lg);
    background:
        radial-gradient(110% 130% at 85% -20%, rgb(11 125 103 / 22%), transparent 60%),
        linear-gradient(150deg, #eef6f3, #f8f7f2 60%, #fdf3e4);
    box-shadow: var(--pp-sh-1);
    padding: 26px 22px 0;
    text-align: center;
}

.ct-image-card img {
    width: min(100%, 360px);
    height: auto;
    translate: 0 6px;
}

.ct-image-caption {
    position: absolute;
    inset-inline: 16px;
    bottom: 14px;
    margin: 0;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgb(255 255 255 / 86%);
    backdrop-filter: blur(4px);
    box-shadow: var(--pp-sh-1);
    font-size: .8rem;
    font-weight: 700;
    color: var(--pp-primary-deep);
}

/* Map card */
.ct-map-card {
    overflow: hidden;
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-r-lg);
    background: var(--pp-card);
    box-shadow: var(--pp-sh-1);
}

.ct-map-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--pp-line);
    font-size: .92rem;
    font-weight: 800;
}

.ct-map-head > i {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--pp-primary-tint);
    color: var(--pp-primary-deep);
    font-size: .84rem;
}

.ct-map-head a {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1.5px solid var(--pp-line);
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 700;
    color: var(--pp-ink-soft);
    transition: color .2s var(--pp-ease), border-color .2s var(--pp-ease), background .2s var(--pp-ease);
}

.ct-map-head a:hover {
    color: var(--pp-primary-deep);
    border-color: var(--pp-primary);
    background: var(--pp-primary-tint);
}

.ct-map-frame {
    display: block;
    width: 100%;
    height: 340px;
    border: none;
    filter: saturate(.92);
}

/* ---------- Form sheet ---------- */
.ct-form-card {
    background: var(--pp-card);
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-r-lg);
    box-shadow: var(--pp-sh-1);
    padding: 24px 20px;
}

.ct-form-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    font-size: 1.16rem;
    font-weight: 800;
}

.ct-form-title > i {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--pp-primary-tint);
    color: var(--pp-primary-deep);
    display: grid;
    place-items: center;
    font-size: .9rem;
}

.ct-form-note {
    margin: 0 0 18px;
    font-size: .86rem;
    line-height: 1.6;
    color: var(--pp-ink-soft);
}

.ct-fields {
    display: grid;
    gap: 15px;
}

.ct-field {
    min-width: 0;
}

.ct-field label {
    display: block;
    margin-bottom: 6px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--pp-ink-soft);
}

.ct-input-wrap {
    position: relative;
}

.ct-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--pp-line);
    border-radius: var(--pp-r-md);
    background: var(--pp-card);
    font-family: inherit;
    font-size: .92rem;
    color: var(--pp-ink);
    transition: border-color .2s var(--pp-ease), box-shadow .2s var(--pp-ease);
}

[dir="rtl"] .ct-input {
    padding: 12px 44px 12px 16px;
}

textarea.ct-input {
    resize: vertical;
    line-height: 1.6;
}

.ct-input:focus {
    outline: none;
    border-color: var(--pp-primary);
    box-shadow: 0 0 0 4px rgb(11 125 103 / 12%);
}

.ct-input.is-invalid {
    border-color: #e2a09b;
}

.ct-input::placeholder {
    color: #9aa49f;
}

.ct-input-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 16px;
    translate: 0 -50%;
    font-size: .85rem;
    color: var(--pp-faint);
    pointer-events: none;
    transition: color .2s var(--pp-ease);
}

.ct-input:focus ~ .ct-input-icon {
    color: var(--pp-primary);
}

textarea.ct-input ~ .ct-input-icon {
    top: 18px;
    translate: 0 0;
}

.ct-field-error {
    margin: 6px 2px 0;
    font-size: .78rem;
    font-weight: 600;
    color: var(--pp-danger);
}

.ct-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    margin-top: 18px;
    padding: 10px 28px;
    border: none;
    border-radius: 999px;
    background: var(--pp-primary);
    color: #fff;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px -10px rgb(11 125 103 / 65%);
    transition: background .2s var(--pp-ease), transform .2s var(--pp-ease);
}

.ct-submit:hover {
    background: var(--pp-primary-deep);
    transform: translateY(-2px);
}

.ct-submit i {
    font-size: .82rem;
}

[dir="rtl"] .ct-submit i {
    rotate: 180deg;
}

/* ---------- ≥ 768 ---------- */
@media (min-width: 768px) {
    .ct-container {
        padding-inline: 24px;
    }

    .ct-tiles {
        grid-template-columns: 1fr 1fr;
    }

    .ct-fields {
        grid-template-columns: 1fr 1fr;
    }

    .ct-fields .ct-full {
        grid-column: 1 / -1;
    }

    .ct-map-frame {
        height: 400px;
    }
}

/* ---------- ≥ 1200 ---------- */
@media (min-width: 1200px) {
    main.ct {
        padding-bottom: 56px;
    }

    .ct-hero {
        padding-block: 42px 36px;
    }

    .ct-tiles {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin-top: 34px;
    }

    .ct-shell {
        grid-template-columns: 420px minmax(0, 1fr);
        gap: 26px;
        margin-top: 26px;
    }

    /* DOM order keeps the form first on mobile; visual sits first on desktop */
    .ct-visual {
        order: -1;
    }

    .ct-form-card {
        padding: 30px 32px;
    }

    .ct-map-frame {
        height: 460px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    main.ct *,
    main.ct *::before,
    main.ct *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    main.ct .pp-reveal {
        opacity: 1;
        transform: none;
    }
}
