/*
  Britt XOXO. Yellow, hot pink, and black over an immersive first view,
  photographic destinations, a restrained directory, and a decisive close.

  Motion jobs, four total, everything else still:
    xo-sign-off   hero XOXO draws itself once per document load
    smiley-tilt   the typed ":)" stands upright on press or hover
    rail response destination row hover and focus feedback
    dialog-arrive age-confirmation dialog entrance
  Page content is visible and interactive at first paint. There is no arrival
  fade, no photo settle, and no scroll-triggered reveal.
*/

@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-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #111012;
  --night: #111012;
  --night-2: #1a181b;
  --paper: #fffdf3;
  --surface: #ffffff;
  --muted: #a89fa7;
  --line-dark: rgb(255 255 255 / 15%);
  --line-light: #e7dca0;
  --yellow: #ffd52e;
  --yellow-soft: #fff2a5;
  --pink: #ed3695;
  --pink-soft: #fde6f2;
  --action: #00aef0;
  --focus: #ff79bf;
  --type: "Instrument Sans", Arial, sans-serif;
  font-family: var(--type);
  font-synthesis: none;
}

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

html {
  overflow-x: clip;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--surface);
  background: var(--night);
  font-family: var(--type);
}

body,
button,
input {
  font-size: 16px;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  min-height: 44px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  background: var(--yellow);
  font-weight: 700;
  transform: translateY(-140%);
}

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

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

.hero {
  position: relative;
  min-height: 540px;
  height: calc(100svh - 36px);
  max-height: 800px;
  overflow: hidden;
  background: var(--night);
}

.hero__media,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__media {
  overflow: hidden;
  background: #302b2e;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 17%;
  filter: brightness(0.57);
}

