@font-face {
  font-family: "Instrument Sans";
  src: url("assets/instrument-sans-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/instrument-sans-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --field: #f5f3ee;
  --ink: #211c1d;
  --gutter: clamp(1.25rem, 4.6vw, 5rem);
  --edge: clamp(1.25rem, 10svh - 2.25rem, 4rem);
  --reveal: 1;
  color-scheme: light;
  font-family: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--field);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

::selection {
  background: var(--ink);
  color: var(--field);
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: var(--gutter);
  padding: 12px 16px;
  background: var(--ink);
  color: var(--field);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.stage {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(1.5rem, 1fr) auto;
  min-height: 100svh;
  padding: var(--edge) var(--gutter);
  isolation: isolate;
}

.js .experience::after {
  content: "";
  display: block;
  height: 85svh;
}

.js .stage {
  position: sticky;
  top: 0;
}

.site-header {
  display: flex;
  align-items: center;
  gap: clamp(0.875rem, 1.6vw, 1.5rem);
}

.wordmark {
  width: clamp(10.5rem, 19vw, 17rem);
  height: auto;
}

.uae-mark {
  width: clamp(2rem, 3.5vw, 3.125rem);
  height: auto;
}

.artwork {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

#ribbon-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.proposition {
  display: none;
  position: absolute;
  left: var(--gutter);
  right: calc(var(--gutter) + 3.5rem);
  bottom: calc(100% - 100svh + var(--edge));
  margin: 0;
  font-size: clamp(2.25rem, 4.4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
  opacity: clamp(0, 1 - 3 * var(--reveal), 1);
}

.js .proposition {
  display: block;
}

.reading {
  grid-row: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}

.js .reading {
  row-gap: calc(var(--ribbon-depth, 0px) + 2 * clamp(1.5rem, 16svh - 4rem, 5rem));
}

.headline {
  max-width: 10ch;
  margin: 0;
  font-weight: 400;
  font-size: clamp(3.25rem, 6.8vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  opacity: clamp(0, 2.5 * var(--reveal) - 0.75, 1);
  transform: translateY(calc((1 - var(--reveal)) * var(--title-offset, 0px)));
}

.headline span {
  white-space: nowrap;
}

.details {
  opacity: clamp(0, 2.5 * var(--reveal) - 1.5, 1);
  transform: translateY(calc((1 - var(--reveal)) * 0.75rem));
}

.supporting-copy {
  max-width: 37ch;
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.625rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: clamp(1rem, 2.2svh, 1.75rem);
  color: inherit;
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

.contact:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

#enquiry {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 32rem;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 1.75rem var(--gutter) max(2rem, env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid currentColor;
  background: var(--field);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}

#enquiry::backdrop {
  background: rgb(33 28 29 / 24%);
}

.enquiry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.enquiry-heading h2 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.form-note {
  margin: 1rem 0 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#enquiry form {
  margin-top: 1.5rem;
}

#enquiry label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.875rem;
  margin-top: 0.375rem;
}

#reply-email {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.375rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.375rem;
}

#reply-email:focus {
  outline: none;
  box-shadow: inset 0 -1px currentColor;
}

.dismiss, .send {
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

.dismiss {
  padding: 0 0.375rem;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.send {
  padding: 0.65rem 1.25rem;
  background: var(--ink);
  color: var(--field);
  font-weight: 500;
}

.send:disabled {
  cursor: wait;
}

.form-error {
  line-height: 1.45;
}

.form-error a {
  color: inherit;
}

@media (min-width: 36rem) {
  #enquiry {
    inset: 0;
    margin: auto;
    padding: 2.5rem;
    max-height: calc(100dvh - 2rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  #enquiry[open] {
    animation: sheet-in 180ms ease-out;
  }

  @keyframes sheet-in {
    from { opacity: 0; transform: translateY(0.75rem); }
    to { opacity: 1; transform: none; }
  }
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: calc(100% - 100svh + var(--edge));
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  opacity: clamp(0, 1 - 3 * var(--reveal), 1);
}

.js .scroll-cue:not(:disabled) {
  display: grid;
}

.scroll-cue svg {
  width: 18px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

@media (min-width: 56.001rem) {
  .reading {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--gutter);
  }

  .details {
    padding-top: clamp(0.375rem, 0.65vw, 0.75rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .stage {
    position: relative;
  }

  .js .experience::after,
  .js .proposition,
  .js .scroll-cue:not(:disabled) {
    display: none;
  }
}
