/* Faithful rebuild of the Squarespace site (template 7.1, Fluid Engine).
   Measurements come from the live page. Squarespace's fonts are Adobe Fonts
   (Orpheus Pro for headings, Interface for text); the free stand-ins below are
   Cormorant Garamond and Jost. See README to swap in the real fonts. */
:root {
  --band: #f4f4f3;
  --white: #ffffff;
  --ink: #000000;

  --heading: "orpheus-pro", "Cormorant Garamond", Georgia, serif;
  --text: "interface", "Jost", -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Squarespace 7.1 grid: 24 columns, 11px gaps, 4vw gutters, 1500px max. */
  --max: 1500px;
  --gap: 11px;
  --gutter: 4vw;
  --cols: 24;

  /* Squarespace type scale: size = (value - 1) * unit + 12px, unit = 1.2vw. */
  --unit: min(1.2vw, 18px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 300;
  font-size: calc(.2 * var(--unit) + 12px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--heading); font-weight: 400; margin: 0; }
h1 { font-size: calc(3 * var(--unit) + 12px); line-height: 1.232; }
h2 { font-size: calc(1.8 * var(--unit) + 12px); line-height: 1.2992; }
h3 { font-size: calc(1.2 * var(--unit) + 12px); line-height: 1.3328; }
p { margin: 0; }

/* Layout */
.grid {
  display: grid;
  column-gap: var(--gap);
  grid-template-columns:
    minmax(calc(var(--gutter) - var(--gap)), 1fr)
    repeat(var(--cols), minmax(0, calc((var(--max) - var(--gap) * (var(--cols) - 1)) / var(--cols))))
    minmax(calc(var(--gutter) - var(--gap)), 1fr);
}
.section--intro, .section--contact { background: var(--band); }
.section--bio { background: var(--white); }

/* Fills the window height, headline centered; grows if the window is shorter than the text. */
.section--intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 6vw 0;
}
.intro { grid-column: 3 / 23; }
.highlight {
  background: linear-gradient(transparent 8%, var(--white) 8%, var(--white) 88%, transparent 88%);
  padding-left: .13em;
  margin-left: -.13em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.section--bio { padding: 9.4vw 0 9.2vw; }
/* Text spans columns 3-24; the photo floats right over the last 8, so the
   bio wraps beside it and then runs full width underneath. */
.bio-text { grid-column: 3 / 25; display: flow-root; }
.bio-text h3 { margin-bottom: 24px; }
.bio-text p {
  font-size: calc(.5 * var(--unit) + 12px);
  line-height: 1.6;
  margin-bottom: 12px;
}
.bio-text p:last-child { margin-bottom: 0; }
.bio-photo {
  float: right;
  width: calc((100% - 21 * var(--gap)) * 8 / 22 + 7 * var(--gap));
  margin: 0 0 24px calc((100% - 21 * var(--gap)) / 22 + 2 * var(--gap));
  aspect-ratio: 407 / 631;
  height: auto;
  object-fit: cover;
}

.section--contact { padding: 3.3vw 0 5.9vw; }
/* Heading lines up with the bio text; form ends in line with the photo. */
.contact-heading { grid-column: 3 / 12; grid-row: 1; align-self: start; }

/* Form: a raised white card with pale filled fields; a black underline marks the active field. */
.contact-form {
  grid-column: 13 / 25;
  grid-row: 1;
  background: var(--white);
  padding: 40px 44px 44px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 40px -20px rgba(0,0,0,.18);
}
.field { display: block; margin-bottom: 24px; }
.field .title {
  display: block;
  padding-bottom: 6px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .7;
}
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: var(--band);
  box-shadow: inset 0 -1px 0 transparent;
  color: var(--ink);
  font: inherit;
  transition: background .2s, box-shadow .2s;
}
.contact-form textarea { height: 140px; resize: vertical; }
.contact-form input:hover, .contact-form textarea:hover { background: #efefed; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: 0;
  background: #efefed;
  box-shadow: inset 0 -2px 0 var(--ink);
}
.contact-form button {
  appearance: none;
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--heading);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: .01em;
  line-height: 1.2;
  padding: 14px 24px 15px;
  cursor: pointer;
  transition: background .2s;
}
.contact-form button:hover { background: #333; }
.contact-form button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.contact-form button:disabled { opacity: .5; cursor: default; }
.form-status:not(:empty) { margin: 20px 0 0; }

/* Calendar page */
.section--page-title { background: var(--band); padding: 3.4vw 0 4.4vw; }
.home-link {
  grid-column: 3 / 25;
  margin-bottom: 4vw;
  font-family: var(--heading);
  font-size: calc(.5 * var(--unit) + 12px);
  color: inherit;
  text-decoration: none;
}
.home-link:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.page-title { grid-column: 3 / 25; }
.page-lede { grid-column: 3 / 25; margin-top: 10px; }
.section--calendar { padding: 3vw 0 9.2vw; }

/* Availability grid: Eastern weekdays as columns, busy blocks dark, open time white. */
.availability {
  grid-column: 3 / 25;
  --line: #e2e2de;
  --line-soft: #efefec;
  --busy: #2b2b2b;
  --hour: 52px;
}
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
.cal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-btn, .cal-zone-btn {
  appearance: none;
  height: 36px;
  min-width: 36px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cal-btn[aria-label] { padding: 0; font-size: 22px; line-height: 1; }
.cal-btn:hover:not(:disabled), .cal-zone-btn:hover { background: var(--ink); color: var(--white); }
.cal-btn:disabled { opacity: .25; cursor: default; }
.cal-range { margin: 0 0 0 10px; font-size: calc(.6 * var(--unit) + 12px); line-height: 1.2; white-space: nowrap; }
.cal-zone { display: flex; }
.cal-zone[hidden] { display: none; }
.cal-zone-btn + .cal-zone-btn { border-left: 0; }
.cal-zone-btn[aria-pressed="true"] { background: var(--ink); color: var(--white); cursor: default; }

.cal-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; margin-bottom: 14px; font-size: 13px; }
.cal-legend { white-space: nowrap; }
.cal-swatch { display: inline-block; width: 12px; height: 12px; margin: 0 6px 0 0; vertical-align: -1px; }
.cal-swatch--busy { background: var(--busy); }
.cal-swatch--open { background: var(--white); box-shadow: inset 0 0 0 1px #bdbdb8; margin-left: 14px; }
.cal-detail { flex: 1 1 260px; font-weight: 400; }
.cal-updated { opacity: .65; }
.cal-updated.is-stale { opacity: 1; font-weight: 400; color: #8a2d00; }

.cal-grid {
  display: grid;
  grid-template-columns: 62px repeat(var(--days, 5), minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.cal-corner { align-self: end; padding: 0 10px 10px 0; text-align: right; font-size: 11px; letter-spacing: .08em; opacity: .6; }
.cal-dayhead { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 10px; }
.cal-weekday { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.cal-date {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  font-family: var(--heading);
  font-size: 24px;
  line-height: 1;
}
.cal-dayhead.is-today .cal-date { background: var(--ink); color: var(--white); }
.cal-hours, .cal-col { position: relative; height: calc(var(--hour) * var(--rows, 10)); }
.cal-hour {
  position: absolute;
  right: 10px;
  transform: translateY(-50%);
  font-size: 11px;
  white-space: nowrap;
  opacity: .7;
}
.cal-hour:first-child { transform: none; }
.cal-hour:last-child { transform: translateY(-100%); }
.cal-col {
  border-left: 1px solid var(--line);
  background-color: var(--white);
  background-image:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) / 2), var(--line-soft) calc(var(--hour) / 2) calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px) var(--hour));
}
.cal-col:last-child { border-right: 1px solid var(--line); }
.cal-block {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  font: inherit;
  text-align: left;
  cursor: default;
}
.cal-block--open { background: transparent; z-index: 1; }
.cal-block--open:hover, .cal-block--open:focus-visible { background: rgba(0, 0, 0, .05); box-shadow: inset 0 0 0 1px var(--ink); outline: 0; }
.cal-block--busy {
  left: 3px;
  right: 3px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 4px 7px;
  overflow: hidden;
  background: var(--busy);
  color: var(--white);
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 0 0 0 1px var(--white);
}
.cal-block--busy:hover, .cal-block--busy:focus-visible { background: var(--ink); outline: 2px solid var(--ink); outline-offset: 1px; }
.cal-block--busy span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-busy-label { font-weight: 600; letter-spacing: .02em; }
.cal-busy-time { opacity: .85; }
.cal-block--open span { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cal-block--open { display: flex; flex-direction: column; justify-content: flex-start; padding: 4px 7px; overflow: hidden; color: var(--ink); font-size: 12px; line-height: 1.3; }
  .cal-block--open:hover span { display: block; overflow: hidden; text-overflow: ellipsis; }
  .cal-open-label { font-weight: 600; white-space: nowrap; }
}
.cal-past {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
  background: rgba(255, 255, 255, .72);
}
.cal-now { position: absolute; left: 0; right: 0; z-index: 4; border-top: 2px solid var(--ink); pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; background: var(--ink); border-radius: 50%; }
.cal-message { grid-column: 1 / -1; padding: 40px 0; }
.cal-message a { color: inherit; }

/* Squarespace switches to an 8-column stacked layout below 768px. */
@media (max-width: 767px) {
  :root {
    --cols: 8;
    --gutter: 6vw;
    --unit: calc(.012 * min(100vh, 900px));
  }
  .section--intro { padding: 12vw 0; }
  .intro { grid-column: 2 / 10; }

  .section--bio { padding: 14vw 0; }
  .bio-text { grid-column: 2 / 10; }
  .bio-photo { float: none; width: 100%; margin: 0 0 11vw; }

  .section--contact { padding: 10vw 0 14vw; }
  .contact-heading { grid-column: 2 / 10; grid-row: 1; margin-bottom: 8vw; }
  .contact-form { grid-column: 2 / 10; grid-row: 2; padding: 28px 22px 30px; }

  .section--page-title { padding: 8vw 0 10vw; }
  .home-link { grid-column: 2 / 10; margin-bottom: 10vw; }
  .page-title, .page-lede { grid-column: 2 / 10; }
  .section--calendar { padding: 6vw 0 14vw; }
  .availability { grid-column: 2 / 10; --hour: 44px; }
  .cal-range { flex-basis: 100%; margin: 6px 0 0; }
  .cal-zone { width: 100%; }
  .cal-zone-btn { flex: 1; padding: 0 8px; font-size: 13px; }
  .cal-meta { gap: 6px 16px; }
  .cal-grid { grid-template-columns: 44px repeat(var(--days, 5), minmax(0, 1fr)); }
  .cal-corner { padding-right: 6px; font-size: 10px; letter-spacing: .02em; }
  .cal-hour { right: 6px; font-size: 10px; }
  .cal-date { min-width: 30px; height: 30px; font-size: 20px; }
  .cal-weekday { font-size: 10px; letter-spacing: .08em; }
  .cal-block--busy { left: 2px; right: 2px; }
  .cal-block--busy { padding: 3px 4px; }
  .cal-busy-label { font-size: 9px; letter-spacing: 0; }
  .cal-busy-time { display: none; }
}
