/* ============================================================
   TOKENS
   ============================================================ */
:root{
  --ink:        #1b1a19;
  --paper:      #faf9f7;
  --panel:      #ffffff;
  --line:       #e3e0da;
  --muted:      #6f6b64;
  --accent:     #6f1d2c;      /* deep burgundy */
  --accent-dark:#54141f;
  --success:    #2d6a4f;
  --success-dark:#1f4d38;
  --danger:     #b3261e;
  --radius:     6px;
  --radius-lg:  10px;
  --shadow-card: 0 24px 60px -20px rgba(27,26,25,0.28), 0 4px 16px -4px rgba(27,26,25,0.10);
  --font-display:'Playfair Display', Georgia, serif;
  --font-body:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

/* IMPORTANT: .field{display:flex} below has the same CSS specificity
   as the browser's built-in "[hidden]{display:none}" rule, and author
   styles win ties — so without this, an element with class="field"
   and the hidden attribute (like #modelField for Saudi Arabia) would
   NOT actually hide. This rule makes sure [hidden] always wins. */
[hidden]{ display:none !important; }

body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:
    radial-gradient(1100px 500px at 50% -10%, #f1ede6 0%, var(--paper) 55%),
    var(--paper);
  -webkit-font-smoothing:antialiased;
}

/* ============================================================
   PAGE / LAYOUT
   ============================================================ */
.page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:0 0;
}
.hero img
{
   width: 100%;
}
.card{
  width:100%;
  max-width:620px;
  background:var(--panel);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-card);
  border:1px solid rgba(27,26,25,0.04);
  padding:44px 40px 40px;
  position:relative;
}
.card::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:4px;
  border-radius:var(--radius-lg) var(--radius-lg) 0 0;
  background:linear-gradient(90deg,var(--accent),#a8586a 50%,var(--accent));
}

.footer-note{
  margin-top:22px;
  font-size:12.5px;
  color:var(--muted);
  text-align:center;
}
.footer-note a{
  color:var(--muted);
  text-decoration:underline;
}
.footer-note a:hover{ color:var(--accent); }

/* ============================================================
   INTRO HEADING (above the card)
   ============================================================ */
.intro-heading{
  width:100%;
  max-width:760px;
  text-align:center;
  padding:36px 24px 8px;
}
.intro-heading h1{
  font-family:var(--font-body);
  font-weight:700;
  font-size:28px;
  line-height:1.3;
  letter-spacing:.005em;
  margin:0 0 12px;
  color:var(--ink);
}
.intro-heading p{
  font-family:var(--font-body);
  font-weight:600;
  font-size:15px;
  line-height:1.55;
  margin:0;
  color:var(--ink);
}

/* ============================================================
   FORM HEADER
   ============================================================ */
.card-head{ text-align:center; margin-bottom:30px; }
.hero-image{
    width:100%;
    border-radius:10px;
    display:block;
    margin:0 auto;
}

.mobile-image{
    display:none;
}
.eyebrow{
  margin:0 0 6px;
  font-size:11.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--accent);
  font-weight:600;
}
.card-head h1{
  font-family:var(--font-body);
  font-weight:700;
  font-size:22px;
  letter-spacing:.005em;
  margin:0 0 12px;
  color:var(--accent);
}
.card-head .lede{
  margin:0 0 14px;
  font-size:15px;
  line-height:1.55;
  color:var(--muted);
}
.req-note{
  margin:0;
  font-size:12.5px;
  color:var(--muted);
}
.req{ color:var(--accent); }

/* ============================================================
   FORM FIELDS
   ============================================================ */
form{ display:flex; flex-direction:column; gap:18px; }

.row-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.field{ display:flex; flex-direction:column; gap:6px; }

.field label{
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--ink);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select{
  width:100%;
  font-family:var(--font-body);
  font-size:15px;
  padding:12px 14px;
  border:1.5px solid var(--line);
  border-radius:var(--radius);
  background:var(--panel);
  color:var(--ink);
  transition:border-color .15s ease, box-shadow .15s ease;
  appearance:none;
  -webkit-appearance:none;
}

select{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%236F6B64' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat:no-repeat;
  background-position:right 14px center;
  padding-right:34px;
  cursor:pointer;
}

input:focus,
select:focus,
.country-select:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(111,29,44,0.12);
}

