:root {
  --ink: #050806;
  --ivory: #eee9dd;
  --ivory-muted: rgba(238, 233, 221, 0.62);
  --ivory-faint: rgba(238, 233, 221, 0.34);
  --brass: #bda277;
  --line: rgba(238, 233, 221, 0.26);
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Baskerville, Georgia, serif;
  --edge: clamp(1.25rem, 3.2vw, 3.75rem);
}

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

html {
  min-width: 320px;
  color-scheme: dark;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ivory);
  background: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

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

:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: 5px;
}

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

.hidden-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 0.9rem;
  color: var(--ink);
  background: var(--ivory);
  font-size: 0.75rem;
  transform: translateY(-220%);
  transition: transform 180ms ease;
}

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

/* Landing */

.landing-page {
  height: 100%;
  overflow: hidden;
}

.teaser {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

.teaser__media {
  position: absolute;
  z-index: -4;
  inset: 0;
  margin: 0;
  opacity: 0;
  animation: image-enter 1.8s ease 80ms forwards;
}

.teaser__media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}

.teaser__shade {
  position: absolute;
  z-index: -3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 5, 3, 0.58) 0%, transparent 27%),
    linear-gradient(90deg, transparent 42%, rgba(2, 5, 3, 0.1) 60%, rgba(2, 5, 3, 0.52) 100%),
    linear-gradient(0deg, rgba(2, 5, 3, 0.28) 0%, transparent 30%);
}

.teaser__shade::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.16;
  background: radial-gradient(
    circle at 24% 74%,
    rgba(189, 162, 119, 0.14) 0%,
    rgba(189, 162, 119, 0.055) 18%,
    transparent 42%
  );
  mix-blend-mode: soft-light;
  animation: light-breathe 14s ease-in-out 2s infinite alternate;
}

.teaser__grain {
  position: absolute;
  z-index: -2;
  inset: -30%;
  pointer-events: none;
  opacity: 0.026;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transform: rotate(4deg);
}

.teaser__header {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding:
    max(1.35rem, env(safe-area-inset-top))
    max(var(--edge), env(safe-area-inset-right))
    1rem
    max(var(--edge), env(safe-area-inset-left));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: quiet-enter 1.25s ease 420ms forwards;
}

.brand__mark {
  width: 1.62rem;
  height: 2.16rem;
  flex: none;
  overflow: visible;
}

.brand__stroke {
  fill: none;
  stroke: var(--brass);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
  transition:
    opacity 220ms ease,
    stroke 220ms ease;
}

.brand__frame {
  stroke-width: 1.25;
  animation: mark-draw 1.45s cubic-bezier(0.2, 0.7, 0.3, 1) 450ms forwards;
}

.brand__glyph {
  stroke-width: 1.7;
  animation: mark-draw 760ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

.brand__loop {
  animation-delay: 820ms;
}

.brand__stem {
  animation-delay: 930ms;
}

.brand__arm--upper {
  animation-delay: 1.04s;
}

.brand__arm--lower {
  animation-delay: 1.15s;
}

.brand__dot {
  fill: var(--brass);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: mark-dot 620ms ease 1.34s forwards;
}

.brand--settled .brand__stroke {
  stroke-dashoffset: 0;
  animation: none;
}

.brand--settled .brand__dot {
  opacity: 1;
  animation: none;
}

.brand--settled.is-mark-replaying .brand__stroke {
  animation: mark-redraw 620ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.brand--settled.is-mark-replaying .brand__loop {
  animation-delay: 90ms;
}

.brand--settled.is-mark-replaying .brand__stem {
  animation-delay: 155ms;
}

.brand--settled.is-mark-replaying .brand__arm--upper {
  animation-delay: 220ms;
}

.brand--settled.is-mark-replaying .brand__arm--lower {
  animation-delay: 285ms;
}

.brand--settled.is-mark-replaying .brand__dot {
  animation: mark-dot-replay 480ms ease 520ms both;
}

.brand__name {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.29em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
  transition: color 220ms ease;
}

.brand:hover .brand__stroke,
.brand:focus-visible .brand__stroke {
  opacity: 1;
}

.brand:hover .brand__name,
.brand:focus-visible .brand__name {
  color: var(--brass);
}

.quiet-link {
  padding-block: 0.45rem;
  color: var(--ivory-muted);
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  transition: color 200ms ease;
  animation: quiet-enter 1.2s ease 900ms forwards;
}

.quiet-link:hover {
  color: var(--ivory);
}

.mailing {
  position: absolute;
  z-index: 3;
  right: max(var(--edge), env(safe-area-inset-right));
  bottom: max(clamp(3.5rem, 8vh, 6.5rem), env(safe-area-inset-bottom));
  width: min(25rem, calc(100vw - (2 * var(--edge))));
  opacity: 0;
  transform: translateY(10px);
  animation: form-enter 1.3s cubic-bezier(0.2, 0.7, 0.3, 1) 720ms forwards;
}

.mailing__title {
  margin: 0 0 0.85rem;
  color: var(--ivory);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65);
  text-transform: uppercase;
}

.mailing__form {
  margin: 0;
}

.mailing__field {
  position: relative;
  display: grid;
  height: 3.2rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 4, 0.2);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition:
    border-color 220ms ease,
    background 220ms ease;
}

