/* Black Rock Development — site styles
   Colours are tokens named by role; components never use raw hex values.
   Layout follows the original Squarespace grid: 8 columns on phones, 24 on larger
   screens. Each block sets its grid position with --m (phone) and --d (desktop). */

:root {
  /* Grounds */
  --bg: #EEEDEB;          /* light stone: hero, footer */
  --surface: #FFFFFF;     /* white sections */
  --blush: #E1CCBE;       /* brand secondary: header, "bright" sections */
  --olive: #757263;       /* case-study cards, dark project band */
  --night: #000000;       /* dark sections */

  /* Text */
  --ink: #000000;
  --ink-soft: #3D3B36;
  --on-dark: #FFFFFF;
  --on-olive: #FFFFFF;    /* 4.9:1 on --olive */

  /* Actions */
  --focus: #1C4FD8;
  --error: #8A1C1C;

  --line: rgba(0, 0, 0, .55);
  --radius-pill: 300px;

  --font-display: "Libre Caslon Display", "Freight Display Pro", Georgia, serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 5vw;
  --grid-gap: 11px;
}

@media (max-width: 767px) {
  :root { --gutter: 6vw; }
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: calc(.135 * 1.2vmax + 1rem);
  line-height: 1.32;
  letter-spacing: .01em;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: .012em;
  margin: 17px 0 34px;
}
h1 { font-size: calc(6.065 * 1.2vmax + 1rem); line-height: .836; }
h2 { font-size: calc(4.565 * 1.2vmax + 1rem); line-height: .902; }
h3 { font-size: calc(2.565 * 1.2vmax + 1rem); line-height: .99; }
h4 { font-size: calc(.865 * 1.2vmax + 1rem); line-height: 1.065; }

p { margin: 17px 0; }
p.small, .small { font-size: .85rem; }
p.lead, .lead { font-size: 1.25rem; }
ul { margin: 1em 0; padding-left: 40px; }
li { margin: .5em 0; }

a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Section grounds ---------- */

.theme-light  { background: var(--bg); }
.theme-white  { background: var(--surface); }
.theme-bright { background: var(--blush); }
.theme-olive  { background: var(--olive); color: var(--on-olive); }
.theme-dark   { background: var(--night); color: var(--on-dark); }

.sec {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pt, 0) 0 var(--pb, 0); min-height: var(--mh, 0);
}
.sec.divided { border-bottom: 1px solid var(--line); }
.sec-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sec-ov { position: absolute; inset: 0; }

/* ---------- Grid ---------- */

.fe {
  --grid-gutter: calc(var(--gutter) - var(--cg, var(--grid-gap)));
  --cell: calc((2000px - var(--cg, var(--grid-gap)) * 7) / 8);
  position: relative;
  display: grid;
  gap: var(--rg, var(--grid-gap)) var(--cg, var(--grid-gap));
  grid-template-rows: repeat(var(--rm), minmax(24px, auto));
  grid-template-columns:
    minmax(var(--grid-gutter), 1fr)
    repeat(8, minmax(0, var(--cell)))
    minmax(var(--grid-gutter), 1fr);
}

.b {
  position: relative;
  grid-area: var(--m);
  z-index: var(--z, auto);
  display: flex;
  flex-direction: column;
  justify-content: var(--jm, flex-start);
  min-width: 0;
}

@media (min-width: 768px) {
  .fe {
    --cell: calc((2000px - var(--cg, var(--grid-gap)) * 23) / 24);
    --container: min(2000px, calc(100vw - var(--gutter) * 2));
    grid-template-rows: repeat(var(--rd), minmax(calc(var(--container) * var(--rf, .0215)), auto));
    grid-template-columns:
      minmax(var(--grid-gutter), 1fr)
      repeat(24, minmax(0, var(--cell)))
      minmax(var(--grid-gutter), 1fr);
  }
  .b { grid-area: var(--d); justify-content: var(--jd, flex-start); }
}

