/* shardloop.com. Tokens and base styles carried over from the first site. */

:root {
  --paper: #f3f0e9;
  --paper-2: #ebe7de;
  --surface: #fbfaf7;
  --ink: #17150f;
  --ink-2: #5f5a50;
  --ink-3: #8f897d;
  --line: rgba(23, 21, 15, 0.12);
  --line-2: rgba(23, 21, 15, 0.22);
  --code-bg: #f7f5f0;
  --focus: #1757b8;

  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 18px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1360px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
}

/* Light by default, whatever the system uses. Dark only when the visitor picks it with the header
   toggle (data-theme on <html>, restored before first paint in views/layout.tsx). */
:root[data-theme='dark'] {
  --paper: #12110f;
  --paper-2: #1b1a17;
  --surface: #1a1916;
  --ink: #f2eee6;
  --ink-2: #b2ac9f;
  --ink-3: #7c776d;
  --line: rgba(242, 238, 230, 0.1);
  --line-2: rgba(242, 238, 230, 0.2);
  --code-bg: #171613;
  --focus: #8fb4ff;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.btn:hover {
  border-color: var(--ink);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--ink) 86%, var(--paper));
}

.btn .meta {
  font-family: var(--mono);
  font-size: 11.5px;
  opacity: 0.65;
}



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

[hidden] {
  display: none !important;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--code-bg);
  font-family: var(--mono);
  font-size: 0.88em;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--ink-3);
}

.lead {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
}

em {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  width: auto;
  height: auto;
  padding: 8px 14px;
  clip: auto;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
}

/* Logo (views/layout.tsx) */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
}

.logo svg {
  display: block;
  width: auto;
  flex: none;
  overflow: visible;
}

.logo .mark path {
  transition: transform 0.5s var(--ease);
}

a:hover > .logo .mark path,
a:focus-visible > .logo .mark path {
  transform: translate(var(--drift));
}

/* Header and footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 17px;
  font-weight: 500;
}

.site-header nav a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s;
}

.site-header nav a:hover,
.site-header nav a[aria-current='page'] {
  color: var(--ink);
}

.theme {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: -10px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s;
}

.theme:hover {
  border-color: var(--line-2);
  color: var(--ink);
}

/* Show the icon of the theme you'd switch to. */
.theme .sun,
:root[data-theme='dark'] .theme .moon {
  display: none;
}

:root[data-theme='dark'] .theme .sun {
  display: block;
}

.site-footer {
  margin-top: 120px;
  border-top: 1px solid var(--line);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-top: 36px;
  padding-bottom: 44px;
  color: var(--ink-2);
  font-size: 14px;
}

.foot .brand {
  color: var(--ink);
}

.foot p {
  margin: 0;
}

.foot-link {
  color: var(--ink-2);
  text-underline-offset: 3px;
}

.foot-link:hover {
  color: var(--ink);
}

/* Home */
.hero {
  padding-top: clamp(48px, 9vw, 120px);
  padding-bottom: clamp(56px, 9vw, 110px);
}