.mailing__field::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--brass), rgba(189, 162, 119, 0.08));
  opacity: 0.58;
  transform: scaleX(0);
  transform-origin: left center;
  animation: line-reveal 1.7s cubic-bezier(0.2, 0.7, 0.3, 1) 1.05s forwards;
}

.mailing__field:focus-within {
  border-color: rgba(189, 162, 119, 0.88);
  background: rgba(3, 7, 4, 0.34);
}

.mailing__field input {
  width: 100%;
  min-width: 0;
  padding: 0.25rem 1rem 0.15rem 0;
  color: var(--ivory);
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  font-size: 0.91rem;
  letter-spacing: 0.025em;
  -webkit-appearance: none;
}

.mailing__field input::placeholder {
  color: rgba(238, 233, 221, 0.57);
  opacity: 1;
}

.mailing__field button {
  min-width: 4.3rem;
  padding: 0 0 0 1.1rem;
  color: var(--brass);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 200ms ease;
  -webkit-appearance: none;
}

.mailing__field button:hover {
  color: var(--ivory);
}

.mailing__field button[aria-busy="true"] {
  color: var(--ivory-muted);
  cursor: wait;
}

.mailing__note {
  margin: 0.62rem 0 0;
  color: rgba(238, 233, 221, 0.48);
  font-size: 0.61rem;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

/* Minimal supporting pages */

.interstitial-page,
.legal-page {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 28% 84%, rgba(41, 66, 48, 0.35), transparent 38rem),
    var(--ink);
}

.interstitial-page::before,
.legal-page::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.075;
  background: url("/assets/cinq-tease-desktop.webp") center / cover no-repeat;
  filter: saturate(0.65);
}

.interstitial-page::after,
.legal-page::after {
  position: fixed;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  background: rgba(3, 6, 4, 0.72);
}

.page-header {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  padding:
    max(1.35rem, env(safe-area-inset-top))
    max(var(--edge), env(safe-area-inset-right))
    1rem
    max(var(--edge), env(safe-area-inset-left));
}

.interstitial {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 8rem var(--edge) 5rem;
}

.interstitial__content {
  width: min(32rem, 100%);
}

.interstitial h1,
.legal h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.return-link {
  display: inline-block;
  margin-top: 2.2rem;
  padding-block: 0.4rem;
  color: var(--ivory-muted);
  border-bottom: 1px solid var(--ivory-faint);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  transition:
    color 200ms ease,
    border-color 200ms ease;
}

.return-link:hover {
  color: var(--ivory);
  border-color: var(--brass);
}

.legal-shell {
  position: relative;
  z-index: 1;
  padding: clamp(8rem, 14vw, 11rem) var(--edge) 7rem;
}

.legal {
  width: min(42rem, 100%);
  margin: 0 auto;
}

