/* Mrattab website. Brand green for actions and accents; typography follows a neutral, Tamkeen-style system with Zain (CLAUDE.md). */

:root {
    /* Brand */
    --green: #0E6B4F;
    --mint: #9FF0C8;
    --soft-mint: #CFF5E3;

    /* Neutral text and surfaces */
    --ink: #0A0A0A;
    --muted: #525252;
    --subtle: #737373;
    --ground: #FFFFFF;
    --surface: #FAFAFA;
    --white: #FFFFFF;
    --line: #EAEAEA;

    --font: 'Zain', 'Segoe UI', Tahoma, sans-serif;

    /* Type: one large headline, everything else small. */
    /* Zain draws small for its size, so text runs one step larger than usual. */
    --text: 1.0625rem;
    --text-sm: 0.9375rem;
    --text-xs: 0.8125rem;
    --text-lg: 1.1875rem;
    --h3: 1.125rem;
    --h2: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
    --h1: clamp(2.25rem, 1.3rem + 3.4vw, 4rem);

    --wrap: 68rem;
    --gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
    --section: clamp(3.5rem, 2.75rem + 3vw, 5.5rem);

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --shadow: 0 1px 0 rgb(18 55 42 / 0.04), 0 18px 36px -18px rgb(18 55 42 / 0.35);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 4.5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 400;
    font-size: var(--text);
    line-height: 1.6;
}

h1,
h2,
h3,
p,
ol,
ul {
    margin: 0;
}

h1,
h2,
h3 {
    font-weight: 600;
    text-wrap: balance;
}

h2 {
    font-size: var(--h2);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h3 {
    font-size: var(--h3);
    line-height: 1.5;
}

a {
    color: inherit;
}

img,
svg {
    display: block;
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: -4rem;
    z-index: 50;
    padding: 0.5rem 1rem;
    background: var(--ink);
    color: var(--white);
    border-radius: 0.5rem;
}

.skip-link:focus {
    top: 1rem;
}

/* Gentle fade on scroll. */

.js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------------------------------------------------- Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--ground);
    transition: box-shadow 0.2s ease;
}

.site-header {
    border-bottom: 1px solid var(--line);
}

