/* Rebecca Flynn - v3
   Drawn at 390 first. 4-col mobile grid, 20px margins, 16px gutters.
   Colors are sampled from the work: slate tile, Davies-kitchen teal, plaster. */

:root {
  --paper: #F7F7F4;
  --white: #FFFFFF;
  --ink: #1F2A2E;
  --ink-2: #566260;
  --line: #D6DAD4;
  --plaster: #E6E9E3;
  --teal: #0E6B6E;
  --teal-press: #0A5558;

  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Literata", Georgia, serif;

  --m: 20px;           /* outer margin */
  --col: calc((100vw - 2 * var(--m) - 3 * 16px) / 4);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* room for the dock */
}

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

a { color: inherit; }

h1, h2, h3, p, blockquote, figure, dl, dd, ol, ul { margin: 0; }

h1, h2, h3 { font-weight: 500; text-wrap: balance; }

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--m);
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  text-decoration: none;
}
.skip:focus { top: 10px; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 22px;
  background: var(--teal);
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--teal-press); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }

.quiet-link,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color .15s ease;
}
.quiet-link:hover,
.text-link:hover { text-decoration-color: currentColor; }

.text-link { color: var(--teal); font-weight: 500; }

/* ---------- Header and menu ---------- */

.top {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
  padding: 0 var(--m);
  background: var(--paper);
}

.mark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  line-height: 1.15;
  margin-right: auto;
}
.mark-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.mark-sub { font-size: 13px; color: var(--ink-2); }

.top-phone { display: none; }

.menu-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 16px/1 var(--sans);
  min-width: 44px;
  min-height: 44px;
  padding: 0 0 0 12px;
  margin-right: -2px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--paper);
  padding: 96px var(--m) 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu ul { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.menu li { border-bottom: 1px solid var(--line); }
.menu li a {
  display: block;
  padding: 14px 0 12px;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.menu-foot { margin-top: auto; padding-top: 32px; font-size: 16px; line-height: 2; }
.menu-foot a { text-decoration-thickness: 1px; text-underline-offset: 4px; }

body.menu-open { overflow: hidden; }

/* ---------- Opening ---------- */

.open { padding: 20px 0 0; }

.open-copy { padding: 0 var(--m); }

.open h1 {
  font-size: 40px;
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: 11.5em;
}

.open-lede {
  margin-top: 18px;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 30em;
}

.open-act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 24px;
}

.open-art {
  position: relative;
  margin-top: 40px;
  padding-bottom: 0;
}

.open-photo {
  margin-left: calc(var(--m) + var(--col) * .75);
  height: 400px;
  overflow: hidden;
}
.open-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 50%;
}

.open-sketch {
  position: relative;
  width: 68%;
  margin: -112px 0 0 var(--m);
  background: var(--white);
  padding: 6px;
}

.open-art figcaption {
  padding: 12px var(--m) 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 30em;
}

/* ---------- Scope statement ---------- */

.scope {
  padding: 80px var(--m) 88px;
}
.scope p {
  font-size: 22px;
  line-height: 1.32;
  letter-spacing: -0.012em;
  max-width: 24em;
  text-indent: calc(var(--col) + 16px);
}

/* ---------- Before / Drawing / Finished ---------- */

.seq {
  background: var(--plaster);
  padding: 56px 0 56px;
}

.seq-head { padding: 0 var(--m); max-width: 40em; }
.seq h2 {
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: 10em;
}
.seq-head p { margin-top: 12px; font-size: 15px; color: var(--ink-2); max-width: 28em; }

.seq-track {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  padding: 0 var(--m) 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--m);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.seq-track::-webkit-scrollbar { display: none; }

.seq-item {
  flex: 0 0 calc(100% - 44px);
  scroll-snap-align: start;
}

.seq-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--white);
  overflow: hidden;
}
.seq-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
}
.seq-frame img.is-drawing { object-fit: contain; padding: 8px; }

