/* ==========================================================
   Nurim Dermatech — Appointment Booking
   Brand palette drawn from logo:
     --bark      : deep espresso brown (wordmark, headings)
     --clay      : warm terracotta orange (the "n" swoosh)
     --gold-leaf : bright amber (the little leaf accent)
     --cream     : warm paper background
   ========================================================== */

:root {
  --bark: #3E2013;
  --bark-soft: #5A3420;
  --clay: #C97A2E;
  --clay-deep: #B5651D;
  --gold-leaf: #E8A23A;
  --cream: #FBF6EE;
  --cream-deep: #F3E9D8;
  --paper: #FFFFFF;
  --ink-soft: #7A6A5C;
  --line: #E7DBC8;
  --success: #4C7A4C;
  --shadow: 0 20px 45px -18px rgba(62, 32, 19, 0.35);
  --radius: 16px;
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Sora', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--bark);
  background:
    radial-gradient(1100px 500px at 12% -10%, #FFF3E1 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #F8ECD8 0%, transparent 50%),
    var(--cream);
  min-height: 100vh;
  line-height: 1.5;
}

/* ---------- Leaf texture divider ---------- */
.leaf-divider {
  width: 46px;
  height: 3px;
  background: linear-gradient(90deg, var(--clay), var(--gold-leaf));
  border-radius: 4px;
  margin: 0 auto;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 26px 20px 6px;
}
.topbar img {
  height: 74px;
  width: auto;
}

/* ---------- Layout shell ---------- */
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 20px 70px;
}

.hero-copy {
  text-align: center;
  margin: 6px 0 34px;
}
.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-deep);
  font-weight: 600;
  background: #FDEFDD;
  border: 1px solid #F3D9AE;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--bark);
}
.hero-copy p {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 460px;
  margin: 14px auto 0;
}

/* ---------- Card ---------- */
.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 42px 44px 40px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--bark), var(--clay) 45%, var(--gold-leaf));
}

@media (max-width: 560px) {
  .card { padding: 30px 22px 28px; }
}

/* ---------- Form grid ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 24px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--bark-soft);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.field label .req { color: var(--clay-deep); margin-left: 2px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #FEFCF8;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--bark);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field textarea { resize: vertical; min-height: 96px; }

.field input::placeholder,
.field textarea::placeholder { color: #B5A896; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--clay);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(201, 122, 46, 0.14);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='%233E2013' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}

.field .error-msg {
  display: none;
  color: #B23A3A;
  font-size: 12.5px;
  margin-top: 6px;
  font-weight: 500;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #D77373;
  box-shadow: 0 0 0 4px rgba(215, 115, 115, 0.12);
}
.field.has-error .error-msg { display: block; }

/* ---------- Submit ---------- */
.submit-row { margin-top: 32px; }
.btn-book {
  width: 100%;
  border: none;
  cursor: pointer;
  padding: 17px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bark) 0%, var(--bark-soft) 100%);
  color: #FDF1DE;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 14px 28px -12px rgba(62, 32, 19, 0.55);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-book:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-book:active { transform: translateY(0); }
.btn-book:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.btn-book svg { width: 18px; height: 18px; }

/* ---------- Footer note / phone ---------- */
.contact-strip {
  text-align: center;
  margin-top: 26px;
  color: var(--ink-soft);
  font-size: 14px;
}
.contact-strip a {
  color: var(--clay-deep);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px dashed var(--clay);
}
.contact-strip a:hover { color: var(--bark); }

.privacy-note {
  text-align: center;
  color: #A3927E;
  font-size: 12px;
  margin-top: 18px;
}

/* ---------- Thank-you page ---------- */
.ty-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 48px 44px 42px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ty-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--bark), var(--clay) 45%, var(--gold-leaf));
}
@media (max-width: 560px) {
  .ty-card { padding: 36px 22px 30px; }
}

.ty-icon {
  width: 84px;
  height: 84px;
  margin: 4px auto 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F8E3C3, #EFCB8B 55%, var(--gold-leaf));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px -10px rgba(232, 162, 58, 0.6);
}
.ty-icon svg { width: 38px; height: 38px; }

.ty-card h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  margin: 0 0 8px;
  color: var(--bark);
}
.ty-card > p.sub {
  color: var(--ink-soft);
  margin: 0 0 30px;
  font-size: 15.5px;
}

.summary {
  text-align: left;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 26px;
  margin-bottom: 28px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed #E0D2BB;
  font-size: 14.5px;
}
.summary-row:last-child { border-bottom: none; }
.summary-row .k {
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}
.summary-row .v {
  color: var(--bark);
  font-weight: 700;
  text-align: right;
}

.ty-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-secondary,
.btn-primary {
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--bark), var(--bark-soft));
  color: #FDF1DE;
  box-shadow: 0 12px 24px -12px rgba(62,32,19,.55);
}
.btn-secondary {
  background: #fff;
  color: var(--bark);
  border: 1.5px solid var(--line);
}
.btn-secondary:hover { border-color: var(--clay); color: var(--clay-deep); }

.ty-phone {
  margin-top: 30px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.ty-phone a { color: var(--clay-deep); font-weight: 700; text-decoration: none; }

/* ---------- Toast (client-side validation summary) ---------- */
.form-alert {
  display: none;
  background: #FDECEC;
  border: 1px solid #F1B9B9;
  color: #A13030;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 22px;
}
.form-alert.show { display: block; }