.hero__shade {
  background: rgb(17 16 18 / 8%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 20px 32px;
}

.hero__handle {
  margin: 0;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.hero__copy {
  display: flex;
  width: min(100%, 440px);
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.hero__copy h1 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  color: var(--yellow);
  font-family: var(--type);
  font-size: 68px;
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0;
}

/*
  xo-sign-off: the hero suffix is an original inline drawing of Britt's own
  XOXO, not a font. Height is reserved in em before any stroke is revealed, so
  the draw never shifts layout. Undrawn state lives only inside the
  no-preference query; the default state below is fully drawn.
*/
.hero__suffix {
  display: block;
  height: 0.34em;
  color: var(--pink);
}

.xo-sign {
  display: block;
  width: auto;
  height: 100%;
  overflow: visible;
}

.xo-sign path {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

/*
  smiley-tilt: the typed ":)" in Britt's own action labels stands upright under
  a finger or a pointer. Presentational only; it never receives the pointer and
  never participates in the accessible name.
*/
.cta__smiley {
  display: inline-block;
  transform-origin: 50% 50%;
  pointer-events: none;
}

.cta {
  display: inline-flex;
  min-height: 58px;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 6px;
  color: var(--ink);
  background: var(--action);
  box-shadow: 0 12px 34px rgb(0 0 0 / 24%);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.hero__directory {
  min-height: 44px;
  padding: 10px 0;
  color: var(--surface);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-underline-offset: 4px;
}

.chapters {
  display: grid;
  width: min(100%, 1180px);
  gap: 12px;
  margin: 0 auto;
  padding: 12px;
  background: var(--night);
}

.chapter {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  color: var(--surface);
  background: var(--night-2);
  text-decoration: none;
}

.chapter picture,
.chapter img {
  width: 100%;
  height: 100%;
}

.chapter img {
  object-fit: cover;
}

.chapter--members img {
  object-position: 54% 38%;
}

.chapter--instagram img {
  object-position: 50% 18%;
}

.chapter__label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  padding: 18px 20px;
  color: var(--yellow);
  background: rgb(17 16 18 / 84%);
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
}

.chapter--instagram .chapter__label {
  color: var(--pink);
}

.destinations {
  padding: 68px 20px 76px;
  border-top: 1px solid var(--line-dark);
  background: var(--night);
}

.destinations__heading,
.destination-grid {
  width: min(100%, 920px);
  margin: 0 auto;
}

.destinations__heading {
  padding-bottom: 26px;
}

.destinations__heading h2 {
  margin: 0;
  color: var(--yellow);
  font-family: var(--type);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0;
}

.destination-grid {
  display: grid;
  border-top: 1px solid var(--line-dark);
}

.destination {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  gap: 16px;
  padding: 15px 48px 15px 2px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--surface);
  background: transparent;
  text-decoration: none;
}

.destination::after {
  position: absolute;
  right: 10px;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.destination__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 9px;
  border-radius: 7px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.destination--pink .destination__icon {
  color: #ff61b4;
  background: rgb(237 54 149 / 14%);
}

.destination--yellow .destination__icon {
  color: var(--yellow);
  background: rgb(255 213 46 / 13%);
}

.destination--paper .destination__icon {
  color: var(--night);
  background: var(--surface);
}

.destination__icon--solid {
  fill: currentColor;
  stroke: none;
}

.destination > span {
  min-width: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.closer {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 28px;
  padding: 64px 20px;
  color: var(--ink);
  background: var(--yellow);
}

.closer h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-family: var(--type);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.closer h2 span {
  color: #b8176d;
  font-family: var(--type);
  font-size: 0.38em;
}

.closer .cta {
  width: min(100%, 420px);
}

.site-footer {
  display: flex;
  min-height: 118px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 20px;
  color: var(--surface);
  background: var(--night);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.site-footer__name {
  color: var(--yellow) !important;
  font-family: var(--type);
  font-size: 22px !important;
  font-weight: 700 !important;
}

.site-footer__name span {
  color: var(--pink);
  font-family: var(--type);
  font-size: 0.62em;
}

.site-footer form {
  margin: 0;
}

.site-footer form input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-footer button {
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.members-page,
.dialog-preview {
  min-height: 100svh;
  color: var(--ink);
  background: var(--paper);
}

.members-shell {
  display: grid;
  width: min(calc(100% - 32px), 540px);
  min-height: 100svh;
  align-content: center;
  margin: 0 auto;
  padding: 32px 0;
}

.members-shell__identity {
  padding: 0 4px 18px;
}

.members-shell__identity p,
.age-dialog__name {
  margin: 0;
  color: var(--ink);
  font-family: var(--type);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.members-shell__form {
  padding: 32px 26px 28px;
  border: 1px solid var(--line-light);
  border-top: 7px solid var(--yellow);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgb(17 16 18 / 12%);
}

.members-shell__form h1,
.age-dialog h2,
.depart-page h1 {
  margin: 0 0 24px;
  color: var(--ink);
  font-family: var(--type);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.members-shell form,
.age-dialog form {
  display: grid;
  gap: 18px;
  width: 100%;
}

.members-shell label,
.age-dialog label {
  position: relative;
  display: grid;
  min-height: 52px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.45;
}

.members-shell input[type="checkbox"],
.age-dialog input[type="checkbox"] {
  position: absolute;
  top: 50%;
  left: -7px;
  z-index: 1;
  width: 44px;
  height: 44px;
  margin: 0;
  opacity: 0;
  transform: translateY(-50%);
  cursor: pointer;
}

.members-shell label span,
.age-dialog label span {
  grid-column: 2;
}

.members-shell label span::before,
.age-dialog label span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 28px;
  height: 28px;
  border: 2px solid #746a72;
  border-radius: 4px;
  background: var(--surface);
  content: "";
  transform: translateY(-50%);
}

.members-shell input[type="checkbox"]:checked + span::before,
.age-dialog input[type="checkbox"]:checked + span::before {
  border-color: var(--pink);
  background: var(--pink);
}

.members-shell input[type="checkbox"]:checked + span::after,
.age-dialog input[type="checkbox"]:checked + span::after {
  position: absolute;
  top: 50%;
  left: 9px;
  width: 8px;
  height: 14px;
  border-right: 3px solid var(--surface);
  border-bottom: 3px solid var(--surface);
  content: "";
  transform: translateY(-62%) rotate(45deg);
}

.members-shell input[type="checkbox"]:focus-visible + span::before,
.age-dialog input[type="checkbox"]:focus-visible + span::before {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.members-shell button,
.age-dialog form button,
.depart-page a {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 1px solid rgb(17 16 18 / 15%);
  border-radius: 6px;
  color: var(--ink);
  background: var(--action);
  box-shadow: 0 8px 22px rgb(17 16 18 / 10%);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.members-shell form > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: #746a72;
  font-weight: 700;
}

.form-error {
  margin: 0 0 16px;
  color: #8c1748;
  font-weight: 700;
}

.age-dialog {
  width: min(calc(100% - 32px), 500px);
  max-height: calc(100svh - 32px);
  margin: auto;
  overflow: auto;
  padding: 32px 28px 28px;
  border: 1px solid var(--line-light);
  border-top: 7px solid var(--yellow);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 90px rgb(0 0 0 / 32%);
}

.age-dialog::backdrop {
  background: rgb(17 16 18 / 84%);
}

.age-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #746a72;
  background: var(--paper);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.age-dialog__name {
  margin: 2px 54px 30px 0;
  font-size: 22px;
}

.age-dialog h2 {
  font-size: 34px;
}

.dialog-preview {
  display: grid;
  place-items: center;
}

.depart-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background: var(--paper);
}

.depart-page main {
  width: min(100%, 520px);
  padding: 36px 30px;
  border: 1px solid var(--line-light);
  border-top: 7px solid var(--yellow);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgb(17 16 18 / 12%);
}

.depart-page p {
  margin: 0 0 20px;
  color: #746a72;
  font-weight: 400;
  line-height: 1.5;
}

.depart-page a {
  width: 100%;
}

@media (max-width: 359px) {
  .hero__inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero__copy h1 {
    gap: 7px;
    font-size: 58px;
  }

  .destinations__heading h2 {
    font-size: 37px;
  }
}

@media (min-width: 760px) {
  .chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px 24px;
  }

  .chapter__label {
    min-height: 86px;
    padding: 22px 24px;
    font-size: 34px;
  }

  .destinations {
    padding: 92px 32px 104px;
  }

  .destinations__heading {
    padding-bottom: 34px;
  }

  .destinations__heading h2 {
    font-size: 54px;
  }

  .destination {
    min-height: 88px;
  }

  .closer {
    min-height: 360px;
    padding: 84px 32px;
  }

  .closer h2 {
    font-size: 62px;
  }

  .site-footer {
    padding: 32px;
  }

  .members-shell__form {
    padding: 40px 38px 36px;
  }

  .members-shell__form h1 {
    font-size: 40px;
  }
}

@media (min-width: 900px) {
  .hero {
    min-height: 680px;
    height: calc(100svh - 36px);
    max-height: 820px;
  }

  .hero__media {
    right: 0;
    left: auto;
    width: 58%;
  }

  .hero__media img {
    object-position: 50% 20%;
    filter: brightness(0.82);
  }

  .hero__shade {
    right: 0;
    left: auto;
    width: 58%;
    background: rgb(17 16 18 / 10%);
  }

  .hero__inner {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 34px 32px 58px;
  }

  .hero__copy {
    width: 38%;
  }

  .hero__copy h1 {
    font-size: 88px;
  }

  .hero__handle {
    font-size: 15px;
  }

  .chapters {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

@media (min-width: 1244px) {
  .hero__inner {
    padding-right: 0;
    padding-left: 0;
  }

  .chapters {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (hover: hover) {
  .cta:hover {
    box-shadow: 0 16px 38px rgb(0 174 240 / 24%);
    transform: translateY(-2px);
  }

  .chapter:hover img {
    transform: scale(1.025);
  }

  .chapter:hover .chapter__label {
    color: var(--ink);
    background: var(--yellow);
  }

  .destination:hover {
    background: var(--night-2);
  }

  .destination:hover::after {
    transform: translateX(4px) rotate(45deg);
  }

  .cta:hover .cta__smiley,
  .chapter--members:hover .cta__smiley {
    transform: translateX(0.14em) rotate(90deg) scale(1.1);
  }

  .site-footer button:hover,
  .age-dialog__close:hover {
    color: var(--ink);
    background: var(--yellow);
  }
}

.cta:active,
.members-shell button:active,
.age-dialog form button:active,
.depart-page a:active {
  transform: translateY(1px);
}

/*
  The upright face is wider than the typed ":)" it replaces, so it is nudged
  right by a type-relative amount to hold its word gap. Transform only; the
  label never reflows.
*/
.cta:active .cta__smiley,
.chapter--members:active .cta__smiley {
  transform: translateX(0.14em) rotate(90deg) scale(1.1);
}

@media (prefers-reduced-motion: no-preference) {
  /*
    xo-sign-off, once per document load, 595ms end to end. The four glyphs
    stagger left to right in writing order: each X draws its two strokes, each
    O draws as one looped stroke. Only stroke-dashoffset moves, so nothing in
    this animation can shift layout.
  */
  .xo-sign path {
    animation: xo-sign-off 135ms ease-out both;
  }

  .xo-sign path:nth-child(1) {
    animation-delay: 0ms;
  }

  .xo-sign path:nth-child(2) {
    animation-delay: 60ms;
  }

  .xo-sign path:nth-child(3) {
    animation-duration: 175ms;
    animation-delay: 140ms;
  }

  .xo-sign path:nth-child(4) {
    animation-delay: 280ms;
  }

  .xo-sign path:nth-child(5) {
    animation-delay: 340ms;
  }

  .xo-sign path:nth-child(6) {
    animation-duration: 175ms;
    animation-delay: 420ms;
  }

  .cta__smiley {
    transition: transform 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  .cta,
  .chapter img,
  .chapter__label,
  .destination,
  .destination::after,
  .site-footer button,
  .age-dialog__close {
    transition: background-color 220ms ease, box-shadow 220ms ease, color 220ms ease, opacity 440ms ease, transform 440ms ease;
  }

  .age-dialog[open] {
    animation: dialog-arrive 180ms ease-out both;
  }
}

/*
  The opacity step exists because a round linecap paints a visible dot at zero
  stroke length. Holding the first frame during each stroke's delay keeps the
  page clean until that stroke actually starts moving.
*/
@keyframes xo-sign-off {
  from {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes dialog-arrive {
  from {
    opacity: 0.01;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  /*
    Forced colors paints a backplate behind text over images but not behind
    drawn marks, so the XOXO sign-off is given the same footing as the name it
    belongs to.
  */
  .hero__suffix {
    background: Canvas;
  }

  .cta,
  .chapter,
  .destination,
  .members-shell button,
  .age-dialog form button,
  .depart-page a {
    border: 2px solid ButtonText;
  }
}