.hero h1,
.about h1,
.notfound h1 {
  margin: 0;
  font-size: clamp(48px, 8.4vw, 116px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.lede {
  max-width: 520px;
  margin: 30px 0 0;
  color: var(--ink-2);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* The library */
.library {
  scroll-margin-top: 64px;
}

.toolbar {
  position: sticky;
  top: 64px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 calc(var(--gutter) * -1) 28px;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.heading h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.status {
  color: var(--ink-3);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chips a span {
  margin-left: 6px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.chips a:hover {
  border-color: var(--ink);
}

.chips a[aria-current='page'] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.chips a[aria-current='page'] span {
  color: inherit;
  opacity: 0.6;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 10px 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-3);
  transition: border-color 0.2s;
}

.search:focus-within {
  border-color: var(--ink);
}

.search input {
  width: 260px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

kbd {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 44px 28px;
}

.empty {
  padding: 80px 0;
  color: var(--ink-2);
  text-align: center;
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card .stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  isolation: isolate;
  transition: box-shadow 0.3s, transform 0.4s var(--ease);
}

.card:hover .stage {
  box-shadow: inset 0 0 0 1px var(--line), 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent), 0 18px 40px -18px color-mix(in srgb, var(--accent) 60%, transparent);
}

.card .stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* reels are often vertical: show them whole, on the card's own background */
  transition: transform 0.6s var(--ease);
}

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

/* The play badge: cards show a still; the video plays in the overlay. */
.card .play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #17150f;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--ease), background 0.2s, color 0.2s;
}

.card .play svg {
  margin-left: 2px;
}

.card:hover .play {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
}

.card .count {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #2a2720;
  font-size: 10.5px;
}

/* Posters keep their own shape (usually portrait), so the grid is denser. */
.grid.posters {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  align-items: start;
}

.card.poster .stage {
  aspect-ratio: var(--ratio, 3 / 4);
}

.card.poster .stage img {
  object-fit: cover;
}

.card footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px;
}

.card .idx {
  align-self: flex-start;
  padding-top: 4px;
  color: var(--ink-3);
}

.card .title {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.card .name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
}

/* The name link covers the whole card, so clicking anywhere opens it. */
.card .name::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: var(--radius);
}

.card .name:focus-visible {
  outline: none;
}

.card:has(.name:focus-visible) .stage {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.card .arrow {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.card:hover .arrow,
.card .name:focus-visible .arrow {
  opacity: 1;
  transform: none;
}

.card .cat {
  color: var(--ink-3);
  font-size: 14px;
}

.card .dl {
  position: relative;
  z-index: 4; /* above the card-wide link */
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.card .dl:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* The overlay (views/site.tsx, site.js): a box over the dimmed page, always inside the window.
   The media fills what's left beside (or above, on phones) the info panel; only a long prompt scrolls,
   inside its own box. */
.viewer {
  width: min(1180px, calc(100vw - 48px));
  max-width: none;
  height: min(780px, calc(100dvh - 48px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.55);
}

/* The page behind stays put while the overlay is open. */
html:has(.viewer[open]) {
  overflow: hidden;
}

.viewer::backdrop {
  background: rgba(14, 12, 9, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.viewer[open] {
  animation: rise 0.35s var(--ease);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.viewer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  height: 100%;
}

.viewer-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  background: var(--bg);
}

.viewer-media video,
.viewer-media .main {
  display: block;
  flex: 0 1 auto;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.45);
}

.viewer-media:has(.thumbs) {
  flex-direction: row;
  gap: 16px;
}

/* A poster's other images: a column down the left of the main one. */
.viewer-media .thumbs {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 8px;
  max-height: 100%;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: none;
}

.viewer-media .thumbs button {
  flex: none;
  width: 64px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  background: none;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.viewer-media .thumbs button[aria-pressed='true'] {
  border-color: #fff;
  opacity: 1;
}

.viewer-media .thumbs img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.viewer-info {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 64px 28px 28px;
  border-left: 1px solid var(--line);
}

.viewer-info .eyebrow {
  margin-bottom: 10px;
}

.viewer-info h2 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.viewer-desc {
  display: -webkit-box;
  margin: 12px 0 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.tags:empty {
  display: none;
}

.tags li {
  padding: 5px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 10.5px;
}

.viewer-get {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
}

.btn.big {
  justify-content: center;
  height: 54px;
  padding: 0 24px;
  font-size: 16px;
}

.btn.small {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.fine {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
}

.viewer-prompt {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin-top: 20px;
}

.prompt-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink-3);
}

.viewer-prompt pre {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  border-radius: 12px;
  background: var(--code-bg);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.viewer-nav {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.round {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.round:hover {
  border-color: var(--ink);
}

.round:active {
  transform: scale(0.94);
}

/* Phones and narrow windows: media above, info below, still all inside the window. */
@media (max-width: 820px) {
  .viewer {
    width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
  }
  .viewer-inner {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .viewer-media {
    padding: 56px 16px 16px;
  }
  .viewer-info {
    max-height: 48dvh;
    padding: 18px 18px 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .viewer-desc {
    -webkit-line-clamp: 2;
  }
  .viewer-get {
    padding-top: 16px;
  }
  .viewer-prompt pre {
    min-height: 80px;
  }
}

/* Short windows: tighter, and the description gives way first. */
@media (max-height: 560px) {
  .viewer-info {
    padding-top: 56px;
  }
  .viewer-desc,
  .tags {
    display: none;
  }
}

/* About */
.about {
  padding-top: clamp(48px, 8vw, 104px);
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 40px;
  margin-top: 72px;
}

.cols h2,
.contact h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cols p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.65;
}

/* Contact (About page) */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  margin-top: 112px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.contact h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.contact .lead {
  margin-top: 20px;
}

.label {
  color: var(--ink-3);
}

.mail-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 36px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mail-card .label {
  flex-basis: 100%;
}

.mail-card .address {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-card .address:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.fine-left {
  margin: 14px 0 0;
  color: var(--ink-3);
  font-size: 14px;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 20px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  box-shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.35);
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.topics legend {
  margin-bottom: 12px;
  padding: 0;
}

.topic input {
  position: absolute;
  opacity: 0;
}

.topic span {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.topic span:hover {
  border-color: var(--ink);
}

.topic input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.topic input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.input input,
.input textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
}

.input input:focus,
.input textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent);
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
}

.form-error {
  flex: 1;
  margin: 0;
  color: #c2410c;
  font-size: 14px;
}

.contact-form .btn:disabled {
  opacity: 0.6;
}

/* After sending, the thank-you covers the form. */
.contact-form.done > :not(.sent) {
  visibility: hidden;
}

.sent {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  animation: rise 0.4s var(--ease);
}

.sent-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 0 6px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 24px;
}

.sent h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sent p {
  margin: 0 0 10px;
  color: var(--ink-2);
}

@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .row-2 {
    grid-template-columns: 1fr;
  }
  .send .btn {
    width: 100%;
    justify-content: center;
  }
}

/* 404 */
.notfound {
  padding-top: clamp(64px, 12vw, 160px);
}

.notfound .btn {
  margin-top: 32px;
}

@media (max-width: 640px) {
  .site-header nav {
    gap: 18px;
    font-size: 16px;
  }
  .theme {
    margin-left: -4px;
  }
  .toolbar {
    position: static;
  }
  .controls,
  .search {
    width: 100%;
  }
  .search input {
    flex: 1;
    width: auto;
    min-width: 0;
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .chips a {
    flex: none;
  }
}

@media (max-width: 420px) {
  .bar .brand .word {
    display: none;
  }
}