.field.invalid input,
.field.invalid select,
.field.invalid .phone-group{
  border-color:var(--danger);
}
.field.invalid .country-select{ border-color:var(--danger); }

.error-msg{
  font-size:12.5px;
  color:var(--danger);
  min-height:0;
  display:none;
}
.field.invalid .error-msg{ display:block; }

/* Phone group */
.phone-group{
  display:flex;
  align-items:stretch;
  border:1.5px solid var(--line);
  border-radius:var(--radius);
  overflow:visible;
  position:relative;
  background:var(--panel);
  transition:border-color .15s ease, box-shadow .15s ease;
}
.phone-group:focus-within{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(111,29,44,0.12);
}
.country-code-fixed{
  display:flex;
  align-items:center;
  background:#f4f2ee;
  border-right:1.5px solid var(--line);
  padding:0 14px;
  font-size:14px;
  font-family:var(--font-body);
  color:var(--ink);
  border-radius:var(--radius) 0 0 var(--radius);
  white-space:nowrap;
}
.phone-group input[type="tel"]{
  border:none;
  border-radius:0 var(--radius) var(--radius) 0;
  flex:1;
  min-width:0;
}
.phone-group input[type="tel"]:focus{ box-shadow:none; }

/* Flag + ISO-code badge shown at the start of the phone field.
   This is a plain, non-interactive <span> now — the visitor can no
   longer change the country from here, only from the searchable
   Country field below (see .country-select-wrap). It only ever
   shows the flag + ISO code (e.g. "🇲🇾 MY") — see .dial-code for
   the dial code, shown as its own read-only segment. */