/* Flex children keep both margins, so set one-sided gaps to match the original spacing */
.b--text > p { margin: 0 0 17px; }
.b--text > h1, .b--text > h2, .b--text > h3, .b--text > h4 { margin: 0 0 34px; }
.b--text > ul { margin: 1px 0 18px; }
.b--text > :last-child { margin-bottom: 0; }

.card {
  background: var(--olive);
  color: var(--on-olive);
  border-radius: 45px;
  padding: var(--cardpad, 44px);
}

.b--img img, .b--img a {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%;
  border-radius: var(--r, 0);
  overflow: hidden;
}
.b--img img { object-fit: cover; }

.b--btn { align-items: var(--ad, flex-start); }

.b--hr hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 0; }
.b--map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 39px; padding: 0 1.6em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--blush); color: var(--ink);
  font: 400 .85rem/1 var(--font-body); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--surface); }
.btn--fill { width: 100%; flex: 1 1 auto; }
.btn--fill-w { min-width: 165px; min-height: 42px; }
.btn--white { background: var(--surface); }
.btn--solid { background: var(--ink); color: var(--surface); border-color: var(--surface); }
.btn--solid:hover { background: var(--olive); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Header ---------- */

.site-header {
  position: relative; z-index: 50;
  background: var(--blush);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 85px; gap: 24px; padding: 0 var(--gutter);
}
.site-title {
  font-family: var(--font-display);
  font-size: calc(.565 * 1.2vmax + 1rem); line-height: 1.1; letter-spacing: 0;
  text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { font-size: .85rem; text-decoration: none; }
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { text-decoration: underline; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 26px; height: 2px; background: currentColor; margin: 6px 0; }

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 20px;
    padding: 24px var(--gutter) 32px; background: var(--blush);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { font-size: 1.5rem; font-family: var(--font-display); }
}

/* ---------- Values strip ---------- */

.values { padding: 4.9vmax var(--gutter); }
.values__row { display: grid; gap: 32px; grid-template-columns: repeat(3, 1fr); text-align: center; }
.values img { width: 72px; height: auto; margin: 0 auto 16px; }
.values h4 { margin: 0 0 .2em; }
.values p { font-size: .95rem; margin: 0 auto; max-width: 30ch; }
@media (max-width: 767px) { .values__row { grid-template-columns: 1fr; } }

/* ---------- Accordion ---------- */

.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0; font: 400 calc(.865 * 1.2vmax + 1rem)/1.2 var(--font-display); letter-spacing: 0;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font: 300 1.6rem/1 var(--font-body); }
.accordion details[open] summary::after { content: "–"; }
.accordion .answer { padding: 0 0 20px; font-size: .95rem; }
.accordion .answer > :first-child { margin-top: 0; }
.accordion .answer > :last-child { margin-bottom: 0; }

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

.field { display: block; margin-bottom: 14px; }
.field label { display: block; font-size: .9rem; margin-bottom: 6px; }
.field label small { font-size: .7rem; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; padding: 10px 18px; font: inherit; font-size: 1rem;
  border: 1px solid var(--ink); border-radius: 26px; background: var(--surface); color: var(--ink);
}
.field textarea { min-height: 100px; resize: vertical; }
.form-note { font-size: .85rem; margin: 12px 0 0; }

/* Section whose coloured panel sits inset from the page edge (contact form) */
.sec.inset { background: var(--surface); padding: var(--gutter); }
.sec.inset .fe { padding-block: var(--pt, 0) var(--pb, 0); --container: calc(100vw - var(--gutter) * 4); }

/* The original header overlays the first section; here it sits above it, so take its height off */
.site-header + main > .sec:first-child { min-height: calc(var(--mh, 85px) - 85px); }

@media (max-width: 767px) {
  body { font-size: 1.043rem; }
}

/* Long single words stay whole; the original split "Relaxation" across two lines */
.b--text h3 { overflow-wrap: normal; white-space: normal; }

