/* Bintang Kecil demo. A Malaysian exercise book: ruled lines, red margin, teacher's ticks, star stickers. */

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

:root {
    --ink: #1d2a5b;
    --ink-soft: #46527a;
    --pencil: #3b4660;
    --paper: #ffffff;
    --sky: #eaf3ff;
    --line: #bcd6f5;
    --line-dark: #9dbbe3;
    --red: #e5484d;
    --error: #b42318;
    --gold: #ffc531;
    --gold-deep: #e39a00;
    --blue: #2557c7;
    --green: #177a4c;
    --wa-head: #008069;
    --wa-bg: #efeae2;
    --wa-out: #d9fdd3;
    --wa-btn: #25d366;
    --display: "Grandstander", "Trebuchet MS", system-ui, sans-serif;
    --body: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wrap: 1120px;
}

[hidden] {
    display: none !important;
}

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

body {
    margin: 0;
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
}

svg {
    display: block;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--display);
    font-weight: 800;
    line-height: 1.08;
}

h2 {
    font-size: clamp(2rem, 4.4vw, 3rem);
}

p {
    margin: 0;
}

a {
    color: inherit;
}

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

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.wrap {
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -4rem;
    left: 1rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
}

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

/* Demo notice */

.demo-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 1.5rem;
    padding: 0.55rem 1.25rem;
    background: var(--ink);
    color: #fff;
    font-size: 0.8125rem;
    text-align: center;
}

.demo-bar a {
    color: var(--gold);
    font-weight: 600;
    text-underline-offset: 3px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 2px solid var(--line);
    background: rgb(255 255 255 / 0.94);
    backdrop-filter: blur(8px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    min-height: 4.25rem;
}

.brand {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    column-gap: 0.6rem;
    text-decoration: none;
}

.brand__star {
    grid-row: 1 / 3;
    width: 2.5rem;
    height: 2.5rem;
    fill: var(--gold);
    stroke: var(--gold-deep);
    stroke-width: 5;
    stroke-linejoin: round;
    transform: rotate(-8deg);
}

.brand__name {
    font-family: var(--display);
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.brand__tag {
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--ink-soft);
}

.site-nav {
    display: none;
    gap: 1.75rem;
    margin-left: auto;
}

.site-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
}

.site-nav a:hover {
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.site-header .btn--small {
    display: none;
}

/* Buttons and links */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.45rem;
    border: 3px solid var(--ink);
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 4px 0 var(--ink);
    color: var(--ink);
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--ink);
}

.btn--small {
    padding: 0.5rem 1rem;
    border-width: 2px;
    box-shadow: 0 3px 0 var(--ink);
    font-size: 0.95rem;
}

.btn--whatsapp {
    background: var(--wa-btn);
}