.phone-group span.flag-select{
  display:flex;
  align-items:center;
  border-right:1.5px solid var(--line);
  border-radius:var(--radius) 0 0 var(--radius);
  background-color:#f4f2ee;
  max-width:84px;
  flex:0 0 auto;
  font-size:13.5px;
  padding:0 12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Small helper line under the phone field pointing at the Country
   field as the only way to change the detected country. */
.field-hint{
  font-size:11.5px;
  color:var(--muted);
  margin:0;
}

/* Read-only dial-code segment shown between the compact country
   select and the phone number input, e.g. "+60". Kept separate so
   the select itself only ever shows the ISO code + flag. */
.phone-group .dial-code{
  display:flex;
  align-items:center;
  padding:0 10px;
  font-size:14px;
  font-family:var(--font-body);
  color:var(--muted);
  border-right:1.5px solid var(--line);
  background:var(--panel);
  white-space:nowrap;
  flex:0 0 auto;
}

/* ============================================================
   SEARCHABLE COUNTRY DROPDOWN
   A text input + filtered <ul> listbox (no native <select>, so it
   can be filtered as you type) — this is the ONLY control that
   changes the country; the phone field's flag/dial badges above
   are read-only and just follow this field.
   ============================================================ */
.country-select-wrap{
  position:relative;
}
.country-select-wrap .country-select{
  margin:0;
  padding-right:34px;
  cursor:pointer;
}
.country-select-wrap .country-select:hover{
  border-color:#c9c4bb;
}
.country-select-arrow{
  position:absolute;
  top:0;
  right:14px;
  bottom:0;
  width:10px;
  pointer-events:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%236F6B64' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat:no-repeat;
  background-position:center;
}
.country-options{
  list-style:none;
  margin:0;
  padding:6px;
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  max-height:248px;
  overflow-y:auto;
  background:var(--panel);
  border:1.5px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 16px 40px -12px rgba(27,26,25,0.28);
  z-index:20;
}
.country-options li{
  padding:9px 12px;
  border-radius:4px;
  font-size:14.5px;
  color:var(--ink);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
}
.country-options li:hover,
.country-options li.is-active{
  background:#f4f2ee;
}
.country-options li.is-empty{
  color:var(--muted);
  cursor:default;
}
.country-options li.is-empty:hover{ background:none; }
.country-options li .flag{ font-size:15px; }
.country-options li .dial{ margin-left:auto; color:var(--muted); font-size:13px; }

/* Consent text block */
.consent-block{
  background:#f6f4f0;
  border-radius:var(--radius);
  padding:16px 18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.consent-block p{
  margin:0;
  font-size:12.8px;
  line-height:1.6;
  color:var(--muted);
}
.consent-block a{ color:var(--accent); }

.link-btn{
  background:none;
  border:none;
  padding:0;
  font:inherit;
  font-weight:600;
  color:var(--accent);
  text-decoration:underline;
  cursor:pointer;
}
.link-btn:hover{ color:var(--accent-dark); }

/* Checkbox */
.checkbox-field{ flex-direction:row; }
.checkbox-label{
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-size:13.5px;
  line-height:1.5;
  color:var(--ink);
  cursor:pointer;
}
.checkbox-label input[type="checkbox"]{
  width:18px;
  height:18px;
  margin-top:1px;
  flex-shrink:0;
  accent-color:var(--accent);
  cursor:pointer;
}

/* Status + submit */
.form-status{
  display:none;
  font-size:13.5px;
  padding:10px 14px;
  border-radius:var(--radius);
}
.form-status.show{ display:block; }
.form-status.error{ background:#fbeceb; color:var(--danger); }

.submit-btn{
  position:sticky;
  bottom:16px;
  z-index:5;
  width:100%;
  padding:15px 20px;
  background:var(--success);
  color:#fff;
  border:none;
  border-radius:var(--radius);
  font-family:var(--font-body);
  font-size:14.5px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .15s ease, transform .1s ease;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  box-shadow:0 10px 28px -8px rgba(45,106,79,0.45);
}
.submit-btn:hover{ background:var(--success-dark); }
.submit-btn:active{ transform:translateY(1px); }
.submit-btn:disabled{ opacity:.7; cursor:not-allowed; }
.secondary-btn{ background:var(--accent); position:relative; bottom:auto; margin-top:6px; box-shadow:none; }
.secondary-btn:hover{ background:var(--accent-dark); }

.spinner{
  width:16px; height:16px;
  border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ============================================================
   THANK YOU VIEW
   ============================================================ */
.thankyou{ text-align:center; padding:20px 4px 6px; }
.check-badge{
  width:64px; height:64px;
  margin:0 auto 22px;
  border-radius:50%;
  background:#eaf3ee;
  color:var(--success);
  display:flex; align-items:center; justify-content:center;
}
.thankyou h1{
  font-family:var(--font-display);
  font-size:30px;
  letter-spacing:.03em;
  margin:0 0 16px;
}
.thankyou p{
  font-size:15px;
  line-height:1.65;
  color:var(--muted);
  max-width:420px;
  margin:0 auto 28px;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(27,26,25,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:100;
}
.modal-overlay.open{ display:flex; }

.modal{
  width:100%;
  max-width:680px;
  max-height:85vh;
  background:var(--panel);
  border-radius:var(--radius-lg);
  box-shadow:0 30px 80px -20px rgba(0,0,0,.5);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px 24px;
  border-bottom:1px solid var(--line);
  flex-shrink:0;
}
.modal-head h2{
  font-family:var(--font-display);
  font-size:22px;
  margin:0;
}
.modal-close{
  background:none;
  border:none;
  font-size:26px;
  line-height:1;
  color:var(--muted);
  cursor:pointer;
  padding:4px 8px;
}
.modal-close:hover{ color:var(--ink); }

.modal-body{
  padding:22px 24px 30px;
  overflow-y:auto;
  font-size:13.8px;
  line-height:1.7;
  color:#3a3835;
}
.modal-body h3{
  font-family:var(--font-body);
  font-size:14.5px;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin:22px 0 8px;
  color:var(--ink);
}
.modal-body p{ margin:0 0 12px; }
.modal-body a{ color:var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px){
  .page{ padding:0 0; justify-content:flex-start; }
  .card{ padding:18px 12px 16px; border-radius:var(--radius); }
  .card-head{ margin-bottom:18px; }
  .card-head h1{ font-size:18px; }
  .intro-heading{ padding:24px 18px 4px; }
  .intro-heading h1{ font-size:20px; }
  .intro-heading p{ font-size:13.5px; }
  .row-2{ grid-template-columns:1fr; gap:14px; }
  form{ gap:14px; }
  .modal{ max-height:90vh; }
  .modal-head{ padding:16px 18px; }
  .modal-body{ padding:16px 18px 24px; }
}

@media (max-width: 380px){
  .card{ padding:14px 10px 14px; }
  .card-head h1{ font-size:21px; }
}