.seq-item[data-state="before"] img[data-for="before"],
.seq-item[data-state="drawn"]  img[data-for="drawn"],
.seq-item[data-state="built"]  img[data-for="built"] { opacity: 1; }

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 10px;
  padding: 3px;
  background: #D5DAD3;
  border-radius: 7px;
}
.seg button {
  appearance: none;
  border: 0;
  min-height: 44px;
  background: transparent;
  color: var(--ink);
  font: 500 15px/1 var(--sans);
  border-radius: 5px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.seg button:hover { background: rgba(255,255,255,.5); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.seq-item h3 {
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.seq-item h3 a { text-decoration: none; }
.seq-item h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.seq-place { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.seq-note { margin-top: 10px; font-size: 15px; line-height: 1.5; max-width: 32em; }

.seq-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px var(--m) 0;
}
.seq-count {
  margin-right: auto;
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.seq-nav button {
  appearance: none;
  border: 1px solid #BFC6BE;
  background: transparent;
  color: var(--ink);
  font: 500 15px/1 var(--sans);
  min-height: 44px;
  padding: 0 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
.seq-nav button:hover:not(:disabled) { background: rgba(255,255,255,.6); }
.seq-nav button:disabled { opacity: .4; cursor: default; }

/* ---------- Rooms ---------- */

.rooms { padding: 88px 0 72px; }
.rooms h2 {
  padding: 0 var(--m);
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.022em;
}

.room { margin-top: 40px; }
.room img { width: 100%; object-fit: cover; }
.room figcaption { padding: 16px var(--m) 0; }
.room blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.38;
  letter-spacing: -0.005em;
  max-width: 19em;
}
.room blockquote.client p { font-style: normal; }
.room figcaption span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 30em;
}

.room-a { margin-top: 32px; }
.room-a img { aspect-ratio: 4 / 5; object-position: 38% 50%; }

.room-b { margin-top: 64px; margin-left: calc(var(--m) + var(--col) + 16px); }
.room-b img { aspect-ratio: 3 / 4; object-position: 66% 50%; }
.room-b figcaption { padding-left: 0; }

.room-c { margin-top: 64px; margin-right: calc(var(--col) * .5 + var(--m)); }
.room-c img { aspect-ratio: 5 / 4; object-position: 30% 50%; }

.room-d { margin-top: 64px; margin-left: calc(var(--m) + var(--col) * 1.5); margin-right: var(--m); }
.room-d img { aspect-ratio: 4 / 5; object-position: 30% 50%; }
.room-d figcaption { padding-left: 0; padding-right: 0; }

.rooms-more { margin: 40px var(--m) 0; }

/* ---------- Testimonials ---------- */

.said {
  padding: 72px var(--m) 80px;
  border-top: 1px solid var(--line);
  margin: 0 var(--m);
  padding-left: 0;
  padding-right: 0;
}
.said-main p {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -0.012em;
  max-width: 17em;
}
.said footer { margin-top: 14px; font-size: 14px; color: var(--ink-2); }

.said-more { margin-top: 48px; display: grid; gap: 32px; }
.said-more p { font-family: var(--serif); font-size: 16px; line-height: 1.6; max-width: 34em; }

/* ---------- Rebecca ---------- */

.me { padding: 0 0 88px; }
.me-photo {
  width: calc(100% - var(--col) - var(--m));
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #D9D9DB;
}
.me-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }

.me-copy { padding: 32px var(--m) 0; }
.me h2 { font-size: 30px; line-height: 1.08; letter-spacing: -0.022em; }
.me-voice {
  margin-top: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.38;
  max-width: 19em;
}
.me-copy > p:not(.me-voice):not(.me-photo-note) { margin-top: 18px; font-size: 16px; max-width: 34em; }

.creds { margin-top: 28px; border-top: 1px solid var(--line); }
.creds div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.45;
}
.creds dt { font-weight: 600; }
.creds dd { color: var(--ink); }

.sig { margin-top: 28px; width: 120px; height: auto; }

.me-photo-note { margin-top: 20px; font-size: 15px; color: var(--ink-2); }
.me-photo-note .text-link { display: inline; min-height: 0; }

/* ---------- Steps ---------- */

.steps {
  padding: 0 var(--m) 80px;
  background: var(--plaster);
}
.steps::before {
  content: "";
  display: block;
  border-top: 1px solid #C9CFC7;
  margin-bottom: 48px;
}
.steps h2 { font-size: 30px; line-height: 1.08; letter-spacing: -0.022em; max-width: 11em; }
.steps ol { list-style: none; padding: 0; margin-top: 28px; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 12px;
  padding: 20px 0 22px;
  border-top: 1px solid #C9CFC7;
}
.steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  display: block;
  height: 34px;
  overflow: hidden;
  font-size: 34px;
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--teal);
  letter-spacing: -0.03em;
}
.steps h3 { font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.steps li p { margin-top: 6px; font-size: 15px; line-height: 1.5; max-width: 32em; }
.steps .text-link { margin-top: 12px; }

/* ---------- Contact ---------- */

.call { padding: 88px var(--m) 72px; }
.call h2 {
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: 11em;
}
.call > p:first-of-type { margin-top: 16px; font-size: 16px; color: var(--ink-2); max-width: 30em; }
.call-number {
  display: block;
  margin-top: 40px;
  font-size: clamp(52px, 15.4vw, 176px);
  line-height: .95;
  font-weight: 500;
  letter-spacing: -0.045em;
  color: var(--teal);
  text-decoration: none;
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.call-number:hover { color: var(--teal-press); }
.call-sub { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.call-mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 20px;
  font-size: 18px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  word-break: break-all;
}
.call-area { margin-top: 28px; font-size: 14px; color: var(--ink-2); }

/* ---------- Footer ---------- */

.foot {
  margin: 0 var(--m);
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}
.foot ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot li a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot p { margin-top: 8px; }

/* ---------- Dock (mobile) ---------- */

.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--m) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  border-top: 1px solid var(--line);
  transform: translateY(105%);
  transition: transform .25s ease;
}
.dock.is-on { transform: none; }
.dock p { font-size: 15px; font-weight: 500; }

