
:root {
  --green: #1f4433;
  --green-soft: #2d5a45;
  --copper: #a35c32;
  --copper-light: #c07d51;
  --paper: #f8f6f0;
  --ink: #29271f;
  --muted: #6d685c;
  --rule: #e2dccc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Public Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color: var(--green);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

a { color: var(--green-soft); }

.container { max-width: 1060px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 4.2vw, 1.5rem);
  color: var(--green);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand span { color: var(--copper); }

.site-nav { display: flex; flex-wrap: wrap; gap: 1.6rem; }

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--copper); border-bottom-color: var(--copper); }

/* Hamburger toggle — hidden on desktop, shown on mobile for the
   collapsible nav. The admin header's nav is not collapsible. */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 759px) {
  .nav-toggle { display: block; }

  .site-nav.collapsible { display: none; }

  .site-nav.collapsible.open {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin-top: 0.4rem;
    border-top: 1px solid var(--rule);
  }

  .site-nav.collapsible a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(to bottom, #fdfcf8, var(--paper));
  border-bottom: 1px solid var(--rule);
  padding: 4.5rem 0;
}

/* Mobile-first: text stacked above the (optional) portrait. */
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hero-text {
  max-width: 640px;
  border-left: 3px solid var(--copper);
  padding-left: 1.6rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--copper);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.hero .lede {
  font-size: 1.12rem;
  color: var(--muted);
  margin-bottom: 2.2rem;
}

.hero-portrait { width: min(240px, 60vw); }

.hero-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--copper-light);
}

/* Desktop: text left, portrait right. */
@media (min-width: 760px) {
  .hero { padding: 6rem 0; }
  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3.5rem;
  }
  .hero-portrait { width: 280px; flex-shrink: 0; }
}

.btn {
  display: inline-block;
  background: var(--green);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  padding: 0.9rem 2.4rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.btn:hover { background: var(--green-soft); }

/* ---------- Sections ---------- */
section { padding: 4.5rem 0; }

section:nth-of-type(even) { background: #fdfcf8; }

/* Numbered, left-aligned section headings. */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.8rem;
  margin-bottom: 2.2rem;
}

.section-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--copper);
}

.section-heading { font-size: clamp(1.6rem, 6vw, 2.2rem); }

/* About */
.about-body { max-width: 760px; }
.about-body p { margin-bottom: 1.2rem; }

/* Practice areas: numbered two-column list instead of cards. */
.practice-intro { max-width: 680px; margin-bottom: 2rem; color: var(--muted); }

.practice-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 3rem;
  max-width: 860px;
}

.practice-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0.2rem;
  border-bottom: 1px solid var(--rule);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--green);
}

.practice-list .num {
  font-family: "Public Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--copper);
}

/* ---------- Calendar ---------- */
.calendar-note { max-width: 620px; margin-bottom: 2rem; color: var(--muted); }

.calendar {
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(31, 68, 51, 0.07);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--green);
  color: #fff;
  padding: 0.8rem 1rem;
}

