/* Uzhavan Travels — customer website. Colours come from the logo. */
:root {
  --navy: #0B2A5B;
  --navy-dark: #081F44;
  --navy-soft: #E3E9F5;
  --gold: #E0A526;
  --gold-soft: #FBF1D9;
  --red: #D62828;
  --green: #2E7D32;
  --green-soft: #E7F4E8;
  --bg: #FBF8F1;
  --card: #FFFFFF;
  --text: #13213B;
  --muted: #5B6578;
  --border: #D9DEE8;
  --input: #FFFFFF;
  --shadow: 0 1px 2px rgba(11, 42, 91, .06), 0 6px 20px rgba(11, 42, 91, .06);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #8FB0EE;
    --navy-dark: #B5CBF5;
    --navy-soft: #16264A;
    --gold: #F2C14E;
    --gold-soft: #3A2F12;
    --red: #FF7070;
    --green: #6FCF7A;
    --green-soft: #133120;
    --bg: #0A1426;
    --card: #111E36;
    --text: #E8EDF6;
    --muted: #A3AEC2;
    --border: #2A3A5C;
    --input: #0D1A30;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
}

[hidden] { display: none !important; }

/* Header */
.site-header {
  background: #0B2A5B;
  color: #fff;
  padding: 14px 16px;
  border-bottom: 3px solid #E0A526;
}
.brand { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;              /* square-crops the circle, hides white corners */
  background: #fff;
  border: 2px solid #E0A526;
  flex: none;
}
.brand-name { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.brand-tagline { margin: 0; font-size: 14px; color: #F2D79A; }

/* Layout */
.container { max-width: 640px; margin: 0 auto; padding: 20px 16px 32px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  margin-bottom: 16px;
}
@media (min-width: 560px) { .card { padding: 24px; } }

h1 { font-size: 22px; margin: 0 0 4px; color: var(--navy); }
.muted { color: var(--muted); margin: 0 0 12px; }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.req { color: var(--red); }
.optional { color: var(--muted); font-weight: 400; }

/* Sections */
.section { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--navy);
  padding: 0; margin-bottom: 12px;
}
.step {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #13213B; font-size: 14px; font-weight: 800;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2.compact { grid-template-columns: 1fr 1fr; }

/* Fields */
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--input);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-soft);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red); }

.error { display: block; color: var(--red); font-size: 13px; margin-top: 4px; min-height: 0; }
.error:empty { display: none; }

