/*
  Nest Property Group, temporary site.
  Colour, type and pairings follow the NEST Brand Guidelines (Revision A).
  Decisions and their reasons are listed in README.md.
*/

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette. Roles as defined in the guidelines, page 12. */
  --oxblood: #3a1718;
  --oxblood-field: #320909;
  --cocoa: #31251c;
  --umber: #5a3a2c;
  --gold: #a87f45;
  --bone: #f0e5d8;
  --parchment: #eadecc;
  --travertine: #d8c8b2;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1320px;
  --section: clamp(88px, 12vw, 176px);

  /* The brand is set for light grounds and oxblood. It does not have a dark mode. */
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--parchment);
  color: var(--cocoa);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 27px;
  font-weight: 400;
  font-variant-numeric: proportional-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--oxblood);
  color: var(--bone);
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--oxblood);
  color: var(--bone);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus-visible {
  transform: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type levels (guidelines, pages 14 and 15) ---------- */

.statement,
.display,
.project-name {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

/* Brand statement. Never below 40px. */
.statement {
  font-size: clamp(40px, 5.4vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.012em;
}

/* Hero heading, used for page titles. */
.display {
  font-size: clamp(44px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.008em;
}

.project-name {
  font-size: clamp(40px, 3.2vw, 46px);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.label {
  margin: 0;
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--umber);
}

.address {
  margin: 0;
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--umber);
}

.intro {
  margin: 0;
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.6;
  max-width: 34em;
}

.subheading {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.body {
  margin: 0;
  max-width: 36em;
}
.body + .body {
  margin-top: 1em;
}

.caption,
.legal {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.01em;
}

/* Honest placeholders: visible, and clearly not final. */
.tbc {
  color: var(--umber);
  background: rgb(90 58 44 / 0.08);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.2em;
}
.on-dark .tbc {
  color: var(--bone);
  background: rgb(240 229 216 / 0.1);
}

/* ---------- Text links ---------- */

.text-link {
  position: relative;
  display: inline-block;
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding-bottom: 6px;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .text-link:hover::after {
    transform: scaleX(0.4);
  }
}

/* ---------- Navigation ---------- */

.site-nav {
  position: relative;
  z-index: 2;
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.site-nav__home {
  display: block;
  padding: 8px 0;
}
.site-nav__home img {
  height: 20px;
  width: auto;
}
.site-nav ul {
  display: flex;
  gap: clamp(20px, 3.4vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a:not(.site-nav__home) {
  position: relative;
  display: block;
  padding: 10px 0;
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--cocoa);
}
.site-nav a:not(.site-nav__home)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
}
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
@media (hover: hover) and (pointer: fine) {
  .site-nav a:not(.site-nav__home):hover::after {
    transform: scaleX(1);
  }
}

/* On the home page the nav sits over the travertine plate. */
.site-nav--over {
  position: absolute;
  inset: 0 0 auto 0;
}

/* ---------- Hero: the travertine plate ---------- */

.plate {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--travertine);
  overflow: hidden;
}
.plate__stone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plate__mark {
  position: relative;
  margin: 0;
  /* Clear space: at least the cap height of the N on every side. */
  width: clamp(240px, 38vw, 560px);
  padding: 8vh 0;
}
.plate__mark img {
  width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .plate__stone {
    animation: plate-in 1200ms var(--ease-out) both;
  }
  .plate__mark img {
    animation: mark-in 1100ms var(--ease-out) 250ms both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .plate__mark img {
    animation: fade-in 400ms ease both;
  }
}
@keyframes plate-in {
  from {
    opacity: 0;
    transform: scale(1.015);
  }
}
@keyframes mark-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ---------- Home: introduction ---------- */

.intro-block {
  padding: var(--section) 0 clamp(64px, 8vw, 120px);
}
.intro-block .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}
.intro-block .statement {
  grid-column: 1 / span 10;
  max-width: 15em;
  color: var(--oxblood);
}
.intro-block .intro {
  grid-column: 5 / span 7;
  margin-top: clamp(32px, 4vw, 56px);
}

/* ---------- Scope schedule ---------- */

.schedule {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums lining-nums;
}
.schedule caption {
  text-align: left;
  padding-bottom: 20px;
}
.schedule th,
.schedule td {
  text-align: left;
  font-weight: 400;
  padding: 18px 0;
  vertical-align: baseline;
}
.schedule thead th {
  padding-top: 0;
  padding-bottom: 14px;
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--umber);
  border-bottom: 1px solid rgb(49 37 28 / 0.28);
}
.schedule tbody th,
.schedule tbody td {
  border-top: 1px solid rgb(49 37 28 / 0.12);
}
.schedule tbody tr:first-child th,
.schedule tbody tr:first-child td {
  border-top-color: rgb(49 37 28 / 0.28);
}
.schedule tbody th {
  width: 34%;
  font-size: clamp(17px, 1.4vw, 20px);
  padding-right: 24px;
}
.schedule tbody td {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--oxblood);
}

.scope {
  padding-bottom: var(--section);
}
.scope .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}
.scope__table {
  grid-column: 5 / span 8;
}

/* ---------- Where ---------- */

.where {
  padding: var(--section) 0;
  border-top: 1px solid rgb(49 37 28 / 0.14);
}
.where .statement {
  margin-top: 28px;
  max-width: 17em;
  color: var(--oxblood);
}

/* ---------- Projects ---------- */

.projects-preview {
  padding: var(--section) 0;
  border-top: 1px solid rgb(49 37 28 / 0.14);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head .display {
  color: var(--oxblood);
}

.project {
  margin: 0;
}
.project__image {
  position: relative;
  background: var(--umber);
  overflow: hidden;
}
.project__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project figcaption {
  padding-top: 22px;
}
.project .address {
  margin-bottom: 14px;
}
.project .project-name {
  color: var(--oxblood);
}

/* Each frame keeps its photograph's own proportions. */
.project--lumiere .project__image { aspect-ratio: 862 / 648; }
.project--riva .project__image { aspect-ratio: 968 / 648; }
.project--valere .project__image { aspect-ratio: 3 / 2; }
.project--arden .project__image { aspect-ratio: 2 / 3; }

/* Lumiere (landscape) beside Arden (portrait): at 8 and 4 columns the two
   frames come out almost exactly the same height. Riva and Valere pair below.
   Source order stays 1 to 4, which is the order on phones. */
.project-set {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: clamp(56px, 7vw, 104px);
}
.project--lumiere { grid-column: 1 / span 8; grid-row: 1; }
.project--arden { grid-column: 9 / span 4; grid-row: 1; }

/* Arden's frame takes Lumiere's height exactly so the captions share a line. */
.project--arden {
  display: flex;
  flex-direction: column;
}
.project--arden .project__image {
  aspect-ratio: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.project--arden .project__image img {
  position: absolute;
  inset: 0;
}
.project--riva { grid-column: 1 / span 6; grid-row: 2; }
.project--valere { grid-column: 7 / span 6; grid-row: 2; }

#projects {
  scroll-margin-top: 24px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Photographs fade in once decoded, so they never paint in strips. */
.js .fade-img {
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}
.js .fade-img.is-ready {
  opacity: 1;
}

/* ---------- Page heads (inner pages) ---------- */

.page-head {
  padding: clamp(64px, 10vw, 144px) 0 clamp(56px, 7vw, 104px);
}
.page-head .display {
  color: var(--oxblood);
}
.page-head .intro {
  margin-top: 28px;
}

/* ---------- Approach ---------- */

.stages {
  padding-bottom: var(--section);
}
.stage {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding: 36px 0 40px;
  border-top: 1px solid rgb(49 37 28 / 0.18);
}
.stage .subheading {
  grid-column: 1 / span 4;
  color: var(--oxblood);
}
.stage__body {
  grid-column: 5 / span 7;
}

/* ---------- Oxblood field: enquiry and footer ---------- */

.field {
  position: relative;
  background-color: var(--oxblood-field);
  background-image: url("../img/microcement-oxblood-1794.jpg");
  background-size: cover;
  background-position: center;
  color: var(--bone);
}
@media (min-width: 1100px) {
  .field {
    background-image: url("../img/microcement-oxblood-3588.jpg");
  }
}
.field .label,
.field .address {
  color: var(--gold);
}
.field .display,
.field .statement {
  color: var(--bone);
}
.field .muted {
  color: rgb(240 229 216 / 0.78);
}

.enquire {
  padding: var(--section) 0 clamp(80px, 10vw, 140px);
}
.enquire .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 56px;
}
.enquire__text {
  grid-column: 1 / span 5;
}
.enquire__text .intro {
  margin-top: 24px;
}
.enquire__form {
  grid-column: 7 / span 6;
}

.direct {
  margin: 40px 0 0;
  display: grid;
  gap: 20px;
}
.direct dt {
  margin-bottom: 6px;
}
.direct dd {
  margin: 0;
}
.direct a {
  text-decoration: none;
  border-bottom: 1px solid rgb(240 229 216 / 0.4);
  transition: border-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .direct a:hover {
    border-color: var(--bone);
  }
}

/* ---------- Form ---------- */

.form {
  display: grid;
  gap: 30px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 24px;
}
.form__field {
  display: grid;
  gap: 8px;
}
.form__field label,
.form__field legend {
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0;
}
.form__field .optional {
  letter-spacing: 0.08em;
  text-transform: none;
  font-weight: 400;
  color: rgb(240 229 216 / 0.7);
}
.form input,
.form select,
.form textarea {
  width: 100%;
  margin: 0;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid rgb(240 229 216 / 0.45);
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  font: inherit;
  /* 16px stops iOS zooming into the field. */
  font-size: 16px;
  line-height: 24px;
  transition: border-color 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.form textarea {
  resize: vertical;
  min-height: 132px;
}
.form select {
  cursor: pointer;
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--bone) 50%),
    linear-gradient(-45deg, transparent 50%, var(--bone) 50%);
  background-position: calc(100% - 10px) 50%, calc(100% - 5px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.form select option {
  color: var(--cocoa);
  background: var(--bone);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-bottom-color: var(--bone);
}
.form input:focus-visible,
.form select:focus-visible,
.form textarea:focus-visible {
  box-shadow: 0 1px 0 0 var(--bone);
}
.form [aria-invalid="true"] {
  border-bottom-color: #e8a79c;
}
.form__error {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: #f2bdb3;
}
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.form__note {
  max-width: 26em;
  color: rgb(240 229 216 / 0.78);
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--bone);
  border-radius: 0;
  background: var(--bone);
  color: var(--oxblood);
  font: inherit;
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: transparent;
    color: var(--bone);
  }
}
.button:active {
  transform: scale(0.97);
}
.button[disabled] {
  cursor: progress;
  opacity: 0.7;
}
.button[disabled]:active {
  transform: none;
}

.form-status {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
}
.form-status:empty {
  display: none;
}
.form-status--error {
  color: #f2bdb3;
}

.sent {
  padding: 8px 0;
}
.sent .display {
  font-size: clamp(40px, 4vw, 48px);
}
.sent p {
  margin: 16px 0 0;
  max-width: 28em;
}
@media (prefers-reduced-motion: no-preference) {
  .sent {
    animation: mark-in 500ms var(--ease-out) both;
  }
}

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

.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid rgb(240 229 216 / 0.16);
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 40px;
}
.site-footer__mark {
  grid-column: 1 / span 3;
}
.site-footer__mark img {
  width: 44px;
  height: auto;
}
.site-footer__details {
  grid-column: 4 / span 5;
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  font-size: 13px;
  line-height: 20px;
  font-variant-numeric: tabular-nums lining-nums;
}
.site-footer__details dt {
  color: rgb(240 229 216 / 0.7);
}
.site-footer__details dd {
  margin: 0;
}
.site-footer__details a {
  text-decoration: none;
  border-bottom: 1px solid rgb(240 229 216 / 0.35);
}
.site-footer nav {
  grid-column: 10 / span 3;
}
.site-footer nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  justify-items: start;
}
.site-footer nav a {
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .site-footer nav a:hover {
    border-color: currentColor;
  }
}
.site-footer__legal {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgb(240 229 216 / 0.12);
  color: rgb(240 229 216 / 0.7);
}

