/* ==========================================================================
   Supergroup homepage
   Cream page, a big serif headline, a lime waitlist pill, an orange marquee,
   a navy "come with us" block and a pink footer. This sheet is only for
   index.html — the auth, invite and legal pages still share style.css.
   ========================================================================== */

/* The letter-spaced caps everywhere — eyebrow, marquee, buttons, footer.
   Licensed from Dinamo. */
@font-face {
  font-family: 'ABC Camera Plain';
  src: url('/fonts/abc-camera-plain-regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Camera Plain';
  src: url('/fonts/abc-camera-plain-bold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* The headline serif. Licensed from Tekio. */
@font-face {
  font-family: 'Softcore';
  src: url('/fonts/softcore-regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Softcore';
  src: url('/fonts/softcore-bold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* The pixel face on "super-". Licensed from Florian Karsten; only the
   Compact Blended cut is shipped since that's the one the design uses. */
@font-face {
  font-family: 'FK Raster Roman';
  src: url('/fonts/fk-raster-roman-compact-blended.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #FFFCEF;
  --ink: #0B1023;
  --lime: #D9FF1A;
  --lime-deep: #C4EA00;
  --orange: #FF5A1F;
  --pink: #FFB4E1;
  --grey: #9E9E9E;
  --white: #FFFFFF;

  /* The pixel letters of "super-", left to right. */
  --px-1: #7CC63B;
  --px-2: #FFB4E1;
  --px-3: #4A5CFF;
  --px-4: #FF5A1F;
  --px-5: #7CC63B;
  --px-6: var(--ink);

  --font-serif: 'Softcore', 'Georgia', serif;
  --font-sans: 'ABC Camera Plain', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-pixel: 'FK Raster Roman', 'Courier New', monospace;

  --gutter: 64px;
  --max-w: 1280px;
}

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

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--cream);
  /* Set here as well as on body: iOS Safari only honours it on the root. */
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Small letter-spaced caps — the eyebrow, the marquee, the footer, the
   buttons. The whole page's secondary voice. */
.caps,
.eyebrow,
.marquee,
.come__line,
.come__copy,
.foot,
.waitlist__open,
.waitlist__email,
.waitlist__submit,
.waitlist__done,
.waitlist__error {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter) 112px;
  display: grid;
  grid-template-columns: minmax(0, 57%) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 40px;
  /* Lets the round thing hang off the top edge and the horse crowd the
     corner without widening the page. */
  overflow: hidden;
}

.hero__top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 28px 0 116px;
}

.wordmark {
  display: block;
  width: 180px;
}

.hero__circle,
.hero__horse {
  position: absolute;
  user-select: none;
}

.hero__circle {
  top: -40px;
  left: 12%;
  width: 170px;
  height: 170px;
  pointer-events: none;
}

.hero__horse {
  pointer-events: none;
}

/* A .cycle stacks its images and shows one at a time (see waitlist.js). */
.cycle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.cycle img.is-on {
  display: block;
}

.hero__horse {
  top: 78px;
  right: 5%;
  width: 150px;
  height: 195px;
}

.hero__left {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  display: flex;
  flex-direction: column;
}

.eyebrow {
  font-size: 14px;
  color: var(--grey);
  margin-bottom: 14px;
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 660 / 400;
  object-fit: cover;
}

.hero__title {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  font-family: var(--font-serif);
  font-weight: normal;
  /* Tracks the headline column's width — 43% of the content box less the
     40px gap, i.e. 0.43vw − 95px — divided by the 5.07em that "your
     friends" measures in Softcore, so it always fits on one line. */
  font-size: clamp(3rem, 8.4vw - 19px, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-align: right;
  text-wrap: balance;
  /* Pull the type's own side-bearing back to the column edge. */
  margin-right: -0.04em;
}

.pixel {
  display: block;
  font-family: var(--font-pixel);
  font-weight: normal;
  font-size: 1em;
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin-bottom: 0.1em;
}

.pixel span:nth-child(1) { color: var(--px-1); }
.pixel span:nth-child(2) { color: var(--px-2); }
.pixel span:nth-child(3) { color: var(--px-3); }
.pixel span:nth-child(4) { color: var(--px-4); }
.pixel span:nth-child(5) { color: var(--px-5); }
.pixel span:nth-child(6) { color: var(--px-6); }

/* --------------------------------------------------------------------------
   Waitlist pill
   One element, three looks: a lime button, then a white pill holding an
   email field and JOIN!, then lime again saying you're in.
   -------------------------------------------------------------------------- */

.waitlist {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  justify-self: center;
  position: relative;
  z-index: 2;
  width: 340px;
  max-width: 100%;
  height: 76px;
  /* The photo ends at the row's bottom edge; drop half the pill past it. */
  transform: translateY(50%);
  border-radius: 999px;
  background: var(--lime);
  transition:
    width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.waitlist[data-state="open"],
.waitlist[data-state="sending"],
.waitlist[data-state="error"] {
  width: 500px;
  background: var(--white);
  box-shadow: 0 10px 32px rgba(11, 16, 35, 0.14);
}

.waitlist__open,
.waitlist__fields,
.waitlist__done {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.waitlist__open {
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.15s ease;
}

.waitlist__open:hover {
  background: var(--lime-deep);
}

.waitlist:not([data-state="closed"]) .waitlist__open {
  opacity: 0;
  pointer-events: none;
}

.waitlist__fields {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease 0.15s;
}

.waitlist[data-state="open"] .waitlist__fields,
.waitlist[data-state="sending"] .waitlist__fields,
.waitlist[data-state="error"] .waitlist__fields {
  opacity: 1;
  pointer-events: auto;
}

.waitlist__email {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.waitlist__email::placeholder {
  color: var(--grey);
  opacity: 1;
}

.waitlist__submit {
  flex: 0 0 auto;
  height: 100%;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.waitlist__submit:hover { background: var(--lime-deep); }
.waitlist__submit:active { transform: scale(0.97); }
.waitlist__submit:disabled { cursor: progress; opacity: 0.7; transform: none; }

.waitlist__done {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease 0.2s;
}

.waitlist[data-state="success"] .waitlist__done {
  opacity: 1;
}

.waitlist__error {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  min-height: 1.5em;
}

.waitlist__open:focus-visible,
.waitlist__submit:focus-visible,
.foot a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */

.marquee {
  background: var(--orange);
  color: var(--white);
  font-size: 16px;
  letter-spacing: 0.14em;
  height: 44px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.marquee__track {
  display: flex;
  flex-shrink: 0;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__track span {
  padding: 0 0.6em;
}

/* The track holds the promise four times over; sliding it half its width
   lands exactly on the same words again, so the loop never jumps. */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .waitlist { transition: none; }
}

/* --------------------------------------------------------------------------
   Come with us
   -------------------------------------------------------------------------- */

.come {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding: 64px 24px 80px;
}

.come__title {
  font-family: var(--font-serif);
  font-weight: normal;
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 44px;
}

.come__art {
  position: relative;
  width: min(330px, 78vw);
  aspect-ratio: 1218 / 1786;
  margin: 0 auto 56px;
}

.come__ufo,
.come__team {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.come__team {
  opacity: 0;
}

.come.is-people .come__ufo {
  opacity: 0;
}

.come.is-people .come__team {
  opacity: 1;
}

/* Only on devices that really hover — touch browsers hold :hover after a
   tap, which would fight the tap toggle. */
@media (hover: hover) {
  .come:has(.people:hover) .come__ufo {
    opacity: 0;
  }

  .come:has(.people:hover) .come__team {
    opacity: 1;
  }

  .people:hover {
    border-bottom-style: solid;
  }
}

.come__line {
  color: var(--lime);
  font-size: 14px;
  line-height: 1.55;
}

.come__line + .come__line {
  margin-top: 22px;
}

.come__copy {
  color: var(--white);
  font-size: 14px;
  margin-top: 22px;
}

.people {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 2px dotted currentColor;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.come.is-people .people {
  border-bottom-style: solid;
}

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

.foot {
  position: relative;
  background: var(--pink);
  color: var(--orange);
  font-size: 15px;
  line-height: 1.6;
  padding: 96px 80px 80px;
  /* Three across on desktop, all top-aligned: links and contact on the
     left, the crescent in the middle, the address on the right. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  column-gap: 40px;
}

.foot__crescent {
  position: relative;
  width: 200px;
  height: 180px;
  user-select: none;
  pointer-events: none;
}

.foot__address {
  text-align: right;
}

.foot a {
  text-decoration: none;
}

.foot__legal a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.foot__legal a:hover,
.foot__contact a:hover {
  color: var(--ink);
}

.foot__amp {
  font-weight: 700;
}

.foot__contact {
  margin-top: 28px;
}

.foot__contact a {
  font-weight: 700;
}

.foot__copy {
  margin-top: 28px;
}

.foot__social {
  display: flex;
  gap: 24px;
  margin-top: 26px;
}

.foot__social a {
  display: inline-flex;
  transition: color 0.15s ease, transform 0.15s ease;
}

.foot__social a:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

.foot__social svg {
  display: block;
}

.foot__address {
  font-style: normal;
}

/* --------------------------------------------------------------------------
   Phones
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  :root {
    --gutter: 24px;
  }

  .hero {
    display: block;
    padding-bottom: 40px;
  }

  .hero__top {
    padding: 24px 0 44px;
  }

  .wordmark {
    width: 166px;
  }

  .hero__horse {
    top: 14px;
    right: 10px;
    width: 96px;
    height: 124px;
  }

  /* The round thing peeks in from the left, just above the button. */
  .hero__circle {
    top: auto;
    bottom: 230px;
    left: -40px;
    width: 100px;
    height: 100px;
    z-index: 0;
  }

  /* Photo on the left bleeding off the edge, eyebrow stacked beside it. */
  .hero__left {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  .hero__photo {
    order: 1;
    flex: 0 0 54%;
    margin-left: calc(-1 * var(--gutter));
  }

  /* Taller crop, anchored right so the two guys stay in frame as in the
     mobile mockup. */
  .hero__photo img {
    aspect-ratio: 9 / 8;
    object-position: right center;
  }

  .eyebrow {
    order: 2;
    flex: 1 1 auto;
    margin: 0;
    padding-top: 10px;
    font-size: 13px;
    line-height: 1.5;
  }

  .hero__title {
    position: relative;
    z-index: 1;
    /* Climb over the bottom of the photo so the pixel word sits beside it. */
    margin-top: -3.25rem;
    font-size: clamp(2.8rem, 15.5vw, 4.25rem);
    /* Greedy wrapping here lands on the mockup's breaks:
       powered / group chat for / you & your / friends. */
    text-wrap: wrap;
  }

  .waitlist {
    width: 100%;
    margin-top: 40px;
    height: 72px;
    transform: none;
  }

  .waitlist[data-state="open"],
  .waitlist[data-state="sending"],
  .waitlist[data-state="error"] {
    width: 100%;
  }

  .waitlist__fields {
    padding-left: 22px;
  }

  /* 16px is the floor below which iOS Safari zooms the whole page on
     focus. Tighter tracking keeps more of a long address in view. */
  .waitlist__email {
    font-size: 16px;
    letter-spacing: 0.12em;
  }

  .waitlist__submit {
    padding: 0 22px;
  }

  .marquee {
    font-size: 14px;
  }

  .come {
    padding: 48px 24px 64px;
  }

  .come__title {
    font-size: 2.25rem;
    margin-bottom: 32px;
  }

  .come__art {
    margin-bottom: 48px;
  }

  .foot {
    display: block;
    text-align: center;
    padding: 64px 24px 56px;
  }

  .foot__amp {
    display: none;
  }

  .foot__legal a {
    display: block;
  }

  .foot__social {
    justify-content: center;
  }

  .foot__crescent {
    width: 110px;
    height: 100px;
    margin: 36px auto 0;
  }

  .foot__address {
    text-align: center;
    margin-top: 40px;
  }
}

/* --------------------------------------------------------------------------
   Legal pages (terms, privacy)
   Same palette and faces as the homepage, laid out for reading.
   -------------------------------------------------------------------------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px var(--gutter) 96px;
}

.legal .wordmark {
  margin: 0 auto 72px;
}

.legal h1 {
  font-family: var(--font-serif);
  font-weight: normal;
  font-size: 2.75rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal__updated {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--grey);
  margin-bottom: 48px;
}

.legal h2 {
  font-family: var(--font-serif);
  font-weight: normal;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 40px 0 12px;
}

.legal p,
.legal ul {
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 16px;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a:not(.wordmark) {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal a:not(.wordmark):hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .legal {
    padding-bottom: 64px;
  }

  .legal .wordmark {
    margin-bottom: 48px;
  }

  .legal h1 {
    font-size: 2.25rem;
  }

  .legal p,
  .legal ul {
    font-size: 16px;
  }
}