.header-row {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.brand-mark {
    width: 2.1rem;
    height: 2.1rem;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    margin-inline-start: auto;
    font-size: var(--text-sm);
}

.header-nav a {
    color: var(--ink);
    text-decoration: none;
}

.header-nav a:hover {
    color: var(--green);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--green);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.button:hover {
    background: var(--ink);
}

.button-small {
    padding: 0.35rem 0.95rem;
    font-size: var(--text-sm);
}

/* ---------------------------------------------------- Store buttons (placeholders until the apps are published) */

.stores {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.store {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 10.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.75rem;
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.store:hover {
    background: var(--green);
}

.store b {
    font-weight: 600;
}

.store svg {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
    color: var(--mint);
}

.store span {
    display: grid;
    line-height: 1.2;
}

.store small {
    font-size: 0.7rem;
    opacity: 0.75;
}

.store b {
    font-size: 0.95rem;
}

.store em {
    margin-inline-start: auto;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: var(--mint);
    color: var(--ink);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 600;
}

.store.is-nudged {
    animation: nudge 0.4s ease;
}

@keyframes nudge {
    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* ---------------------------------------------------- Hero */

.hero {
    padding-block: clamp(1.5rem, 0.75rem + 3vw, 3rem) var(--section);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.hero h1 {
    font-size: var(--h1);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.lead {
    max-width: 28rem;
    margin-top: 1.25rem;
    font-size: var(--text-lg);
    line-height: 1.625;
    color: var(--muted);
}

.hero .stores {
    margin-top: 1.75rem;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
    color: var(--subtle);
}

.hero-facts li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-facts svg {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--green);
}

/* The photo sits inside the logo's house; a mint outline draws around it, then app moments pop in. */

.js .hero-visual:not(.is-visible),
.js .hero-visual:not(.is-visible) * {
    animation-play-state: paused;
}

.hero-visual {
    position: relative;
    width: min(100%, 27rem);
    margin-inline: auto;
    padding: 2rem 1.25rem 2.5rem;
}

.house-frame {
    position: relative;
    aspect-ratio: 1 / 0.92;
    animation: house-in 1s var(--ease-out) 0.1s both;
}

@keyframes house-in {
    from {
        opacity: 0;
        transform: translateY(1.5rem) scale(0.95);
    }
}

.house-ring {
    position: absolute;
    inset: -0.75rem;
    width: calc(100% + 1.5rem);
    height: calc(100% + 1.5rem);
    overflow: visible;
}

.house-ring path {
    fill: none;
    stroke: var(--mint);
    stroke-width: 3px;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.6s var(--ease-out) 0.5s forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.house-photo {
    position: absolute;
    inset: 0;
    clip-path: url(#house-clip);
    background: var(--soft-mint);
}

.house-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 35% center;
    transform: scale(1.1);
    animation: settle-in 12s ease-out forwards;
}

@keyframes settle-in {
    to {
        transform: scale(1);
    }
}

.float-card {
    position: absolute;
    z-index: 2;
    padding: 0.6rem 0.8rem;
    border-radius: 0.9rem;
    background: var(--white);
    box-shadow: var(--shadow);
    font-size: 0.875rem;
    line-height: 1.5;
    transition: translate 0.2s linear;
}

.float-title {
    font-weight: 600;
}

.float-text {
    color: var(--muted);
    font-size: 0.8125rem;
}

.float-notify {
    top: 0.25rem;
    inset-inline-start: -0.75rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 14rem;
    animation: pop-in 0.6s var(--ease-spring) 1.3s both, bob 6s ease-in-out 2s infinite;
}

.float-seal {
    width: 2.1rem;
    height: 2.1rem;
    flex-shrink: 0;
}

.float-checklist {
    bottom: 3.75rem;
    inset-inline-end: -1rem;
    min-width: 8.75rem;
    animation: pop-in 0.6s var(--ease-spring) 1.7s both, bob 7s ease-in-out 2.4s infinite reverse;
}

.float-checklist ul {
    list-style: none;
    padding: 0;
    margin-top: 0.3rem;
    display: grid;
    gap: 0.2rem;
}

.float-checklist li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.mini-tick {
    display: grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    color: transparent;
    animation: tick-fill 0.3s ease-out both;
    animation-delay: calc(2.2s + var(--i) * 0.45s);
}

.mini-tick svg {
    width: 0.7rem;
    height: 0.7rem;
}

@keyframes tick-fill {
    to {
        background: var(--green);
        border-color: var(--green);
        color: var(--white);
    }
}

.float-rating {
    bottom: -0.25rem;
    inset-inline-start: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pop-in 0.6s var(--ease-spring) 2.1s both, bob 8s ease-in-out 2.8s infinite;
}

.stars {
    display: flex;
    gap: 0.1rem;
}

.stars svg {
    width: 0.85rem;
    height: 0.85rem;
    fill: #F2B632;
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(0.75rem) scale(0.88);
    }
}

@keyframes bob {
    50% {
        transform: translateY(-6px);
    }
}

.twinkle {
    position: absolute;
    z-index: 3;
    fill: var(--mint);
    animation: twinkle 3.2s ease-in-out infinite;
}

.twinkle-1 {
    width: 1.6rem;
    height: 1.6rem;
    top: 2rem;
    inset-inline-end: 0.75rem;
    fill: var(--green);
}

.twinkle-2 {
    width: 1.1rem;
    height: 1.1rem;
    top: 45%;
    inset-inline-start: -0.25rem;
    animation-delay: 1.2s;
}

@keyframes twinkle {
    0%,
    100% {
        transform: scale(0.7) rotate(0deg);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.05) rotate(90deg);
        opacity: 1;
    }
}

/* ---------------------------------------------------- Sections */

.section {
    padding-block: var(--section);
    border-top: 1px solid var(--line);
}

.section-white {
    background: var(--white);
}

.section-intro {
    max-width: 28rem;
    margin-top: 0.5rem;
    color: var(--muted);
}

/* Steps: a real sequence, numbered by the list. */

.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin-top: 2.5rem;
    display: grid;
    gap: 2rem 1.5rem;
}

.steps li {
    counter-increment: step;
}

.steps img {
    width: 100%;
    max-width: 13rem;
    height: 8.5rem;
    object-fit: contain;
    object-position: center bottom;
    margin-bottom: 1.1rem;
}

.steps h3::before {
    content: counter(step, arabic-indic) '. ';
    color: var(--subtle);
}

.steps p {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: var(--text-sm);
}

/* Features */

.features {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    display: grid;
    gap: 1.75rem 2rem;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid var(--line);
    color: var(--green);
}

.feature-icon svg {
    width: 1.3rem;
    height: 1.3rem;
}

.features p {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: var(--text-sm);
    max-width: 22rem;
}

/* ---------------------------------------------------- Packs */

.packs {
    padding-block: var(--section);
    background: var(--green);
    color: var(--white);
}

.packs-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.packs-copy p {
    margin-top: 0.85rem;
    max-width: 30rem;
    color: rgb(255 255 255 / 0.82);
}

.packs h2 {
    color: var(--white);
}

.visits-card {
    padding: clamp(1.25rem, 1rem + 1.5vw, 1.75rem);
    border-radius: 1.5rem;
    background: #0B4A37;
}

.visits-title {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--mint);
}

.visits {
    list-style: none;
    padding: 0;
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.visits li {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: rgb(255 255 255 / 0.7);
}

.visit-dot {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(2.75rem, 2.25rem + 2vw, 3.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px dashed rgb(159 240 200 / 0.45);
    font-weight: 600;
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.5s var(--ease-spring);
    transition-delay: calc(var(--i) * 0.45s + 0.2s);
}

.visit-dot svg {
    position: absolute;
    width: 45%;
    height: 45%;
    opacity: 0;
    transition: opacity 0.3s ease;
    transition-delay: inherit;
}

.visit-dot b {
    transition: opacity 0.3s ease;
    transition-delay: inherit;
}

.is-filled .visit-dot {
    border-style: solid;
    border-color: var(--mint);
    background: rgb(159 240 200 / 0.15);
    color: var(--mint);
}

.is-filled .visit-dot svg {
    opacity: 1;
}

.is-filled .visit-dot b {
    opacity: 0;
}

.is-filled .last .visit-dot {
    background: var(--mint);
    color: var(--ink);
    transform: scale(1.1);
}

.visits .last {
    color: var(--mint);
    font-weight: 600;
}

.visits-progress {
    height: 5px;
    margin-top: 1.25rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
    overflow: hidden;
}

.visits-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--mint);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 1.9s var(--ease-out) 0.2s;
}

.is-filled .visits-progress span {
    transform: scaleX(1);
}

/* ---------------------------------------------------- FAQ */

.faq {
    display: grid;
    gap: 1.5rem;
}

.faq-list details {
    border-bottom: 1px solid var(--line);
}

.faq-list details:first-child {
    border-top: 1px solid var(--line);
}

.faq-list summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: '';
    flex-shrink: 0;
    width: 0.55rem;
    height: 0.55rem;
    margin-inline-end: 0.25rem;
    border-left: 2px solid var(--green);
    border-bottom: 2px solid var(--green);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}

.faq-list details[open] summary::after {
    transform: rotate(135deg);
}

.faq-list p {
    padding-bottom: 1rem;
    color: var(--muted);
    font-size: var(--text-sm);
    max-width: 38rem;
}

/* ---------------------------------------------------- Download */

.download {
    padding-block: var(--section);
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.download-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.download-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    box-shadow: 0 14px 28px -14px rgb(14 107 79 / 0.7);
}

.download h2 {
    margin-top: 1.25rem;
}

.download-copy > p {
    margin-top: 0.4rem;
    color: var(--muted);
}

.download .stores {
    margin-top: 1.5rem;
}

.toast {
    margin-top: 0.85rem;
    font-size: var(--text-sm);
    color: var(--green);
    font-weight: 600;
}

.toast:empty {
    display: none;
}

.download-photo img {
    width: 100%;
    max-width: 28rem;
    height: auto;
    margin-inline: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 70% center;
    border-radius: 1.5rem;
}

/* ---------------------------------------------------- Footer */

.site-footer {
    padding-block: 2rem;
    border-top: 1px solid var(--line);
    background: var(--white);
    color: var(--subtle);
    font-size: var(--text-sm);
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
}

.site-footer .brand {
    color: var(--ink);
}

.site-footer .brand-mark {
    width: 1.75rem;
    height: 1.75rem;
}

.site-footer .brand-name {
    font-size: 1rem;
}

.copyright {
    margin-inline-start: auto;
}

/* ---------------------------------------------------- Layout at larger widths */

@media (min-width: 40rem) {
    .steps,
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 60rem) {
    .hero-grid {
        grid-template-columns: 1.1fr 1fr;
    }

    .hero-visual {
        width: 100%;
        max-width: 27rem;
    }

    .steps {
        grid-template-columns: repeat(5, 1fr);
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
    }

    .packs-grid,
    .download-grid {
        grid-template-columns: 1fr 1fr;
    }

    .faq {
        grid-template-columns: 1fr 2fr;
        align-items: start;
    }
}

@media (max-width: 40rem) {
    .header-nav {
        display: none;
    }

    .header-row .button {
        margin-inline-start: auto;
    }

    .steps li {
        display: grid;
        grid-template-columns: 6.5rem 1fr;
        column-gap: 1rem;
        align-items: center;
    }

    .steps img {
        grid-row: span 2;
        height: 5.5rem;
        margin: 0;
    }

    .float-notify {
        inset-inline-start: -0.25rem;
    }

    .float-checklist {
        inset-inline-end: -0.25rem;
    }

    .copyright {
        margin-inline-start: 0;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}