/* ---------- Wider screens ---------- */

@media (min-width: 700px) {
  :root { --m: 40px; --col: calc((100vw - 2 * var(--m) - 11 * 24px) / 12); }

  .open h1 { font-size: 56px; }
  .open-photo { height: 520px; margin-left: calc(var(--m) + (var(--col) + 24px) * 3); }
  .open-sketch { width: 54%; margin-top: -180px; }

  .seq-item { flex-basis: 520px; }

  .room-a img { aspect-ratio: 3 / 2; }
  .said-more { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (min-width: 1000px) {
  body { padding-bottom: 0; font-size: 18px; }
  .dock { display: none; }

  .top { height: 88px; }
  .top-phone {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
  }
  .top-phone:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
  .menu-btn { margin-left: 12px; }
  .menu { padding-top: 140px; }
  .menu ul { max-width: 760px; }
  .menu li a { font-size: 48px; }

  /* Opening: copy in cols 1-5, art in 6-12 bleeding off the right edge */
  .open {
    display: grid;
    grid-template-columns: calc(var(--m) + (var(--col) + 24px) * 5) 1fr;
    align-items: start;
    padding-top: 48px;
  }
  .open-copy { padding: 24px 0 0 var(--m); }
  .open h1 { font-size: clamp(56px, 4.9vw, 76px); max-width: 9.6em; }
  .open-lede { font-size: 19px; max-width: 24em; margin-top: 24px; }
  .open-act { margin-top: 32px; }
  .open-art { margin-top: 0; }
  .open-photo { margin-left: 0; height: min(64vw, 640px); height: 620px; }
  .open-sketch {
    width: 50%;
    margin: -200px 0 0 calc(-1 * (var(--col) + 24px));
    padding: 8px;
  }
  .open-art figcaption { padding: 14px 0 0; margin-left: calc(50% - var(--col) - 24px + 24px); max-width: 22em; margin-top: -64px; }

  .scope { padding: 140px var(--m) 140px calc(var(--m) + (var(--col) + 24px) * 2); }
  .scope p { font-size: 34px; line-height: 1.24; letter-spacing: -0.018em; max-width: 21em; text-indent: calc((var(--col) + 24px) * 2); }

  .seq { padding: 96px 0 80px; }
  .seq-head { display: grid; grid-template-columns: calc((var(--col) + 24px) * 5) 1fr; max-width: none; align-items: end; padding-right: var(--m); }
  .seq h2 { font-size: 44px; }
  .seq-head p { margin: 0; font-size: 16px; }
  .seq-track { margin-top: 48px; gap: 24px; }
  .seq-item { flex-basis: min(46vw, 640px); }
  .seq-note { font-size: 16px; }
  .seq-nav { padding-top: 28px; }

  .rooms {
    display: grid;
    grid-template-columns: var(--m) repeat(12, 1fr) var(--m);
    column-gap: 24px;
    padding: 140px 0 120px;
    column-gap: 0;
  }
  .rooms { grid-template-columns: var(--m) repeat(12, minmax(0, 1fr)) var(--m); column-gap: 0; }
  .rooms > * { margin: 0; }
  .rooms h2 { grid-column: 2 / 8; padding: 0; font-size: 44px; }
  .room figcaption { padding: 18px 0 0; }
  .room blockquote p { font-size: 24px; }

  .room-a { grid-column: 1 / 9; grid-row: 2 / span 2; margin-top: 48px; }
  .room-a img { aspect-ratio: 4 / 3; }
  .room-a figcaption { padding-left: var(--m); }

  .room-b { grid-column: 10 / 14; grid-row: 2; margin-top: 200px; padding-left: 0; }
  .room-c { grid-column: 3 / 8; grid-row: 4; margin-top: 96px; }
  .room-d { grid-column: 9 / 13; grid-row: 4; margin-top: 200px; }
  .room-b, .room-c, .room-d { margin-left: 0; margin-right: 0; }
  .room-b img { aspect-ratio: 3 / 4; }
  .room-c img { aspect-ratio: 4 / 3; }
  .room-c figcaption, .room-d figcaption { padding-left: 0; }
  .rooms-more { grid-column: 3 / 10; grid-row: 5; margin-top: 64px; }

  .said {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    padding: 120px 0 128px;
  }
  .said-main { grid-column: 2 / 11; }
  .said-main p { font-size: 48px; line-height: 1.14; letter-spacing: -0.02em; }
  .said-more { grid-column: 5 / 13; margin-top: 72px; }

  .me {
    display: grid;
    grid-template-columns: var(--m) repeat(12, minmax(0, 1fr)) var(--m);
    column-gap: 0;
    padding-bottom: 140px;
    align-items: start;
  }
  .me-photo { grid-column: 1 / 7; width: auto; }
  .me-copy { grid-column: 8 / 14; padding: 64px var(--m) 0 0; }
  .me h2 { font-size: 44px; }
  .me-voice { font-size: 26px; }
  .creds div { grid-template-columns: 120px 1fr; font-size: 16px; }

  .steps {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    padding: 0 var(--m) 112px;
  }
  .steps::before { grid-column: 1 / -1; margin-bottom: 80px; }
  .steps h2 { grid-column: 1 / 7; font-size: 44px; }
  .steps ol { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
  .steps li { grid-template-columns: 1fr; align-content: start; padding-top: 22px; }
  .steps li::before { grid-row: auto; font-size: 56px; height: 56px; margin-bottom: 24px; }
  .steps h3 { font-size: 22px; }
  .steps li p { font-size: 16px; margin-top: 8px; }
  .steps .text-link { grid-column: 1 / -1; margin-top: 24px; justify-self: start; }

  .call { padding: 140px var(--m) 96px; }
  .call h2 { font-size: 44px; max-width: 12em; }
  .call > p:first-of-type { font-size: 18px; }
  .call-number { margin-top: 56px; }
  .call-mail { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}