.calendar-header h3 {
  color: #fff;
  font-family: "Public Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.calendar-header button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}

.calendar-header button:hover { border-color: var(--copper-light); color: var(--copper-light); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-grid .dow {
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.calendar-grid .day {
  min-height: 64px;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink);
}

.calendar-grid .day:nth-child(7n) { border-right: none; }
.calendar-grid .day.outside { color: #c9c4b6; background: #fbfaf5; }
.calendar-grid .day.today {
  background: rgba(163, 92, 50, 0.1);
  font-weight: 700;
  color: var(--green);
}

.calendar-grid .day.busy,
.calendar-grid .day.available {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calendar-grid .day.busy::after,
.calendar-grid .day.available::after {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-radius: 2px;
  padding: 0.1rem 0.25rem;
  align-self: flex-start;
}

/* Unavailable: hatched shading, a corner-to-corner cross, and a struck-
   through day number. */
.calendar-grid .day.busy {
  background:
    linear-gradient(to top right,
      transparent calc(50% - 1px),
      rgba(140, 59, 46, 0.4) calc(50% - 1px),
      rgba(140, 59, 46, 0.4) calc(50% + 1px),
      transparent calc(50% + 1px)),
    repeating-linear-gradient(-45deg,
      rgba(140, 59, 46, 0.08) 0 6px,
      transparent 6px 12px),
    #f3e7e5;
}

.calendar-grid .day.busy .num {
  text-decoration: line-through;
  color: #936058;
}

.calendar-grid .day.busy::after {
  content: "Busy";
  color: #8c3b2e;
  background: rgba(255, 255, 255, 0.75);
}

.calendar-grid .day.available::after {
  content: "Available";
  color: #2e6b46;
  background: rgba(46, 107, 70, 0.12);
}

.calendar-grid .day.available { cursor: pointer; }

.calendar-grid .day.available:hover,
.calendar-grid .day.available:focus-visible {
  outline: 2px solid #2e6b46;
  outline-offset: -2px;
  background: rgba(46, 107, 70, 0.08);
}

.calendar-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.8rem 1rem;
  background: #fbfaf5;
  border-top: 1px solid var(--rule);
}

.legend { display: inline-flex; align-items: center; gap: 0.4rem; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-available { background: #2e6b46; }
.dot-busy { background: #8c3b2e; }

@media (max-width: 480px) {
  .calendar-grid .day.busy::after { content: "B"; }
  .calendar-grid .day.available::after { content: "A"; }
}

/* ---------- Contact ---------- */
.contact-blurb { max-width: 620px; margin-bottom: 2rem; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  max-width: 860px;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--copper);
  border-radius: 0 6px 6px 0;
  padding: 1.6rem 1.4rem;
}

.contact-card .label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.contact-card a {
  text-decoration: none;
  font-size: 1.05rem;
  color: var(--green);
  font-weight: 600;
}

/* Booking popup (Web3Forms) */
.contact-cta { margin-top: 2.5rem; }

dialog.booking-dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: min(680px, calc(100vw - 2rem));
}

dialog.booking-dialog::backdrop {
  background: rgba(31, 68, 51, 0.55);
}

.booking {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--copper);
  border-radius: 6px;
  padding: 2rem 1.6rem;
  max-height: 85vh;
  overflow-y: auto;
}

.dialog-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.3rem;
}

.dialog-close:hover { color: var(--green); }

.booking h3 { text-align: center; font-size: 1.6rem; margin-bottom: 1.5rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

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

.booking label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
}

.booking input:not(.botcheck),
.booking textarea {
  width: 100%;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  padding: 0.6rem 0.7rem;
  border: 1px solid #cfc9b8;
  border-radius: 4px;
  background: #fff;
  margin-top: 0.35rem;
}

.booking textarea { min-height: 120px; resize: vertical; }

.booking .btn { margin-top: 1.3rem; }

.botcheck { display: none; }

#form-status { margin-top: 0.9rem; font-size: 0.95rem; color: var(--muted); }
#form-status.ok { color: #2e6b46; }
#form-status.error { color: #8c3b2e; }

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green);
  color: #cfd8cf;
  text-align: center;
  padding: 1.6rem 1rem;
  font-size: 0.9rem;
}

/* ---------- Admin ---------- */
.admin-page { background: #f1efe7; min-height: 100vh; }

.admin-main { max-width: 880px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

.admin-main h1 { margin-bottom: 0.3rem; }

.admin-main .hint { color: var(--muted); margin-bottom: 2rem; }

.admin-section {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-section h2 {
  font-size: 1.35rem;
  border-bottom: 2px solid var(--copper);
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
}

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green);
  margin-bottom: 0.35rem;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid #cfc9b8;
  border-radius: 4px;
  background: #fffdf8;
}

.field textarea { min-height: 110px; resize: vertical; }

.field textarea.tall { min-height: 320px; }

.field .help { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

.admin-bar {
  position: sticky;
  bottom: 0;
  background: var(--green);
  padding: 0.9rem 1.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

#save-status { color: #d8dcd4; font-size: 0.9rem; }
#save-status.error { color: #f0b4b4; }
#save-status.ok { color: var(--copper-light); }