.link {
    font-weight: 600;
    text-decoration-color: var(--red);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* Hero */

.hero {
    display: grid;
    align-items: center;
    gap: 3rem;
    padding-block: 3rem 4.5rem;
}

.hero h1 {
    max-width: 13ch;
    font-size: clamp(2.7rem, 8vw, 4.75rem);
    line-height: 1.02;
}

.hero__lead {
    max-width: 34rem;
    margin-top: 1.25rem;
    font-size: 1.15rem;
    color: var(--ink-soft);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 2rem;
}

.ticks {
    display: grid;
    gap: 0.6rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.ticks li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 500;
}

.ticks svg {
    flex: none;
    width: 1.6rem;
    height: 1.3rem;
    fill: none;
    stroke: var(--red);
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Exercise book */

.book {
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 30rem;
    margin: 0;
    padding: 1.5rem 0.75rem 3rem;
}

.book::before {
    content: "";
    position: absolute;
    inset: 1.2rem 0.1rem 2.4rem 1rem;
    border: 3px solid var(--ink);
    border-radius: 8px 20px 20px 8px;
    background: var(--gold);
    transform: rotate(4deg);
}

.book__page {
    --row: clamp(2.2rem, 8vw, 2.6rem);
    --margin: clamp(2.4rem, 9vw, 3.4rem);
    position: relative;
    padding: calc(var(--row) + 0.45rem) 1.25rem calc(var(--row) * 1.4) calc(var(--margin) + 1rem);
    border: 3px solid var(--ink);
    border-radius: 6px 18px 18px 6px;
    background:
        linear-gradient(90deg, transparent var(--margin), var(--red) var(--margin), var(--red) calc(var(--margin) + 2px), transparent 0),
        repeating-linear-gradient(to bottom, transparent 0 calc(var(--row) - 2px), var(--line) calc(var(--row) - 2px) var(--row)),
        #fff;
    box-shadow: 10px 12px 0 rgb(29 42 91 / 0.12);
    color: var(--pencil);
    font-family: var(--display);
    font-size: clamp(1.25rem, 5vw, 1.6rem);
    font-weight: 600;
    line-height: var(--row);
    transform: rotate(-2deg);
}

.book__name {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1.05rem;
}

.book__tick {
    display: inline-block;
    width: 2.2rem;
    height: 1.8rem;
    margin-left: 0.35rem;
    vertical-align: -0.15rem;
    fill: none;
    stroke: var(--red);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(-6deg);
}

.book__letters {
    letter-spacing: 0.12em;
}

.book__note {
    padding-left: 0.5rem;
    color: var(--red);
    font-weight: 700;
    transform: rotate(-4deg);
    transform-origin: left center;
}

.sticker {
    position: absolute;
    right: -0.5rem;
    bottom: 0.5rem;
    width: 7.5rem;
    height: 7.5rem;
    filter: drop-shadow(3px 5px 0 rgb(29 42 91 / 0.2));
    transform: rotate(12deg);
    animation: stamp 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.25) 0.45s both;
}

.sticker__star {
    width: 100%;
    height: 100%;
    fill: var(--gold);
    stroke: var(--gold-deep);
    stroke-width: 3;
    stroke-linejoin: round;
}

.sticker__face {
    position: absolute;
    top: 54%;
    left: 50%;
    width: 2.4rem;
    height: 1.55rem;
    transform: translate(-50%, -50%);
}

.sticker__face i {
    position: absolute;
    top: 0;
    width: 0.42rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--ink);
}

.sticker__face i:first-child {
    left: 0.4rem;
}

.sticker__face i:nth-child(2) {
    right: 0.4rem;
}

.sticker__face b {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 1.3rem;
    height: 0.65rem;
    border: 3px solid var(--ink);
    border-top: 0;
    border-radius: 0 0 1rem 1rem;
    transform: translateX(-50%);
}

.pencil {
    position: absolute;
    bottom: 0.4rem;
    left: -0.5rem;
    width: 13rem;
    height: auto;
    filter: drop-shadow(2px 4px 0 rgb(29 42 91 / 0.18));
    transform: rotate(-7deg);
}

@keyframes stamp {
    0% {
        opacity: 0;
        transform: scale(1.9) rotate(-30deg);
    }

    60% {
        opacity: 1;
        transform: scale(0.9) rotate(16deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(12deg);
    }
}

/* Sections */

.section {
    padding-block: 4.5rem;
}

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

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

.section__head {
    max-width: 40rem;
    margin-bottom: 2.5rem;
}

.section__head p {
    margin-top: 0.9rem;
    font-size: 1.1rem;
    color: var(--ink-soft);
}

/* Programmes as exercise-book covers */

.covers {
    display: grid;
    gap: 1.75rem;
}

.cover {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding: 1.5rem 1.5rem 1.75rem 2.4rem;
    border: 3px solid var(--ink);
    border-radius: 6px 16px 16px 6px;
    box-shadow: inset 0.9rem 0 0 rgb(0 0 0 / 0.14);
    color: #fff;
}

.cover--yellow {
    background: var(--gold);
    color: var(--ink);
}

.cover--blue {
    background: var(--blue);
}

.cover--green {
    background: var(--green);
}

.cover__label {
    padding: 0.5rem 1rem 0.7rem;
    border: 2px solid var(--ink);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
}

.cover__row {
    display: grid;
    padding-block: 0.4rem;
    border-bottom: 2px dotted var(--line-dark);
}

.cover__row span {
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.cover__row h3 {
    font-size: 1.45rem;
}

.cover__row p {
    font-weight: 500;
}

.cover__list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cover__list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}

.cover__list li::before {
    content: "";
    flex: none;
    width: 0.95rem;
    height: 0.95rem;
    background: var(--gold);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.cover--yellow .cover__list li::before {
    background: var(--ink);
}

/* Timetable */

.timetables {
    display: grid;
    align-items: start;
    gap: 2.25rem;
}

.timetable {
    width: 100%;
    border: 3px solid var(--ink);
    border-spacing: 0;
    border-collapse: separate;
    border-radius: 16px;
    background: #fff;
}

.timetable tr:first-child th {
    border-top-left-radius: 13px;
}

.timetable tr:last-child th {
    border-bottom-left-radius: 13px;
}

.timetable caption {
    padding-bottom: 0.75rem;
    font-family: var(--display);
    font-size: 1.4rem;
    font-weight: 800;
    text-align: left;
}

.timetable th,
.timetable td {
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.timetable tr:last-child th,
.timetable tr:last-child td {
    border-bottom: 0;
}

.timetable th {
    width: 5.5rem;
    border-right: 3px solid var(--ink);
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 700;
}

.timetable--morning th {
    background: #fff4d1;
}

.timetable--afternoon th {
    background: #e1eaff;
}

/* Weekly report */

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

.report__copy p {
    max-width: 34rem;
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--ink-soft);
}

.chat {
    justify-self: center;
    width: 100%;
    max-width: 26rem;
    border: 3px solid var(--ink);
    border-radius: 22px;
    background: var(--wa-bg);
    overflow: hidden;
}

.chat__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background: var(--wa-head);
    color: #fff;
}

.chat__head strong {
    display: block;
    font-size: 0.98rem;
    line-height: 1.3;
}

.chat__head small {
    font-size: 0.78rem;
    opacity: 0.9;
}

.chat__avatar {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: #fff;
}

.chat__avatar svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: var(--gold);
    stroke: var(--gold-deep);
    stroke-width: 5;
    stroke-linejoin: round;
}

