/* ANTIREPUBLIX
   Look and layout live in this file.
   To recolour the site, change the variables below.
   Type is Syne + Instrument Sans (SIL Open Font License). Files are in /fonts. */

:root {
  --bg: #070707;
  --bg-raise: #101010;
  --ink: #f5f5f5;
  --muted: #c8c8c8;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.72);
  --display: "Syne", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: 1.15rem;
  --side: 3.5rem;
}

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/syne-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/syne-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  padding-left: var(--side);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

::selection {
  background: #fff;
  color: #070707;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: #fff;
  color: #070707;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  font-size: 0.9rem;
}

.skip:focus {
  top: 1rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--side);
  z-index: 70;
  width: calc(100% - var(--side));
  height: 2px;
  background: #fff;
  transform: scaleX(var(--scroll, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Side index, in the style of a vertical section rail.
   Number, a short rule, then the label, turned to run up the left edge. */

.brand {
  position: absolute;
  z-index: 2;
  top: 40%;
  left: calc(50vw - var(--side));
  width: clamp(11rem, 30vw, 18rem);
  translate: -50% -50%;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.side-nav {
  position: fixed;
  z-index: 40;
  left: 1.35rem;
  top: 50%;
  width: 0;
  height: 0;
}

.side-nav a {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-90deg);
  transform-origin: left center;
}

.side-nav a:nth-child(1) { top: -4.2rem; }
.side-nav a:nth-child(2) { top: 4.2rem; }

@media (max-height: 740px) {
  .brand {
    top: 34%;
    width: 9rem;
  }
}

.side-tick {
  display: block;
  width: 1.65rem;
  height: 1px;
  background: currentColor;
}

.side-nav a:hover,
.side-nav a[aria-current="true"] {
  color: #fff;
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding: 1.5rem var(--pad) max(1.75rem, env(safe-area-inset-bottom));
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    520px circle at var(--x, 72%) var(--y, 28%),
    rgba(255, 255, 255, 0.08),
    transparent 58%
  );
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.eyebrow,
.kicker {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.lede {
  margin: 1rem 0 0;
  max-width: 36ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.05rem;
  border: 1px solid #fff;
  background: #fff;
  color: #070707;
  text-decoration: none;
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn:hover {
  background: transparent;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: #fff;
  color: #070707;
  border-color: #fff;
}

/* Sections */

.section {
  padding: 4.5rem var(--pad);
  border-top: 1px solid var(--line);
  scroll-margin-top: 1.25rem;
}

.section-intro {
  max-width: 40rem;
}

.section h2,
.founder-name,
.brand-card h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.section h2 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.prose p {
  margin: 1rem 0 0;
  max-width: 42rem;
  color: var(--muted);
}

.principles {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.principles li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.principles h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.principles p {
  margin: 0;
  color: var(--muted);
}

/* Brands */

.brand-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
}

.brand-card {
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: transparent;
  text-decoration: none;
  color: inherit;
}

a.brand-card:hover,
a.brand-card:focus-visible {
  background: var(--bg-raise);
  border-color: #fff;
}

/* VILERA card: the store hero, scaled into the tile. CSS marquee only. */

.brand-card--vilera {
  position: relative;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

a.brand-card--vilera:hover,
a.brand-card--vilera:focus-visible {
  background: #000;
}

.brand-card--vilera .vcs {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

.brand-card--vilera .vcs__rows {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.brand-card--vilera .vcs__row {
  overflow: hidden;
  white-space: nowrap;
}

.brand-card--vilera .vcs__track {
  display: inline-flex;
  width: max-content;
  animation: vcs-l 60s linear infinite;
}

.brand-card--vilera .vcs__row:nth-child(even) .vcs__track {
  animation-name: vcs-r;
}

.brand-card--vilera .vcs__track img {
  height: 1.15rem;
  width: auto;
  margin-right: 1.75rem;
  display: block;
  max-width: none;
}

.brand-card--vilera .vcs__m {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 1;
  height: 92%;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.vilera-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.58) 0%,
    rgba(0, 0, 0, 0.34) 28%,
    rgba(0, 0, 0, 0.5) 52%,
    rgba(0, 0, 0, 0.84) 100%
  );
}

.brand-card--vilera > :not(.vcs):not(.vilera-scrim) {
  position: relative;
  z-index: 2;
}

.brand-card--vilera .brand-kind,
.brand-card--vilera .brand-copy,
.brand-card--vilera .brand-go {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

@keyframes vcs-l {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes vcs-r {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (max-width: 600px) {
  .brand-card--vilera .vcs__track {
    animation-duration: 45s;
  }

  .brand-card--vilera .vcs__track img {
    height: 0.95rem;
    margin-right: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-card--vilera .vcs__track {
    animation: none;
  }
}

/* SERPKA card: a slow blueprint grid under the wordmark. */

.brand-card--serpka {
  position: relative;
  overflow: hidden;
  background: #070b12;
  isolation: isolate;
}

.bp {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #070b12;
}

.bp__grid {
  position: absolute;
  inset: -45%;
  background-image:
    linear-gradient(rgba(130, 176, 214, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 176, 214, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(214, 230, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 230, 255, 0.28) 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px, 80px 80px, 80px 80px;
  animation: bp-pan 36s linear infinite;
}

.bp__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 22%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(170, 210, 255, 0.09),
    transparent
  );
  animation: bp-scan 9s linear infinite;
}

.bp__mark {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
}

.bp__mark::before,
.bp__mark::after {
  content: "";
  position: absolute;
  background: rgba(200, 222, 255, 0.4);
}

.bp__mark::before {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
}

.bp__mark::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.bp__mark--a { top: 18%; left: 12%; }
.bp__mark--b { right: 16%; bottom: 22%; }

.serpka-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 18, 0.42) 0%,
    rgba(7, 11, 18, 0.12) 42%,
    rgba(7, 11, 18, 0.55) 100%
  );
}

.brand-card--serpka > :not(.bp):not(.serpka-scrim) {
  position: relative;
  z-index: 2;
}

.brand-card--serpka .brand-kind,
.brand-card--serpka .brand-copy,
.brand-card--serpka .status {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

@keyframes bp-pan {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(80px, 80px, 0); }
}

@keyframes bp-scan {
  from { top: -22%; }
  to { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bp__grid,
  .bp__scan {
    animation: none;
  }
}

.brand-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.brand-index {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.brand-card h3 {
  margin: 1.6rem 0 0;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(1.7rem, 9vw, 2.75rem);
}

.brand-kind {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-card p:last-of-type,
.brand-copy {
  margin: 1rem 0 0;
  color: var(--muted);
}

.brand-go {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.arrow {
  display: inline-block;
}

a.brand-card:hover .arrow {
  transform: translate(3px, -3px);
}

.status {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Founder */

.founder-grid {
  display: grid;
  gap: 1.5rem;
}

.section .founder-name {
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.6rem);
}

.role {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.place {
  margin: 1.5rem 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Contact */

.contact-email {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 4.2vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #fff;
}

.contact-email:hover {
  background: #fff;
  color: #070707;
}

.contact-alt {
  margin: 1.5rem 0 0;
  color: var(--muted);
}

.contact-alt a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

.contact-alt a:hover {
  background: #fff;
  color: #070707;
  text-decoration: none;
}

/* Footer */

.site-footer {
  display: grid;
  gap: 0.85rem;
  padding: 1.75rem var(--pad) max(1.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.legal {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: #fff;
}

/* Missing page */

.missing {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding: 2rem var(--pad) 3rem;
}

.missing h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 6rem);
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.missing p {
  max-width: 28rem;
  color: var(--muted);
}

/* Desktop */

@media (min-width: 761px) {
  :root {
    --pad: 4rem;
  }

  .section {
    padding-top: 6.5rem;
    padding-bottom: 6.5rem;
  }
}

@media (min-width: 900px) {
  .principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .principles li {
    padding: 1.5rem 1.5rem 0 0;
    border-bottom: 0;
  }

  .principles li + li {
    padding-left: 1.5rem;
    border-left: 1px solid var(--line);
  }

  .brand-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .founder-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: end;
  }

}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .brand img {
    animation: spin 28s linear infinite;
  }

  .side-nav a,
  .btn,
  .brand-card,
  .arrow {
    transition:
      background-size 0.25s ease,
      background-color 0.2s ease,
      color 0.2s ease,
      border-color 0.2s ease,
      transform 0.2s ease,
      top 0.2s ease;
  }

  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
  }
}

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