/* ============================================================
   Farseer Demo Page — V2 (slim: hero + form card only)
   Matches V7.2.1 main site design system
   ============================================================ */

:root {
  /* Brand */
  --brand: #E87722;
  --brand-hover: #D86712;
  --brand-deep: #B9540C;
  --brand-light: #FFF0E0;
  --brand-soft: #FFE8D4;

  /* Surface */
  --navy: #081222;
  --navy-2: #0F1A2E;
  --navy-3: #14213D;
  --ink: #0B1422;
  --ink-2: #1F2937;
  --muted: #5B6776;
  --muted-2: #8A93A0;
  --line: #E5E8EE;
  --line-2: #EFF1F5;
  --bg: #F7F8FA;
  --white: #FFFFFF;

  /* Status */
  --error: #D43F3F;
  --success: #1F9D6A;

  /* Typography */
  --font-display: 'Futura', 'Futura PT', 'Jost', 'Helvetica Neue', Helvetica, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --font-sans: 'Helvetica Neue', Helvetica, 'Hanken Grotesk', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', Arial, sans-serif;

  /* Layout */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 24px 60px rgba(8, 18, 34, 0.12), 0 6px 18px rgba(8, 18, 34, 0.06);
  --shadow-input-focus: 0 0 0 4px rgba(232, 119, 34, 0.15);
}

/* Reset */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Source Sans Pro", Calibri, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

.container { max-width: 920px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   Hero (dark navy + APAC map background)
   ============================================================ */
.hero {
  position: relative;
  background-color: var(--navy);
  background-image:
    linear-gradient(180deg, rgba(8,18,34,0.55) 0%, rgba(8,18,34,0.30) 60%, rgba(8,18,34,0.85) 100%),
    linear-gradient(90deg, rgba(8,18,34,0.78) 0%, rgba(8,18,34,0.40) 45%, rgba(8,18,34,0.00) 75%),
    url('../images/newpage/hero-bg.png');
  background-size: cover, cover, cover;
  background-position: center, center, center right;
  background-repeat: no-repeat;
  color: #fff;
  padding: 96px 0 132px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 96px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 100%);
  pointer-events: none;
}
.hero-inner {
  max-width: 760px;
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(232, 119, 34, 0.12);
  border: 1px solid rgba(232, 119, 34, 0.45);
  padding: 8px 16px;
  border-radius: 999px;
  text-transform: uppercase;
}
.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 10px rgba(232, 119, 34, 0.7);
}
.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 22px 0 18px;
  color: #fff;
}
.hero-headline .accent { color: var(--brand); }
.hero-sub {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin: 0;
}

/* ============================================================
   Form section — single centered white card
   ============================================================ */
.form-section {
  position: relative;
  margin-top: -72px;
  padding-bottom: 96px;
  z-index: 3;
}
.form-card {
  background: #fff;
  border-radius: 18px;
  padding: 48px 56px 44px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(229, 232, 238, 0.7);
  max-width: 920px;
  margin: 0 auto;
}
.form-card h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.form-required-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 32px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
}
.field-grid .field-full { grid-column: span 2; }

.field {
  display: flex;
  flex-direction: column;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}
.field-label .req { color: var(--brand); margin-left: 2px; }

.field-input,
.field-select,
.field-textarea {
  font-family: "Source Sans Pro", Calibri, sans-serif;;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.field-input::placeholder,
.field-textarea::placeholder { color: var(--muted-2); }
.field-input:hover,
.field-select:hover,
.field-textarea:hover { border-color: #C9CFD9; }
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--shadow-input-focus);
}

.field-select {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%235B6776' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.field-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.field.has-error .field-input,
.field.has-error .field-select,
.field.has-error .field-textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(212, 63, 63, 0.12);
}
.field-error-msg {
  display: none;
  font-size: 12.5px;
  color: var(--error);
  margin-top: 6px;
}
.field.has-error .field-error-msg { display: block; }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--line-2);
  border-radius: var(--radius-sm);
}
.consent-row input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.consent-row label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.consent-row a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.submit-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
}
.submit-btn {
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 44px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(232, 119, 34, 0.28);
  transition: all .2s ease;
  min-width: 200px;
  justify-content: center;
}
.submit-btn:hover:not(:disabled) {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(232, 119, 34, 0.34);
}
.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.submit-btn .spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
  display: none;
}
.submit-btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Success state (replaces card after submit)
   ============================================================ */
.form-success {
  display: none;
  text-align: center;
  padding: 56px 32px;
}
.success-check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(31, 157, 106, 0.12);
  border: 2px solid rgba(31, 157, 106, 0.4);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.form-success h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}
.form-success p {
  font-size: 15px;
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.65;
}
.form-card.is-submitted .form-body { display: none; }
.form-card.is-submitted .form-success { display: block; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .hero {
    padding: 64px 0 110px;
    background-image:
      linear-gradient(180deg, rgba(8,18,34,0.65) 0%, rgba(8,18,34,0.85) 100%),
      url('../images/newpage/hero-bg-mobile.png');
    background-position: center, center;
    background-size: cover, cover;
  }
  .hero-headline { font-size: 30px; line-height: 1.15; }
  .hero-sub { font-size: 14.5px; }
  .form-section { margin-top: -64px; padding-bottom: 72px; }
  .form-card { padding: 28px 22px 26px; border-radius: 14px; }
  .form-card h2 { font-size: 22px; }
  .field-grid { grid-template-columns: 1fr; gap: 18px; }
  .field-grid .field-full { grid-column: span 1; }
  .submit-row { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .submit-btn { width: 100%; padding: 16px; }
}