/* Roland: white title over the hero photo, and smaller headings than the rest of the site */
.page-roland main > .sec:first-child h1 { color: var(--on-dark); text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.page-roland h1 { font-size: clamp(3rem, 6.5vw, 5.7rem); }
.page-roland h2 { font-size: clamp(2.75rem, 5.2vw, 4.5rem); }
.page-roland h3 { font-size: clamp(2rem, 3.4vw, 3rem); }

/* ---------- Tutukaka holiday home ---------- */

.tk-hero { position: relative; display: grid; place-items: start end; min-height: 80vh; padding: clamp(32px, 5vh, 56px) var(--gutter); overflow: hidden; background: var(--night); }
.tk-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.tk-hero__text { position: relative; max-width: 620px; text-align: right; color: var(--on-dark); text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.tk-hero__text h1 { margin: 0 0 12px; font-size: clamp(2.75rem, 6.5vw, 5.7rem); line-height: 1; }
.tk-hero__text p { margin: 0 0 24px; }
.tk-hero__text .btn { text-shadow: none; }

.tk-sec { padding: clamp(48px, 7vw, 96px) var(--gutter); }
.tk-wrap { max-width: 1280px; margin: 0 auto; }
.tk-sec h2 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); line-height: 1; margin: 0 0 24px; }
.tk-sec h3 { font-size: clamp(2rem, 3.4vw, 3rem); margin: 0 0 16px; }
.tk-sec h4 { margin: 0 0 12px; }
.tk-sec p { max-width: 68ch; }

.tk-intro { display: grid; gap: 32px 64px; grid-template-columns: 1fr 1fr; }
.tk-intro > div > :first-child { margin-top: 0; }

.tk-stats { display: grid; gap: 16px; grid-template-columns: repeat(5, 1fr); margin-top: 48px; border-top: 1px solid var(--line); padding-top: 24px; }
.tk-stats dt { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1; }
.tk-stats dd { margin: 4px 0 0; font-size: .9rem; }

.tk-grid { display: grid; gap: clamp(8px, 1vw, 14px); grid-template-columns: repeat(12, 1fr); margin-top: 24px; }
.tk-grid figure { margin: 0; aspect-ratio: 3 / 2; grid-column: span 12; }
.tk-grid img, .tk-cards img { width: 100%; height: 100%; object-fit: cover; }
.tk-grid .w-4 { grid-column: span 4; }
.tk-grid .w-6 { grid-column: span 6; }
.tk-grid .w-8 { grid-column: span 8; }
.tk-grid .w-12 { grid-column: span 12; }
.tk-grid .tall { aspect-ratio: auto; height: clamp(320px, 42vw, 620px); }
.tk-grid .wide { aspect-ratio: 21 / 9; }

