/* ─── DESIGN TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --teal:       #70CAC9;
  --teal-dark:  #55a8a7;
  --blue-gray:  #545266;
  --cream:      #F1F2ED;
  --cream-dark: #e4e5df;
  --red:        #E56B5D;
  --orange:     #F7B15F;
  --green:      #90AA51;
  --brown:      #967763;
  --white:      #ffffff;

  --text:       var(--blue-gray);
  --text-light: #8886a0;
  --border:     #d8d9d4;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(84,82,102,0.08);
}

/* ─── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── BASE ──────────────────────────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

/* ─── LAYOUT ────────────────────────────────────────────────────────────────── */
.page-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ─── HEADER ────────────────────────────────────────────────────────────────── */

.site-header {
  padding: 36px 0 28px;
  border-bottom: 2px solid var(--teal);
  margin-bottom: 40px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-text { flex: 1; }

.header-logo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 10%;
  flex-shrink: 0;
}

.brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-dark);
  text-decoration: none;
  display: block;
}
a.brand:hover { text-decoration: none; }

.header-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--blue-gray);
  margin-top: 4px;
  line-height: 1.2;
}

.header-tagline {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.4;
}

/* ─── HOW IT WORKS ──────────────────────────────────────────────────────────── */
.how-it-works {
  margin-bottom: 36px;
  padding: 16px 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.how-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.how-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-align: center;
}

.how-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-gray);
  line-height: 1.3;
}

.how-step-arrow {
  color: var(--teal);
  font-size: 18px;
  font-weight: 300;
  flex-shrink: 0;
  margin-bottom: 20px;
}

@media (max-width: 400px) {
  .how-step-label { font-size: 11px; }
}

/* ─── INTRO ─────────────────────────────────────────────────────────────────── */
.intro {
  margin-bottom: 36px;
}

.intro p {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 6px;
  max-width: 460px;
}

/* ─── FORM SECTIONS ─────────────────────────────────────────────────────────── */
.form-section {
  margin-bottom: 40px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 16px;
  display: block;
}

/* ─── FIELDS ────────────────────────────────────────────────────────────────── */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-gray);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--blue-gray);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(112,202,201,0.18);
}

.field input::placeholder { color: #bbbcb8; }

.field textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--blue-gray);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
  min-height: 68px;
  line-height: 1.5;
}

.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(112,202,201,0.18);
}

.field textarea::placeholder { color: #bbbcb8; }

.field-hint-inline {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
  margin-top: -2px;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23545266' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Time pair: hour + minute side by side */
.time-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.time-pair select { width: 100%; }

/* ─── MEETING CARDS ─────────────────────────────────────────────────────────── */
#meetings-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 16px;
}

.meeting-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
}

.meeting-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.meeting-card-number {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}

.btn-remove {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.btn-remove:hover { background: rgba(229,107,93,0.08); }

/* ─── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--white);
  border: 1.5px dashed var(--teal);
  border-radius: var(--radius);
  padding: 12px 20px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.btn-add:hover { background: rgba(112,202,201,0.06); }
.btn-add:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-submit {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 32px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: var(--white);
  background: var(--blue-gray);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.1s;
}
.btn-submit:hover  { background: #3f3d52; }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* ─── TEXT LINK BUTTON ──────────────────────────────────────────────────────── */
.btn-text-link {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
  text-decoration: underline;
  transition: color 0.15s;
}
.btn-text-link:hover { color: var(--blue-gray); }

/* ─── PRIVACY NOTE ──────────────────────────────────────────────────────────── */
.privacy-note {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--cream-dark);
  border-radius: var(--radius);
}

/* ─── ERROR MESSAGE ─────────────────────────────────────────────────────────── */
.form-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(229,107,93,0.08);
  border: 1.5px solid var(--red);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--red);
  font-weight: 500;
}

/* ─── SUCCESS STATE ─────────────────────────────────────────────────────────── */
#success-state {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

#success-state .checkmark {
  width: 56px;
  height: 56px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

#success-state .checkmark svg { width: 28px; height: 28px; }

#success-state h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--blue-gray);
  margin-bottom: 10px;
}

.success-actions { margin-top: 32px; }

.success-nudge {
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(112,202,201,0.12);
  border: 1.5px solid var(--teal);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--blue-gray);
  line-height: 1.6;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

#success-state p {
  font-size: 15px;
  color: var(--text-light);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── CALENDAR RECOMMENDATIONS ──────────────────────────────────────────────── */
#recs-section {
  margin-bottom: 40px;
}

.recs-header {
  margin-bottom: 12px;
}

.recs-status {
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 12px;
  min-height: 20px;
}

#recs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.rec-card {
  background: var(--white);
  border: 1.5px solid var(--teal);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 6px rgba(112,202,201,0.12);
}

.rec-card-body { flex: 1; }

.rec-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-gray);
  margin-bottom: 3px;
}

.rec-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 5px;
}

.rec-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: rgba(112,202,201,0.12);
  padding: 3px 8px;
  border-radius: 20px;
}

.rec-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.btn-rec-add {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: var(--teal-dark);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-rec-add:hover { background: var(--teal); }

.btn-rec-skip {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.btn-rec-skip:hover { border-color: var(--text-light); color: var(--blue-gray); }

@media (max-width: 480px) {
  .rec-card { flex-direction: column; }
  .rec-card-actions { flex-direction: row; }
}

/* ─── ICAL / CALENDAR SECTION ───────────────────────────────────────────────── */
.label-optional {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-left: 6px;
  opacity: 0.8;
}

.field-hint {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 14px;
}

.ical-help {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-light);
}

.ical-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--teal-dark);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}

.ical-help summary::-webkit-details-marker { display: none; }

.ical-help summary::before {
  content: '▸';
  font-size: 11px;
  transition: transform 0.2s;
}

.ical-help[open] summary::before {
  transform: rotate(90deg);
}

.ical-help ol {
  margin: 12px 0 10px 18px;
  line-height: 1.7;
}

.ical-help li { margin-bottom: 4px; }

.ical-privacy {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
  padding: 10px 14px;
  background: var(--cream-dark);
  border-radius: 8px;
  margin-top: 10px;
}

/* ─── EMAIL PREVIEW ─────────────────────────────────────────────────────────── */
.email-preview {
  margin-bottom: 40px;
}

.email-preview-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 12px;
}

.email-preview-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ep-header {
  background: var(--blue-gray);
  padding: 16px 20px;
  display: flex;
  align-items: center;
}

.ep-brand {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.7;
  margin-bottom: 3px;
}

.ep-title {
  font-size: 16px;
  color: var(--teal);
  font-weight: normal;
}

.ep-body {
  background: var(--white);
  padding: 20px;
}

.ep-greeting {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-gray);
  margin-bottom: 4px;
}

.ep-sub {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 16px;
}

.ep-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e8e8e2;
  border-radius: 6px;
  overflow: hidden;
}

.ep-table thead tr {
  background: var(--cream);
}

.ep-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #999;
  font-weight: normal;
  border-bottom: 1px solid #e8e8e2;
}

.ep-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8e8e2;
  vertical-align: top;
}

.ep-table tbody tr:last-child td {
  border-bottom: none;
}

.ep-meeting-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-gray);
}

.ep-meeting-meta {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.ep-practice-cell {
  border-left: 3px solid;
}

.ep-practice-name {
  font-size: 13px;
  font-weight: 600;
}

.ep-practice-somatic {
  font-size: 11px;
  color: #777;
  font-style: italic;
  margin-top: 2px;
}

/* ─── FOOTER ────────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}

.site-footer a { color: var(--teal-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