/* ---------- Not found ---------- */

.not-found {
  min-height: 60vh;
  display: grid;
  align-content: center;
  padding: var(--section) 0;
}
.not-found .intro {
  margin: 24px 0 32px;
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .intro-block .statement,
  .intro-block .intro {
    grid-column: 1 / -1;
  }
  .scope__table,
  .enquire__text,
  .enquire__form {
    grid-column: 1 / -1;
  }
  .project-set > .project {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .project--arden .project__image {
    aspect-ratio: 2 / 3;
  }
  .project-set {
    row-gap: 64px;
  }
  .stage .subheading,
  .stage__body {
    grid-column: 1 / -1;
  }
  .stage__body {
    margin-top: 12px;
  }
  .site-footer__mark,
  .site-footer__details,
  .site-footer nav {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .form__row {
    grid-template-columns: 1fr;
  }
  /* Phones: each stage sits above its line. */
  .schedule thead {
    display: none;
  }
  .schedule tbody th,
  .schedule tbody td {
    display: block;
    width: auto;
    padding-right: 0;
  }
  .schedule tbody th {
    padding-bottom: 6px;
    font-size: 12px;
    line-height: 14px;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--umber);
  }
  .schedule tbody td {
    padding-top: 0;
    font-size: 18px;
    line-height: 1.45;
  }
  .schedule tbody td,
  .schedule tbody tr:first-child td {
    border-top: 0;
  }
  .plate__mark {
    width: 80vw;
  }
  .site-nav ul {
    gap: 18px;
  }
  .site-nav__home img {
    height: 17px;
  }
  .form__foot .button {
    width: 100%;
  }
}

/* ---------- Additions: utilities and page variants ---------- */

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

.site-nav--over .wrap {
  justify-content: flex-end;
}

/* Enquire page: the whole page sits on the textured oxblood field. */
.page-dark {
  min-height: 100vh;
  background-attachment: scroll;
}
.page-dark .site-nav a:not(.site-nav__home) {
  color: var(--bone);
}
.enquire--page {
  padding-top: clamp(64px, 10vw, 144px);
}

/* Slim enquiry prompt at the foot of inner pages. */
.enquire--slim {
  padding: clamp(72px, 9vw, 128px) 0;
}
.enquire__action {
  grid-column: 7 / span 6;
  align-self: end;
  justify-self: end;
}
@media (max-width: 900px) {
  .enquire__action {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
