/* ==========================================================================
   Fonts
   ========================================================================== */

@font-face {
  font-family: 'Open Runde';
  src: url('/fonts/OpenRunde-Regular.woff2') format('woff2'),
    url('/fonts/OpenRunde-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Runde';
  src: url('/fonts/OpenRunde-Medium.woff2') format('woff2'),
    url('/fonts/OpenRunde-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Runde';
  src: url('/fonts/OpenRunde-Bold.woff2') format('woff2'),
    url('/fonts/OpenRunde-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

/* ==========================================================================
   Variables
   ========================================================================== */

:root {
  --color-background: #fff;
  --color-accent: #069a3f;
  --color-text: #787878;
  --color-link-muted: #333333;
}

/* ==========================================================================
   Base
   ========================================================================== */

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Open Runde', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.page {
  position: relative;
  width: 100%;
  max-width: 400px;
  text-align: left;
}

.logo {
  position: absolute;
  bottom: -8%;
  right: 10%;
  width: 72px;
  height: auto;
  z-index: 1;
  transform-origin: bottom right;
  opacity: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/* Visually hidden, screen reader only */
h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

p {
  line-height: 1.5;
  text-wrap: pretty;
}

p+p {
  margin-top: 16px;
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.link-plots {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  padding: 15px;
  margin: -15px;
}

.link-plots:hover {
  text-decoration: none;
}

.link-plots-name {
  color: var(--color-accent);
}

.link-plots .badge {
  display: inline-block;
  text-decoration: none;
}

.link-plots:hover .badge {
  background: var(--color-accent);
  color: var(--color-background);
  border-color: var(--color-accent);
}

.link-muted {
  color: var(--color-link-muted);
}

/* ==========================================================================
   Components
   ========================================================================== */

.badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  margin-left: 4px;
  margin-right: 2px;
  border-radius: 16px;
  vertical-align: middle;
  border: 1px solid currentColor;
}

.badge--beta {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.link-preview {
  position: fixed;
  width: 176px;
  height: 176px;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  display: none;
  border-radius: 6px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1.5px #b8b8b8;
}

.link-preview-sway {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.link-preview-content {
  position: relative;
  width: 176px;
  height: 176px;
}

.link-preview-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.link-preview-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
}

.link-preview-cell {
  --cell-size: 54px;
  position: relative;
  width: var(--cell-size);
  height: var(--cell-size);
  overflow: hidden;
  clip-path: inset(2px);
}

.link-preview-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-background);
  background: var(--color-accent);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  margin: auto;
}

.link-preview-plant {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: calc((var(--cell-size) - 36px) / 2);
  transform-origin: bottom center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Mobile */
@media (max-width: 768px) {
  body {
    align-items: flex-start;
    padding: 40px 24px 24px;
  }

  .logo {
    position: fixed;
    bottom: 40px;
    left: 50%;
    right: auto;
    margin-left: -36px;
  }
}

/* Desktop */
@media (min-width: 769px) {
  body {
    font-size: 14px;
    align-items: flex-start;
    padding-top: 20vh;
  }

  .logo {
    bottom: -40%;
    right: 25%;
    top: auto;
    left: auto;
    margin-left: 0;
    transform-origin: bottom right;
  }
}