:root {
  color-scheme: dark;
  --bg: #f7f4ec;
  --panel: #ffffff;
  --panel-soft: #eef4ef;
  --ink: #1d2522;
  --muted: #55625c;
  --subtle: #7c8781;
  --line: #d7ddd6;
  --accent: #b76526;
  --accent-soft: #f2dfca;
  --band: #e8efe9;
  --green: #e0f0ea;
  --blue: #e1ecf6;
  --red: #f4e3e6;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(247, 244, 236, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #171512;
  font-family: Georgia, serif;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-weight: 650;
}

.main-nav a,
.header-action,
.button,
.contact-grid a {
  text-decoration: none;
}

.main-nav a:hover,
.contact-grid a:hover {
  color: var(--accent);
}

.header-action {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #171512;
  font-weight: 800;
}

.section,
.section-band {
  padding: 92px max(24px, calc((100vw - var(--max)) / 2));
}

.section-band {
  background: var(--band);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: center;
  gap: 70px;
  min-height: calc(100vh - 72px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h1 {
  max-width: 720px;
  font-size: clamp(46px, 6vw, 76px);
}

.hero-title {
  font-family: "Pinyon Script", "Segoe Script", cursive;
  font-size: clamp(48px, 6.2vw, 82px);
  font-weight: 400;
}

h2 {
  max-width: 860px;
  font-size: clamp(30px, 3.6vw, 48px);
}

.intro-title {
  font-size: clamp(24px, 2.8vw, 36px);
}

h3 {
  font-size: 24px;
}

p {
  color: var(--muted);
  font-size: 18px;
}

.hero-lede {
  max-width: 660px;
  margin: 28px 0 0;
  font-size: 20px;
}

.hero-note {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 850;
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #171512;
}

.button-secondary {
  background: #ffffff;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
  margin: 42px 0 0;
}

.quick-facts div,
.info-panel,
.overview-panel,
.condition-grid article,
.price-card,
.steps div,
.contact-grid article,
.booking-form,
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.quick-facts div {
  padding: 16px;
}

.quick-facts dt {
  color: var(--subtle);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 850;
}

.portrait {
  margin: 0;
  overflow: hidden;
  border: 10px solid #ffffff;
  border-radius: 34px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  color: var(--muted);
}

.portrait strong {
  color: var(--ink);
}

.narrow {
  max-width: 1020px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.reverse {
  align-items: start;
}

.info-panel {
  padding: 32px;
}

.overview-panel {
  max-width: 980px;
  margin: 0 auto 28px;
  padding: 30px 34px;
}

.info-panel.muted {
  background: var(--panel-soft);
}

.check-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 18px;
}

.check-list li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.section-heading {
  max-width: 880px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-heading h2 {
  margin-inline: auto;
}

.condition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.condition-grid article {
  min-height: 310px;
  padding: 28px;
}

.condition-grid article:nth-child(2) {
  background: var(--green);
}

.condition-grid article:nth-child(4) {
  background: var(--blue);
}

.condition-grid article:nth-child(5) {
  background: var(--red);
}

.steps {
  display: grid;
  gap: 14px;
}

.steps div {
  padding: 24px;
}

.steps span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

.steps strong {
  font-size: 20px;
}

.pricing-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.price-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 30px;
}

.price-card strong {
  color: var(--accent);
  font-size: 34px;
}

.price-card span {
  grid-column: 1 / -1;
  color: var(--subtle);
}

.faq {
  max-width: 1080px;
}

.faq details {
  margin-top: 14px;
  padding: 22px 26px;
}

.faq summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 850;
}

.contact {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 46px;
  align-items: start;
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 32px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f4ec;
  color: var(--ink);
  font: inherit;
  padding: 15px 16px;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.privacy-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.privacy-check input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--accent);
}

.form-notice {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
}

.form-notice.success {
  background: #dff2e5;
  color: #185a31;
}

.form-notice.error {
  background: #f8dddd;
  color: #8c1f1f;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
}

.full {
  grid-column: 1 / -1;
}

.contact-grid {
  grid-template-columns: repeat(3, 1fr);
}

.contact-grid article {
  padding: 30px;
  text-align: center;
}

.contact-grid a {
  color: var(--accent);
  font-weight: 850;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 42px max(24px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.site-footer span {
  display: block;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  font-size: 15px;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.mobile-cta {
  display: none;
}

.calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 37, 34, 0.62);
}

.calendar-modal.is-open {
  display: flex;
}

.calendar-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.calendar-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  padding: 42px 46px 26px;
  border-bottom: 1px solid var(--line);
}

.calendar-head h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-right: 48px;
}

.calendar-nav button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.calendar-current-month {
  min-width: 190px;
  text-align: center;
  font-size: 18px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 32px 46px 46px;
}