.tk-cards { display: grid; gap: 24px clamp(12px, 1.6vw, 24px); grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.tk-cards figure { margin: 0; }
.tk-cards img { aspect-ratio: 3 / 2; height: auto; }
.tk-cards figcaption { padding-top: 8px; font-size: .95rem; }
.tk-cards strong { display: block; font-weight: 500; }

.tk-lists { display: grid; gap: 32px clamp(24px, 4vw, 56px); grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.tk-lists ul, .tk-intro ul { margin: 0; padding-left: 1.2em; font-size: .95rem; }

.tk-book { text-align: center; }
.tk-book p { margin: 0 auto 24px; }
.tk-book__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tk-book .btn { min-height: 48px; min-width: 220px; }

@media (max-width: 767px) {
  .tk-intro { grid-template-columns: 1fr; }
  .tk-stats { grid-template-columns: repeat(2, 1fr); }
  .tk-grid figure, .tk-grid .w-4, .tk-grid .w-6, .tk-grid .w-8, .tk-grid .w-12 { grid-column: 1 / -1; }
  .tk-grid .tall, .tk-grid .wide { aspect-ratio: 3 / 2; height: auto; }
  .tk-cards { grid-template-columns: 1fr 1fr; }
  .tk-lists { grid-template-columns: 1fr; }
}

.tk-events { display: grid; gap: 24px clamp(32px, 5vw, 64px); grid-template-columns: 1fr 1fr; margin-top: 24px; }
.tk-events p { margin: 0; }
.tk-events__cta { margin: 32px 0 0; }
@media (max-width: 767px) { .tk-events { grid-template-columns: 1fr; } }

/* Tutukaka availability calendar */
.tk-cal { margin-top: 24px; }
.tk-cal__nav { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tk-cal__months { display: grid; gap: 32px clamp(32px, 5vw, 72px); grid-template-columns: 1fr 1fr; }
.tk-month h4 { margin: 0 0 12px; }
.tk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tk-dow { font-size: .75rem; text-align: center; padding-bottom: 4px; }
.tk-day, .tk-key {
  display: flex; align-items: center; justify-content: center;
  height: 42px; font-size: .9rem; background: var(--bg);
}
.tk-day.is-past { background: none; color: var(--ink-soft); opacity: .55; }
.tk-day.is-booked, .tk-key--booked { background: var(--blush); color: var(--ink-soft); text-decoration: line-through; }
.tk-cal__key { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; font-size: .9rem; }
.tk-key { display: inline-flex; width: 32px; height: 32px; font-size: .8rem; }
.tk-key--booked { margin-left: 16px; }
@media (max-width: 767px) { .tk-cal__months { grid-template-columns: 1fr; } }

/* Tutukaka footer */
.tk-footer { padding: clamp(40px, 5vw, 64px) var(--gutter); }
.tk-footer__row { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr; align-items: center; }
.tk-footer h3 { font-size: clamp(2rem, 3.4vw, 3rem); margin: 0 0 8px; }
.tk-footer p { margin: 0 0 8px; }
.tk-footer img { width: 100%; max-width: 220px; justify-self: end; }
@media (max-width: 767px) {
  .tk-footer__row { grid-template-columns: 1fr; }
  .tk-footer img { justify-self: start; }
}

/* Tutukaka photo viewer */
:root { --scrim: rgba(0, 0, 0, .94); --lb-btn: rgba(255, 255, 255, .16); }
.lb-open { overflow: hidden; }
.tk-hero > img, .tk-grid img, .tk-cards img { cursor: zoom-in; }
.tk-hero > img:focus-visible, .tk-grid img:focus-visible, .tk-cards img:focus-visible { outline-offset: -3px; }
.tk-lb {
  position: fixed; inset: 0; width: 100vw; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--scrim); color: var(--on-dark); overflow: hidden;
}
.tk-lb::backdrop { background: var(--scrim); }
.tk-lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.tk-lb__img { width: 100%; height: 100%; min-height: 0; object-fit: contain; padding: 16px 80px 0; }
.tk-lb__cap { margin: 0; padding: 12px 80px 16px; text-align: center; font-size: .9rem; }
.tk-lb__btn {
  position: absolute; width: 48px; height: 48px; padding: 0 0 4px;
  display: flex; align-items: center; justify-content: center;
  font: 300 2rem/1 var(--font-body); color: var(--on-dark); cursor: pointer;
  background: var(--lb-btn); border: 1px solid var(--on-dark); border-radius: 50%;
  transition: background-color .2s, color .2s;
}
.tk-lb__btn:hover { background: var(--on-dark); color: var(--night); }
.tk-lb__btn:focus-visible { outline-color: var(--on-dark); }
.tk-lb__close { top: 16px; right: 16px; }
.tk-lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.tk-lb__next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 767px) {
  .tk-lb__img { padding: 64px 0 0; }
  .tk-lb__cap { padding: 16px 72px 20px; min-height: 84px; }
  .tk-lb__prev, .tk-lb__next { top: auto; bottom: 16px; transform: none; }
  .tk-lb__close { top: 8px; right: 8px; }
}