.chat__bubble {
    position: relative;
    margin: 1.25rem 2.5rem 1.5rem 1rem;
    padding: 0.8rem 1rem 1.7rem;
    border-radius: 4px 16px 16px 16px;
    background: #fff;
    box-shadow: 0 1px 1px rgb(0 0 0 / 0.12);
    font-size: 0.95rem;
    line-height: 1.55;
}

.chat__bubble p + p {
    margin-top: 0.15rem;
}

.chat__time {
    position: absolute;
    right: 0.7rem;
    bottom: 0.35rem;
    font-size: 0.72rem;
    color: #5b6478;
}

/* Parent notes */

.notes {
    display: grid;
    gap: 2.25rem;
}

.note {
    position: relative;
    margin: 0;
    padding: 1.9rem 1.4rem 1.4rem;
    border: 3px solid var(--ink);
    border-radius: 4px;
    background: #fff;
    transform: rotate(var(--tilt, 0deg));
}

.note:nth-child(1) {
    --tilt: -1.2deg;
}

.note:nth-child(2) {
    --tilt: 0.9deg;
}

.note:nth-child(3) {
    --tilt: -0.5deg;
}

.note::before {
    content: "";
    position: absolute;
    top: -0.85rem;
    left: 50%;
    width: 5.5rem;
    height: 1.6rem;
    background: rgb(255 197 49 / 0.8);
    transform: translateX(-50%) rotate(-3deg);
}

.note blockquote {
    margin: 0;
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
}

.note figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* Fees */

.fees {
    max-width: 46rem;
}

.fees__list {
    margin: 0;
    border-top: 3px solid var(--ink);
}

.fees__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
    padding-block: 1.15rem;
    border-bottom: 2px dashed var(--line-dark);
}

.fees__row dt {
    flex: 1 1 16rem;
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 700;
}

.fees__row dt small {
    display: block;
    margin-top: 0.2rem;
    font-family: var(--body);
    font-size: 0.92rem;
    font-weight: 400;
    color: var(--ink-soft);
}

.fees__row dd {
    margin: 0;
    font-family: var(--display);
    font-size: 1.85rem;
    font-weight: 800;
    white-space: nowrap;
}

