/*
  Palette and type sourced from thedentistry_Identity Manual.pdf (brand guideline):
  Dark Blue #5b6a86 is the primary accent; Sage/Tan/Beige/Pink/Light Blue are
  supporting tones; Inter (English) + Anuphan (Thai) are the brand typefaces.
*/
:root {
  --primary: #5b6a86;
  --primary-dark: #46536b;
  --primary-tint: #eef1f5;
  --sage: #7d7f75;
  --light-sage: #b0c5bc;
  --tan: #da9770;
  --beige: #e8e1d1;
  --pink: #dfccc7;
  --light-blue: #d9ebf8;
  --ink: #4c4543;
  --ink-soft: #8a8178;
  --bg: #f7f5f0;
  --card: #ffffff;
  --border: #e3ded4;
  --danger: #b5544a;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 2px 8px rgba(76, 69, 67, 0.05), 0 16px 40px rgba(76, 69, 67, 0.08);
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Inter', 'Anuphan', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: radial-gradient(circle at 50% -10%, #f2ece1 0%, var(--bg) 45%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  letter-spacing: -0.01em;
}

.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 18px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.brand {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: -20px -18px 6px;
  padding: 14px 18px 12px;
  background: rgba(247, 245, 240, 0.75);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid rgba(76, 69, 67, 0.08);
}

.brand .tooth {
  font-size: 28px;
}

.brand h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.brand-logo {
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(76, 69, 67, 0.18);
}

.brand-sub {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 8px 0 0;
}

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 22px;
}

.step-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.step-indicator span.active {
  background: var(--primary);
  transform: scale(1.3);
}

.step-indicator span.done {
  background: var(--tan);
}

.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 26px;
  border: 1px solid var(--border);
  animation: cardIn 0.5s var(--ease) both;
  z-index: 0;
}

/* Signature graphic: thin curved lines peeking from opposite corners — the
   brand manual's "Curves" motif, reproduced with plain borders/circles so it
   needs no image asset. Kept faint, small, and behind content; never more
   than two per surface. */
.card::before,
.card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
.card::before {
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border: 1px solid var(--tan);
  opacity: 0.25;
}
.card::after {
  bottom: -24px;
  left: -24px;
  width: 90px;
  height: 90px;
  border: 1px solid var(--light-sage);
  opacity: 0.3;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Wrap a .poster-banner/.hero-banner in this so a .float-chip can hang off
   its corner without being clipped by the banner's own overflow:hidden. */
.hero-wrap {
  position: relative;
}
.float-chip {
  position: absolute;
  top: -10px;
  right: 10px;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 6px 11px;
  box-shadow: 0 10px 22px rgba(43, 38, 36, 0.28);
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
  animation: cardIn 0.5s var(--ease) 0.1s both;
}
.float-chip .chip-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.65);
}
.float-chip .chip-value {
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

h2.title {
  font-size: 1.45rem;
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p.subtitle {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 6px;
}

label .en {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  background: #fbfaf8;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 106, 134, 0.14);
}

.field-error {
  color: var(--danger);
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 1em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border-radius: 999px;
  border: none;
  font-size: 0.96rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(76, 69, 67, 0.16);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}

.btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 20px rgba(76, 69, 67, 0.2);
}

.btn:active {
  transform: scale(0.98);
  box-shadow: 0 3px 10px rgba(76, 69, 67, 0.16);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}

.btn.ghost {
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  font-weight: 500;
}

.mt {
  margin-top: 14px;
}

.center {
  text-align: center;
}

.small {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

a.link {
  color: var(--primary);
  text-decoration: underline;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-tint);
  color: var(--primary);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Soft gradient intro banner — same color-strip + corner-glow motif as the
   card, used ahead of a .card to introduce a step with more presence. */
.hero-banner {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 130% 100% at 100% 115%, rgba(218, 151, 112, 0.32), transparent 60%),
    #fdfcfa;
  border-radius: var(--radius-lg);
  padding: 32px 22px 18px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  animation: cardIn 0.5s var(--ease) both;
}
.hero-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 6px;
  background: var(--light-sage);
}
.hero-eyebrow {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.hero-title {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.hero-sub {
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin: 6px 0 0;
  line-height: 1.5;
}

.benefit-row {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}
.benefit-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}
.benefit-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.benefit-item .label {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.3;
}

/* Small leading icon inside a text input, fintech-app style */
.input-group {
  position: relative;
}
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  opacity: 0.5;
  pointer-events: none;
}
.input-group input {
  padding-left: 40px;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

footer.foot {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.72rem;
  margin-top: 22px;
}
