:root {
    --teal: #0f766e;
    --teal-deep: #115e59;
    --ink: #1c1917;
    --muted: #57534e;
    --cream: #fffbf5;
    --gold: #e0a11a;
    --gold-ink: #3d2c08;
    --card: #ffffff;
    --line: #e7e5e4;
    --serif: "Fraunces", Palatino, serif;
    --sans: "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(15, 118, 110, 0.16), transparent 60%),
        var(--cream);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-deep); }

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

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 5vw;
}

.topbar a {
    text-decoration: none;
    font-weight: 800;
}

.lang {
    display: flex;
    gap: 0.4rem;
}

.lang button,
.step,
.hero-pick,
.activity,
.dot {
    font: inherit;
    cursor: pointer;
}

.lang button {
    min-height: 44px;
    border-radius: 999px;
    border: 2px solid var(--teal);
    background: white;
    color: var(--teal-deep);
    font-weight: 800;
    padding: 0 0.9rem;
    white-space: nowrap;
}

html[data-lang="en"] .lang button[data-lang="en"],
html[data-lang="ms"] .lang button[data-lang="ms"] {
    background: var(--teal);
    color: white;
}

html[data-lang="en"] .ms { display: none; }
html[data-lang="ms"] .en { display: none; }

.wrap {
    width: min(1080px, calc(100% - 10vw));
    margin: 0 auto;
    padding-bottom: 4rem;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: center;
    background: white;
    border-radius: 32px;
    padding: 1.2rem;
    box-shadow: 0 20px 50px rgba(28, 25, 23, 0.08);
}

.hero-card img { border-radius: 22px; }

.mark {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.4rem;
}

.mark img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
}

h1 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 560;
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--teal-deep);
}

.pitch { font-size: 1.2rem; margin: 1rem 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    border: 2px solid transparent;
}

.button.fill { background: var(--teal); color: white; }
.button.fill:hover { background: var(--teal-deep); }
.button.line { background: white; color: var(--teal-deep); border-color: var(--teal); }

.panel {
    margin-top: 2.5rem;
}

.panel h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 560;
    color: var(--teal-deep);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.step {
    min-height: 64px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: white;
    font-weight: 800;
}

.step[aria-selected="true"] {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
}

.step-copy {
    background: white;
    border-radius: 18px;
    padding: 1rem 1.1rem;
    margin-top: 0.8rem;
    min-height: 5.5rem;
    font-size: 1.12rem;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.split article {
    background: white;
    border-radius: 22px;
    padding: 1.2rem 1.3rem;
}

.split h3 { margin: 0 0 0.6rem; color: var(--teal-deep); }

.split ul { margin: 0; padding-left: 1.1rem; }

.split li { margin: 0.35rem 0; }

.quiet {
    color: var(--muted);
}

.faces {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}

.faces a {
    display: block;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    font-weight: 800;
    font-size: 0.82rem;
    text-align: center;
}

.faces img { aspect-ratio: 1; object-fit: cover; }

.faces span { display: block; padding: 0.45rem 0.3rem 0.7rem; }

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}

.facts li {
    background: white;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-weight: 800;
}

/* Introduction screen */
.intro-body {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.stage-wrap {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 0 1rem 1.5rem;
}

.device {
    width: min(430px, 100%);
    min-height: min(760px, calc(100svh - 110px));
    background: #fffdf8;
    border-radius: 36px;
    box-shadow: 0 30px 70px rgba(17, 94, 89, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 8px solid #134e4a;
}

.device-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem 0.2rem;
    color: var(--teal-deep);
    font-weight: 800;
    font-size: 0.85rem;
}

.screen {
    padding: 0.4rem 1.1rem 1rem;
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.screen[hidden] { display: none; }

.screen > p:last-child { margin-top: auto; }

.screen h1 {
    font-size: clamp(2.1rem, 8vw, 3rem);
}

.app-icon {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    margin-bottom: 0.6rem;
}

.portrait {
    width: min(220px, 70%);
    margin: 0.2rem auto 0.6rem;
    border-radius: 28px;
    background: #fff7ea;
}

.picks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.hero-pick {
    border: 3px solid transparent;
    background: #fff7ea;
    border-radius: 16px;
    padding: 0.2rem;
}

.hero-pick[aria-pressed="true"] { border-color: var(--gold); }

.hero-pick img { border-radius: 12px; }

.hero-pick span {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 0.25rem 0.1rem 0.35rem;
}

.activities {
    display: grid;
    gap: 0.55rem;
}

.activity {
    text-align: left;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: white;
    padding: 0.75rem 0.85rem;
}

.activity[aria-pressed="true"] {
    border-color: var(--teal);
    background: #f0fdfa;
}

.activity strong { display: block; }

.note {
    min-height: 3.2rem;
    margin: 0.8rem 0 0;
    font-weight: 700;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding-bottom: 0.4rem;
}

.dot {
    width: 44px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: #d6d3d1;
}

.dot[aria-selected="true"] { background: var(--teal); }

.device-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.8rem 1.1rem 1rem;
    border-top: 1px solid var(--line);
    font-weight: 800;
}

.device-foot a { text-decoration: none; }

@media (max-width: 800px) {
    .hero-card,
    .split { grid-template-columns: 1fr; }
    .steps,
    .faces { grid-template-columns: 1fr 1fr; }
    .faces { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .stage-wrap { padding: 0; align-items: stretch; }
    .device {
        width: 100%;
        height: 100%;
        min-height: 0;
        border-radius: 0;
        border-width: 0;
        box-shadow: none;
    }
}

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