/* Shared look of the stand-alone pages (/code, /order): the home page's
   yellow theme — cream ground with faint doodles and colour blobs, blue
   titles with a yellow marker, white cards, yellow buttons. Mobile first. */
:root {
    --cream: #F4EDDC;
    --paper: #FFFDF7;
    --paper-warm: #FFFAF0;
    --ink: #1F3A5F;
    --ink-2: #3B5578;
    --muted: #6B7A90;
    --yellow: #F9C53A;
    --yellow-deep: #DBA21A;
    --yellow-soft: #FDF0C4;
    --blue: #2A6FB0;
    --blue-700: #1F5A95;
    --blue-soft: #E4EFF9;
    --red: #C0392B;
    --red-soft: #FDECEA;
    --green-wa: #25D366;
    --blue-grad: linear-gradient(165deg, #2D7FBD 0%, #2673AD 45%, #1C5D90 80%, #174C76 100%);
    --marker: linear-gradient(transparent 58%, rgba(249,197,58,0.72) 58%, rgba(249,197,58,0.72) 90%, transparent 90%);
    --title-font: 'Baloo Bhaijaan 2', 'Almarai', sans-serif;
    --card-shadow: 0 10px 26px rgba(60,40,0,0.09);
    --card-shadow-hi: 0 18px 38px rgba(60,40,0,0.15);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Almarai', 'Segoe UI', sans-serif; color: var(--ink); line-height: 1.7;
    min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden;
    background:
        radial-gradient(70% 34% at 96% 0%, rgba(159,208,238,0.62), transparent 62%),
        radial-gradient(60% 30% at 0% 40%, rgba(249,197,58,0.30), transparent 62%),
        radial-gradient(60% 30% at 100% 82%, rgba(246,199,176,0.40), transparent 62%),
        url('img/doodles-ink.svg') center top / 760px auto,
        var(--cream);
}
a { color: var(--blue-700); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ── Gold stars (decoration) ── */
.gs {
    position: absolute; left: var(--x); top: var(--y); width: var(--s, 22px); height: var(--s, 22px);
    background: url('img/star.svg') center / contain no-repeat; transform: rotate(var(--r, 0deg));
    filter: drop-shadow(0 4px 5px rgba(120,80,0,0.25)); pointer-events: none;
}

/* ── Header ── */
.pg-header { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.pg-logo img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(120,80,0,0.22)); }
.pg-logo span { font: 800 25px/1 var(--title-font); color: var(--blue); padding-top: 4px; }
.pg-home {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 50px;
    background: var(--paper); border: 2px solid rgba(42,111,176,0.25); color: var(--ink); font-weight: 800; font-size: 14px; text-decoration: none;
}
.pg-home:hover { border-color: var(--blue); }

/* ── Hero ── */
.pg-hero { position: relative; max-width: 1120px; margin: 0 auto; padding: 18px 16px 8px; text-align: center; }
.pg-kicker {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 2px; border-radius: 30px; margin-bottom: 10px;
    background: var(--blue); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 3px 0 var(--blue-700);
}
.pg-hero h1 { font: 800 30px/1.3 var(--title-font); color: var(--ink); margin-bottom: 8px; text-wrap: balance; }
.pg-hero h1 .mk { color: var(--blue); background: var(--marker); padding: 0 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pg-hero .lead { font-size: 15.5px; font-weight: 700; color: var(--ink-2); max-width: 560px; margin: 0 auto; text-wrap: balance; }

/* ── Main column + cards ── */
.pg-main { max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; position: relative; }
.card {
    background: var(--paper); border-radius: 26px; padding: 22px 18px; position: relative;
    border: 2px solid rgba(42,111,176,0.08); box-shadow: var(--card-shadow);
}
.card + .card { margin-top: 16px; }
.card-title { font: 800 22px/1.35 var(--title-font); color: var(--ink); margin-bottom: 4px; }
.card-sub { font-size: 14.5px; color: var(--ink-2); margin-bottom: 16px; }
.step-tag {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 3px 12px 1px; border-radius: 30px;
    background: var(--yellow-soft); color: var(--ink); font-size: 12.5px; font-weight: 800;
}

/* ── Fields ── */
.field { margin-bottom: 14px; }
.field > label, .field > .label { display: block; font-size: 14.5px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="tel"], .field select, .field textarea {
    width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 16px;
    border: 2px solid rgba(31,58,95,0.16); background: #FFFFFF; color: var(--ink);
    font: 700 16px 'Almarai', sans-serif; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.field select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-left: 40px;
    background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%231f3a5f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E") left 14px center / 18px no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(249,197,58,0.35); }
.field input::placeholder, .field textarea::placeholder { color: rgba(31,58,95,0.38); font-weight: 400; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.field .err { display: none; font-size: 13.5px; font-weight: 800; color: var(--red); margin-top: 6px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #FFF8F7; }
.field.invalid .err { display: block; }
.field.invalid .choice-row { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 20px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 52px; }
.pw-eye {
    position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 12px;
    background: none; cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center;
}
.pw-eye svg { width: 22px; height: 22px; }

/* ── Buttons ── */
.btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 14px 18px;
    border: 0; border-radius: 18px; cursor: pointer; text-decoration: none; text-align: center;
    font: 800 17px 'Almarai', sans-serif; transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 var(--yellow-deep), 0 14px 26px rgba(160,110,0,0.22); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--yellow-deep); }
.btn-blue { background: var(--blue-grad); color: #FFFFFF; box-shadow: 0 5px 0 #174C76, 0 12px 24px rgba(31,90,149,0.25); }
.btn-blue:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #174C76; }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #ECE2C8; }
.btn-wa { background: var(--green-wa); color: #FFFFFF; box-shadow: 0 5px 0 #1A9E4B, 0 12px 24px rgba(20,120,60,0.22); }
.btn:disabled { cursor: not-allowed; opacity: 1; background: #E8E1CF; color: rgba(31,58,95,0.45); box-shadow: none; }
.btn:focus-visible, .pg-home:focus-visible, .link-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.link-btn { background: none; border: 0; padding: 0 4px; min-height: 44px; cursor: pointer; color: var(--blue-700); font: 800 14.5px 'Almarai', sans-serif; text-decoration: underline; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(31,58,95,0.25); border-top-color: var(--ink); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Messages ── */
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 15px; font-weight: 800; line-height: 1.6; margin-top: 14px; }
.msg svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.msg-error { background: var(--red-soft); color: var(--red); border: 1.5px solid rgba(192,57,43,0.25); }
.msg-info { background: var(--blue-soft); color: var(--blue-700); border: 1.5px solid rgba(42,111,176,0.25); }
.msg a { color: inherit; font-weight: 800; }
.msg .wa-link { color: #128C4A; text-decoration: underline; }

/* ── Choice cards (radio buttons drawn as cards) ── */
.choice-row { display: grid; gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .box {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; min-height: 64px;
    background: #FFFFFF; border: 2px solid rgba(31,58,95,0.14); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.choice:hover .box { border-color: rgba(42,111,176,0.45); }
.choice input:checked + .box { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 4px rgba(249,197,58,0.55); }
.choice input:focus-visible + .box { outline: 3px solid var(--blue); outline-offset: 3px; }
.choice .tick {
    width: 24px; height: 24px; border-radius: 50%; flex: none; margin-inline-start: auto;
    border: 2px solid rgba(31,58,95,0.25); background: #FFFFFF; display: flex; align-items: center; justify-content: center;
}
.choice input:checked + .box .tick { background: var(--blue); border-color: var(--blue); }
.choice input:checked + .box .tick::after { content: ''; width: 10px; height: 6px; border: solid #FFFFFF; border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -1px); }
.ico-disc {
    width: 46px; height: 46px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, #FFE88F, #F9C53A 55%, #E0A81E); box-shadow: 0 3px 0 rgba(219,162,26,0.6);
}
.ico-disc svg { width: 74%; height: 74%; fill: var(--ink); }
.ico-disc.blue { background: radial-gradient(circle at 35% 30%, #5FA6E0, #2A6FB0 60%, #1F5A95); box-shadow: 0 3px 0 #174C76; }
.ico-disc.blue svg { fill: var(--paper-warm); }

/* ── Help strip + footer ── */
.help {
    display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 20px;
    background: rgba(255,253,247,0.8); border: 1.5px dashed rgba(31,58,95,0.18); font-size: 14px; font-weight: 700; color: var(--ink-2);
}
.help svg { width: 34px; height: 34px; flex: none; }
.help a { font-weight: 800; color: #128C4A; text-decoration: none; }
.pg-foot { text-align: center; padding: 18px 16px 30px; font-size: 13px; color: var(--muted); }
.pg-foot a { color: var(--ink-2); margin: 0 6px; }

@media (min-width: 760px) {
    body { background-size: auto, auto, auto, 1100px auto, auto; }
    .pg-header { padding: 16px 24px; }
    .pg-hero { padding-top: 26px; }
    .pg-hero h1 { font-size: 46px; }
    .pg-hero .lead { font-size: 18px; }
    .card { padding: 28px 28px; }
    .card-title { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 2s; }
    * { scroll-behavior: auto !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
