/* BARLUNGO STUDIO — /start, the front door.
 *
 * A separate, much smaller stylesheet. It shares tokens.css with the main site,
 * so the palette, the type and the measures are the same system, but it carries
 * none of the site's components and the page loads no script at all. That is
 * what "substantially lighter" means here: same design language, a fraction of
 * the bytes.
 *
 * Mobile-first. The one layout change at a wide viewport is the destination
 * grid going two-up; everything else is fluid.
 */

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

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

body,
h1,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

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

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

body {
  min-height: 100svh;
  display: grid;
  align-content: space-between;
  gap: clamp(2.5rem, 7vh, 4.5rem);
  padding: clamp(2.5rem, 8vh, 5rem) var(--gutter) clamp(2rem, 6vh, 3.5rem);
  background: var(--ink-deep);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: var(--size-body);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}

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

/* ------------------------------------------------------------------ image */

/* The guardabarranco runs behind the whole page rather than sitting in a band:
   the front door is one image with type on it, which is the cheapest way to
   look like the studio and not like a link list. */
.start-media {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.start-media .plate,
.start-media .plate img {
  width: 100%;
  height: 100%;
}

.start-media .plate img {
  object-fit: cover;
}

.start-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to top,
      color-mix(in srgb, var(--ink) 92%, transparent) 0%,
      color-mix(in srgb, var(--ink) 58%, transparent) 42%,
      color-mix(in srgb, var(--ink) 18%, transparent) 100%
    ),
    linear-gradient(
      to right,
      color-mix(in srgb, var(--ink) 62%, transparent) 0%,
      color-mix(in srgb, var(--ink) 0%, transparent) 62%
    );
}

/* ------------------------------------------------------------------- head */

/* The page's type carries its own contrast, so the scrim can stay a scrim and
   the photograph underneath keeps its colour. */
header,
.destinations,
.start-foot {
  text-shadow:
    0 1px 2px color-mix(in srgb, var(--ink) 55%, transparent),
    0 2px 18px color-mix(in srgb, var(--ink) 60%, transparent);
}

.start-wordmark {
  font-size: clamp(2.25rem, 11vw, 5.5rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.start-wordmark span {
  display: block;
}

.start-descriptor {
  margin-top: clamp(0.75rem, 2vh, 1.25rem);
  max-width: 26rem;
  font-size: var(--size-sm);
  color: color-mix(in srgb, var(--bone) 72%, transparent);
}

/* ----------------------------------------------------------- destinations */

/* Four ways in, set as editorial rows: a hairline, a large label, a line of
   detail type. Not a stack of rounded buttons. */
.destinations {
  display: grid;
  gap: 0;
}

.destination a {
  display: grid;
  gap: 0.3rem;
  padding-block: clamp(1rem, 3vh, 1.5rem);
  border-top: 1px solid color-mix(in srgb, var(--bone) 18%, transparent);
  position: relative;
}

.destination:last-child a {
  border-bottom: 1px solid color-mix(in srgb, var(--bone) 18%, transparent);
}

/* The rule under a row draws in on hover, the same gesture the main site uses
   for a call to action. */
.destination a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.destination a:hover::after,
.destination a:focus-visible::after {
  transform: scaleX(1);
}

.destination-label {
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.destination-line,
.start-platforms a,
.start-enter,
.start-copy {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.destination-line {
  /* Lifted from 58%: these lines now sit on a photograph rather than a flat
     ground, and the tint that read as restraint there reads as faint here. */
  color: color-mix(in srgb, var(--bone) 78%, transparent);
}

/* ------------------------------------------------------------------ foot */

.start-foot {
  display: grid;
  gap: clamp(1.25rem, 4vh, 2rem);
}

.start-enter {
  justify-self: start;
  padding-block: 0.45rem;
  border-bottom: 1px solid var(--amber);
  letter-spacing: 0.22em;
  transition: color 180ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.start-enter:hover,
.start-enter:focus-visible {
  color: var(--gold);
}

.start-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.start-platforms a {
  color: color-mix(in srgb, var(--bone) 68%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--bone) 22%, transparent);
  padding-bottom: 2px;
  transition: color 180ms cubic-bezier(0.2, 0.7, 0.3, 1),
    border-color 180ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.start-platforms a:hover,
.start-platforms a:focus-visible {
  color: var(--bone);
  border-bottom-color: var(--amber);
}

.start-copy {
  color: color-mix(in srgb, var(--bone) 34%, transparent);
  letter-spacing: 0.1em;
}

/* The empty-state plate, for the window before the image is in place. */
.plate {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--bone) 5%, transparent);
}

.plate-empty {
  display: grid;
  place-items: start;
  align-content: start;
  padding: 1rem;
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, var(--bone) 4%, transparent) 0 1px,
      transparent 1px 9px
    ),
    color-mix(in srgb, var(--bone) 3%, transparent);
}

.plate-slot {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 40%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Two-up at a wide viewport. The page is designed at phone width first, and
   this is the only thing that changes. */
@media (min-width: 52rem) {
  body {
    padding-inline: clamp(3rem, 8vw, 7rem);
  }

  .destinations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 6vw, 5rem);
    max-width: 62rem;
  }

  /* With two columns the second row needs its own top rule, and the last-child
     rule alone would under-draw the grid. */
  .destination:nth-last-child(-n + 2) a {
    border-bottom: 1px solid color-mix(in srgb, var(--bone) 18%, transparent);
  }
}