/* Classes (multi-select chips) */
.class-group { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.group-label { display: block; padding: 0; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.class-group .hint { margin: 0 0 8px; }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chip { position: relative; display: block; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  min-height: 48px; padding: 8px 10px; text-align: left; line-height: 1.2;
  font-weight: 600; font-size: 14.5px; color: var(--text); white-space: nowrap;
  background: var(--input); border: 1.5px solid var(--border); border-radius: 10px;
  transition: background .15s, border-color .15s;
}
.chip span::before {
  content: ""; flex: none; width: 18px; height: 18px;
  border: 2px solid var(--muted); border-radius: 5px; background: var(--input);
}
.chip input:checked + span { background: var(--navy-soft); border-color: var(--navy); color: var(--navy); }
.chip input:checked + span::before {
  background: var(--navy); border-color: var(--navy);
  box-shadow: inset 0 0 0 3px var(--input);
}
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.class-group[aria-invalid="true"] .chip span { border-color: var(--red); }

/* Date inputs open the calendar on any tap */
input[type="date"] { cursor: pointer; }

/* Passengers */
.passenger {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--bg);
}
.passenger-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.passenger-title { margin: 0; font-weight: 700; color: var(--navy); }
.passenger .field:last-of-type { margin-bottom: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  font: inherit; font-weight: 700; text-decoration: none;
  border-radius: 10px; border: 1.5px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-block { width: 100%; }
.btn-primary { background: #0B2A5B; color: #fff; }
.btn-primary:hover { background: #081F44; }
.btn-secondary { background: var(--navy-soft); color: var(--navy); }
.btn-outline { width: 100%; background: transparent; color: var(--navy); border-color: var(--navy); border-style: dashed; }
.btn-outline:hover { background: var(--navy-soft); }
.btn-gold { background: var(--gold); color: #13213B; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
@media (prefers-color-scheme: dark) {
  .btn-primary { background: #E0A526; color: #13213B; }
  .btn-primary:hover { background: #F2C14E; }
  .site-header { background: #071A3A; }
}

.link-button {
  background: none; border: 0; padding: 8px; min-height: 40px;
  color: var(--red); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}

.spinner {
  display: none; width: 18px; height: 18px;
  border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

.field textarea { display: block; min-height: 88px; resize: vertical; line-height: 1.4; }
.remarks { margin-top: 0; }
.remarks .hint { text-align: right; }

/* Security check (simple sum) */
.captcha { margin-top: 20px; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-question {
  flex: none; min-width: 92px; padding: 10px 14px; border-radius: 10px;
  background: var(--gold-soft); color: var(--text);
  font-size: 20px; font-weight: 800; letter-spacing: 1px; text-align: center;
  user-select: none;
}
.captcha-row input { width: 84px; flex: none; text-align: center; font-size: 20px; font-weight: 700; }
.captcha-refresh {
  flex: none; width: 48px; height: 48px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--input); color: var(--navy);
  font-size: 22px; cursor: pointer;
}
.captcha-refresh:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.captcha.solved .captcha-row input { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.captcha.solved .hint { color: var(--green); font-weight: 600; }

/* Submit bar: sticks to the bottom on phones */
.submit-bar { margin-top: 8px; }
.form-error { margin: 0 0 8px; }
@media (max-width: 559px) {
  .submit-bar {
    position: sticky; bottom: 0;
    margin: 8px -16px -20px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--card); border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

/* Success */
.success { text-align: center; }
.success h1 { margin-bottom: 6px; }
.success-icon {
  width: 72px; height: 72px; margin: 4px auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 36px; font-weight: 800;
  background: var(--green-soft); color: var(--green);
}
.reference-label { margin: 18px 0 8px; color: var(--muted); font-size: 15px; }
.share-whatsapp {
  display: inline-flex; align-items: stretch; gap: 8px;
  position: relative; text-decoration: none; border-radius: 12px;
}
.share-whatsapp:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.reference {
  display: inline-flex; align-items: center; padding: 10px 18px;
  font-size: clamp(22px, 7.5vw, 32px); font-weight: 800; letter-spacing: 1.5px; white-space: nowrap;
  color: #0B2A5B; background: #25D366; border-radius: 12px;
}
.wa-icon {
  display: grid; place-items: center; width: 60px; flex: none;
  background: #1DA851; border-radius: 12px;
}
.share-whatsapp:hover .reference, .share-whatsapp:hover .wa-icon { filter: brightness(1.05); }
.tap-hand {
  position: absolute; right: -30px; bottom: -18px; font-size: 30px;
  animation: tap 1.2s ease-in-out infinite;
}
@keyframes tap { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-4px, -6px); } }
@media (prefers-reduced-motion: reduce) { .tap-hand { animation: none; } }
.share-label { margin: 14px 0 18px; color: #1C8C43; font-size: 22px; font-weight: 800; }
@media (prefers-color-scheme: dark) { .share-label { color: #4ADE80; } }
.success > .btn-primary { width: 100%; margin-top: 4px; }
.share-whatsapp.no-whatsapp { pointer-events: none; }
.share-whatsapp.no-whatsapp .wa-icon, .share-whatsapp.no-whatsapp .tap-hand { display: none; }
.share-whatsapp.no-whatsapp .reference { background: var(--gold); }

/* Footer */
.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 24px; }
.site-footer p { margin: 4px 0; }
.disclaimer { font-size: 12px; }

/* Honeypot — invisible to humans, traps bots */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