.legal__date {
  margin: 0 0 1.35rem;
  color: var(--brass);
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal h1 {
  margin-bottom: 3rem;
}

.legal h2 {
  margin: 2.4rem 0 0.55rem;
  color: var(--ivory);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal p {
  margin: 0 0 1rem;
  color: rgba(238, 233, 221, 0.68);
  font-size: 0.91rem;
  line-height: 1.8;
}

.legal__intro {
  color: rgba(238, 233, 221, 0.82);
}

.legal p a {
  color: var(--ivory);
  border-bottom: 1px solid var(--ivory-faint);
  transition: border-color 200ms ease;
}

.legal p a:hover {
  border-color: var(--brass);
}

@keyframes image-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes light-breathe {
  from {
    opacity: 0.12;
  }
  to {
    opacity: 0.38;
  }
}

@keyframes line-reveal {
  to {
    transform: scaleX(1);
  }
}

@keyframes quiet-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes form-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mark-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes mark-dot {
  to {
    opacity: 1;
  }
}

@keyframes mark-redraw {
  from {
    stroke-dashoffset: 1;
    opacity: 0.28;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes mark-dot-replay {
  0% {
    opacity: 0;
    transform: scale(0.55);
  }
  70% {
    opacity: 1;
    transform: scale(1.18);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 700px) {
  :root {
    --edge: 1.25rem;
  }

  .teaser__media img {
    object-position: 33% 50%;
  }

  .teaser__shade {
    background:
      linear-gradient(180deg, rgba(2, 5, 3, 0.64) 0%, transparent 24%),
      radial-gradient(circle at 48% 29%, rgba(2, 5, 3, 0.38), transparent 45%),
      linear-gradient(0deg, rgba(2, 5, 3, 0.2) 0%, transparent 26%);
  }

  .teaser__shade::after {
    background: radial-gradient(
      circle at 52% 74%,
      rgba(189, 162, 119, 0.13) 0%,
      rgba(189, 162, 119, 0.045) 18%,
      transparent 43%
    );
  }

  .teaser__header {
    padding-top: max(1.15rem, env(safe-area-inset-top));
  }

  .brand {
    gap: 0.6rem;
  }

  .brand__mark {
    width: 1.42rem;
    height: 1.9rem;
  }

  .brand__name {
    font-size: 0.57rem;
    letter-spacing: 0.25em;
  }

  .quiet-link {
    font-size: 0.56rem;
  }

  .mailing {
    top: clamp(10.75rem, 27vh, 14.5rem);
    right: max(var(--edge), env(safe-area-inset-right));
    bottom: auto;
    left: max(var(--edge), env(safe-area-inset-left));
    width: auto;
  }

  .mailing__title {
    margin-bottom: 0.7rem;
    font-size: 0.59rem;
  }

  .mailing__field {
    height: 3rem;
  }

  .mailing__note {
    font-size: 0.58rem;
  }

  .legal-shell {
    padding-top: 7.5rem;
  }

  .legal h1 {
    margin-bottom: 2.25rem;
  }
}

@media (max-width: 360px) {
  .brand__name {
    letter-spacing: 0.18em;
  }

  .quiet-link {
    letter-spacing: 0.14em;
  }
}

@media (max-height: 560px) and (max-width: 700px) {
  .mailing {
    top: 35%;
  }
}

@media (max-height: 620px) and (min-width: 701px) {
  .mailing {
    bottom: 2.25rem;
  }
}

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

  .teaser__media,
  .teaser__media img,
  .brand,
  .quiet-link,
  .mailing {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .brand__stroke,
  .brand__dot,
  .brand--settled.is-mark-replaying .brand__stroke,
  .brand--settled.is-mark-replaying .brand__dot {
    animation: none;
  }

  .brand__stroke {
    stroke-dashoffset: 0;
  }

  .brand__dot {
    opacity: 1;
  }

  .teaser__shade::after,
  .mailing__field::after {
    animation: none;
  }

  .teaser__shade::after {
    opacity: 0.2;
  }

  .mailing__field::after {
    transform: scaleX(1);
  }
}