.calendar-panel,
.time-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 24px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.calendar-day.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.calendar-day.is-unavailable {
  background: #f4d7d7;
  color: #8c1f1f;
  cursor: not-allowed;
}

.calendar-day.is-selected {
  border-color: #1f6f3c;
  background: #dff2e5;
  color: #185a31;
  box-shadow: inset 0 0 0 2px #1f6f3c;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calendar-legend i {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.legend-available {
  background: #ffffff;
}

.legend-unavailable {
  background: #f4d7d7;
}

.legend-selected {
  background: #dff2e5;
}

.time-panel h3 {
  margin-bottom: 10px;
}

.selected-date-text {
  margin-top: 0;
  font-size: 16px;
}

.appointment-type-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.appointment-type-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.appointment-type-heading h4 {
  margin: 0;
  font-size: 17px;
}

.appointment-type-heading span {
  color: var(--subtle);
  font-size: 13px;
  font-weight: 800;
}

.time-slots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0 0;
}

.slot-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--subtle);
  font-size: 14px;
}

.time-slot {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.time-slot.is-selected {
  border-color: #1f6f3c;
  background: #dff2e5;
  color: #185a31;
}

.time-slot.is-booked {
  background: #f4d7d7;
  color: #8c1f1f;
  cursor: not-allowed;
}

.calendar-booking-form {
  display: grid;
  gap: 14px;
}

.calendar-booking-form label {
  font-size: 14px;
}

.calendar-booking-form input,
.calendar-booking-form textarea {
  padding: 12px 13px;
}

.calendar-booking-form button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.doctor-admin-page {
  min-height: 100vh;
  background: var(--bg);
}

.doctor-login {
  width: min(480px, calc(100% - 40px));
  margin: 12vh auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 34px;
}

.doctor-login h1 {
  font-size: clamp(34px, 5vw, 48px);
}

.doctor-login form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.doctor-admin {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0;
}

.doctor-admin-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  max-width: 820px;
  margin-bottom: 34px;
}

.doctor-admin-header h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.doctor-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.doctor-admin-form,
.doctor-admin-help {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 28px;
}

.doctor-admin-form {
  display: grid;
  gap: 18px;
}

.doctor-service-editor {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doctor-service-editor legend {
  padding: 0 8px;
  color: var(--ink);
  font-weight: 850;
}

.doctor-service-editor .doctor-slot-editor {
  grid-column: 1 / -1;
}

.doctor-slot-editor {
  display: grid;
  gap: 10px;
}

.doctor-slot-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto 42px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.doctor-slot-remove {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: #8c1f1f;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.doctor-slot-row .doctor-slot-occupied {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}

.doctor-slot-row .doctor-slot-occupied input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.doctor-slot-row .doctor-slot-time {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.doctor-slot-row .doctor-slot-time input {
  min-width: 120px;
  padding: 10px;
}

.doctor-slot-update {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.doctor-admin-status {
  min-height: 24px;
  margin: 0;
  font-size: 15px;
  font-weight: 850;
}

.doctor-admin-status.success {
  color: #185a31;
}

.doctor-admin-status.error {
  color: #8c1f1f;
}

.doctor-admin-help strong {
  color: var(--ink);
}

@media (max-width: 920px) {
  .main-nav {
    display: none;
  }

  .hero,
  .split,
  .contact,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .condition-grid,
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-head,
  .calendar-layout {
    padding-inline: 24px;
  }

  .calendar-head,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-head {
    display: grid;
  }

  .calendar-nav {
    justify-content: start;
    padding-right: 0;
  }

  .doctor-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 14px;
  }

  .brand small,
  .header-action {
    display: none;
  }

  body {
    padding-bottom: 68px;
  }

  .mobile-cta {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  }

  .mobile-cta a {
    min-height: 52px;
    display: grid;
    place-items: center;
    color: var(--ink);
    text-decoration: none;
    font-weight: 850;
  }

  .mobile-cta a + a {
    border-left: 1px solid var(--line);
  }

  .section,
  .section-band {
    padding: 64px 18px;
  }

  .hero {
    min-height: auto;
  }

  .quick-facts,
  .condition-grid,
  .pricing-grid,
  .contact-grid,
  .booking-form {
    grid-template-columns: 1fr;
  }

  .price-card {
    grid-template-columns: 1fr;
  }

  .calendar-modal {
    padding: 10px;
  }

  .calendar-dialog {
    max-height: calc(100vh - 20px);
  }

  .calendar-head,
  .calendar-layout {
    padding: 22px 16px;
  }

  .calendar-current-month {
    min-width: 134px;
    font-size: 15px;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 48px;
    padding: 0;
  }

  .time-slots {
    grid-template-columns: 1fr;
  }

  .doctor-slot-row {
    grid-template-columns: 1fr;
  }

  .doctor-service-editor {
    grid-template-columns: 1fr;
  }

  .doctor-service-editor .doctor-slot-editor {
    grid-column: auto;
  }
}