.fees__row dd span {
    font-family: var(--body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.fees__note {
    margin-top: 1.25rem;
    color: var(--ink-soft);
}

/* Trial class sign-up */

.signup {
    display: grid;
    align-items: start;
    gap: 2.5rem;
}

.signup__copy p {
    max-width: 30rem;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.form {
    display: grid;
    gap: 1.1rem;
    padding: 1.6rem;
    border: 3px solid var(--ink);
    border-radius: 18px;
    background: #fff;
    box-shadow: 8px 8px 0 var(--ink);
}

.field {
    display: grid;
    align-content: start;
    gap: 0.4rem;
}

.field label {
    font-size: 0.95rem;
    font-weight: 600;
}

.field input,
.field select {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--ink);
    border-radius: 10px;
    background-color: #fff;
    color: var(--ink);
    font: inherit;
}

.field select {
    padding-right: 2.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M2 2l6 6 6-6' fill='none' stroke='%231d2a5b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 0.9rem center;
    background-repeat: no-repeat;
    background-size: 0.95rem;
    appearance: none;
}

.field input:focus-visible,
.field select:focus-visible {
    outline-offset: 1px;
}

.field [aria-invalid="true"] {
    border-color: var(--error);
    background-color: #fff5f5;
}

.field__error {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--error);
}

.preview {
    display: grid;
    gap: 0.7rem;
    padding-top: 1.1rem;
    border-top: 2px dashed var(--line-dark);
}

.preview:focus {
    outline: none;
}

.preview__title {
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 800;
}

.preview__bubble {
    justify-self: end;
    max-width: 28rem;
    padding: 0.85rem 1rem;
    border-radius: 16px 4px 16px 16px;
    background: var(--wa-out);
    box-shadow: 0 1px 1px rgb(0 0 0 / 0.12);
}

.preview__note {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* Location */

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

.visit__list {
    display: grid;
    gap: 1rem;
    margin: 1.75rem 0 0;
}

.visit__list div {
    display: grid;
    gap: 0.2rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed var(--line-dark);
}

.visit__list dt {
    font-weight: 600;
}

.visit__list dd {
    margin: 0;
    color: var(--ink-soft);
}

.map {
    position: relative;
    aspect-ratio: 4 / 3;
    border: 3px solid var(--ink);
    border-radius: 18px;
    background: #e3f2da;
    overflow: hidden;
}

.map__road {
    position: absolute;
    border: 2px solid #c9d3e3;
    background: #fff;
}

.map__road--a {
    top: 60%;
    right: -5%;
    left: -5%;
    height: 2.2rem;
    transform: rotate(-8deg);
}

.map__road--b {
    top: -5%;
    bottom: -5%;
    left: 28%;
    width: 1.8rem;
    transform: rotate(6deg);
}

.map__road--c {
    top: -5%;
    right: 16%;
    bottom: -5%;
    width: 1.4rem;
    transform: rotate(-14deg);
}

.map__park {
    position: absolute;
    top: 8%;
    left: 6%;
    width: 17%;
    height: 30%;
    border-radius: 40% 60% 55% 45%;
    background: #b9e0a5;
}

.map__pin {
    position: absolute;
    top: 34%;
    left: 52%;
    width: 3.6rem;
    height: 3.6rem;
    transform: translate(-50%, -50%) rotate(-8deg);
}

.map__pin svg {
    width: 100%;
    height: 100%;
    fill: var(--gold);
    stroke: var(--ink);
    stroke-width: 5;
    stroke-linejoin: round;
}

.map__label {
    position: absolute;
    top: calc(34% + 2.2rem);
    left: 52%;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-family: var(--display);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%);
}

/* Footer */

.site-footer {
    padding-block: 2rem;
    background: var(--ink);
    color: #fff;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    font-size: 0.92rem;
}

.site-footer a {
    color: var(--gold);
}

/* Phone call-to-action */

.mobile-cta {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 30;
    transition: transform 0.2s ease;
}

.mobile-cta.is-hidden {
    transform: translateY(160%);
}

@media (max-width: 879px) {
    body {
        padding-bottom: 5.5rem;
    }
}

@media (min-width: 600px) {
    .form {
        grid-template-columns: 1fr 1fr;
        padding: 2rem;
    }

    .form .btn,
    .preview {
        grid-column: 1 / -1;
    }

    .visit__list div {
        grid-template-columns: 7rem 1fr;
        gap: 1rem;
    }
}

@media (min-width: 880px) {
    .site-nav {
        display: flex;
    }

    .site-header .btn--small {
        display: inline-flex;
    }

    .hero {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 4rem;
        padding-block: 4.5rem 3rem;
    }

    .section {
        padding-block: 6rem;
    }

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

    .timetables {
        grid-template-columns: 1fr 1fr;
    }

    .report,
    .visit {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .signup {
        grid-template-columns: 0.85fr 1.15fr;
        gap: 4rem;
    }

    .mobile-cta {
        display: none;
    }
}

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

    .sticker {
        animation: none;
    }

    .btn,
    .mobile-cta {
        transition: none;
    }
}
