/* BUTTONS */
button,
.btn {
  border-radius: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.55rem 1rem;
  border-radius: 0;
  border: 2px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition:
    transform 90ms ease-out,
    background-color 120ms ease-out,
    color 120ms ease-out,
    box-shadow 120ms ease-out,
    border-color 120ms ease-out;
}

button:hover,
.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

button:active,
.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.16;
  transform: scale(0);
  pointer-events: none;
  width: var(--ripple-size, 0);
  height: var(--ripple-size, 0);
  animation: ripple-animation 500ms ease-out;
}

@keyframes ripple-animation {
  0% {
    transform: scale(0);
    opacity: 0.2;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Filled button */
.btn-filled {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--elev-1);
}

.btn-filled:hover:not(:disabled) {
  box-shadow: var(--elev-2);
}

.btn-filled:active:not(:disabled) {
  background: color-mix(in srgb, var(--on-primary) 15%, var(--primary));
  box-shadow: var(--elev-1);
}

/* Tonal button */
.btn-tonal {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  box-shadow: var(--elev-0);
}

.btn-tonal:hover:not(:disabled) {
  background: color-mix(in srgb, var(--on-secondary-container) 8%, var(--secondary-container));
  box-shadow: var(--elev-1);
}

.btn-tonal:active:not(:disabled) {
  background: color-mix(in srgb, var(--on-secondary-container) 12%, var(--secondary-container));
  box-shadow: var(--elev-0);
}

/* Outlined button */
.btn-outlined {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--outline);
  box-shadow: none;
}

.btn-outlined:hover:not(:disabled) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.btn-outlined:active:not(:disabled) {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Text button */
.btn-text {
  background: transparent;
  color: var(--primary);
  padding-inline: 0.75rem;
}

.btn-text:hover:not(:disabled) {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.btn-text:active:not(:disabled) {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Tertiary button */
.btn-tertiary {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
  box-shadow: var(--elev-0);
}

.btn-tertiary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--on-tertiary-container) 8%, var(--tertiary-container));
  box-shadow: var(--elev-1);
}

.btn-tertiary:active:not(:disabled) {
  background: color-mix(in srgb, var(--on-tertiary-container) 12%, var(--tertiary-container));
  box-shadow: var(--elev-0);
}

/* Icon button tertiary */
.icon-button-tertiary {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}

.icon-button-tertiary:hover {
  background: color-mix(in srgb, var(--on-tertiary-container) 8%, var(--tertiary-container));
}

/* CARDS */
\.card {
  border-radius: 0;
  padding: var(--space-5) var(--space-6);
  background: var(--surface);
  color: var(--on-surface);
  border: 2px solid var(--outline);
  box-shadow: none;
  transition: transform 140ms ease-out, box-shadow 140ms ease-out;
}


.card:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--outline);
}


.card-filled {
  background: var(--primary-container);
  color: var(--on-primary-container);
  box-shadow: var(--elev-0);
}

.card-outlined {
  background: var(--surface);
  border: 2px dashed color-mix(in srgb, var(--ink) 55%, var(--paper));
  color: var(--on-surface);
  box-shadow: var(--elev-0);
}

.card-tertiary {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
  box-shadow: var(--elev-0);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  position: relative;
  z-index: auto;
}

.card-header > :last-child {
  min-width: 0;
  flex: 1;
}

.card-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary);
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.card-title {
  margin: 0;
  font-family: var(--display);
  font-size: calc(var(--type-scale-base) * 1.125);
  line-height: 1.2;
  letter-spacing: var(--track-tight);
}

.card-subtitle {
  font-size: calc(var(--type-scale-base) * 0.875);
  line-height: 1.25;
  color: var(--on-surface-variant);
  margin-top: 0.125rem;
}

.card-media {
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.card-media img {
  display: block;
  width: 100%;
  height: auto;
}

.card-supporting-text {
  font-size: calc(var(--type-scale-base) * 0.875);
  line-height: 1.45;
  color: var(--on-surface-variant);
  overflow-wrap: anywhere;
}

.card-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 4px;
  border-radius: 1rem;
}

/* FAB */
.fab {
  width: 56px;
  height: 56px;
  border-radius: 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--primary-container);
  color: var(--on-primary-container);

  box-shadow: var(--elev-3);
  transition: box-shadow 120ms ease-out;
}

.fab:hover {
  box-shadow: var(--elev-4);
}

.fab-small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.fab-secondary {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
  box-shadow: var(--elev-3);
}

.fab-secondary:hover {
  box-shadow: var(--elev-4);
}

.fab-fixed {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 60;
}

.fab-offset-right {
  right: 5rem;
}

/* SNACKBAR */
.snackbar {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  box-shadow: var(--elev-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
  font-size: calc(var(--type-scale-base) * 0.875);
  z-index: 70;
}

.snackbar.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-4px);
}

/* CHIPS */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.25rem 0.75rem;
  border-radius: 999px;

  background: var(--paper);
  border: 2px solid var(--outline);
  color: var(--on-surface);

  cursor: pointer;
  transition:
    background-color 120ms ease-out,
    border-color 120ms ease-out;
}

.chip:hover {
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.chip-selected {
  background: var(--secondary-container);
  border-color: var(--secondary-container);
  color: var(--on-secondary-container);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* TEXT FIELDS */
.text-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.text-field-label {
  color: var(--on-surface-variant);
}

.text-field-input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--outline);

  background: var(--surface);
  color: var(--on-surface);

  outline: none;
  transition:
    border-color 120ms ease-out,
    box-shadow 120ms ease-out;
}

.text-field-input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.8;
}

.text-field-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 40%, transparent);
}

.text-field--error .text-field-input {
  border-color: var(--error);
}

.text-field-helper {
  color: var(--on-surface-variant);
}

.text-field--error .text-field-helper {
  color: var(--error);
}

/* SECTION HEADERS */
.section-header {
  margin-bottom: 1.5rem;
}

.section-eyebrow {
  text-transform: uppercase;
  font-size: calc(var(--type-scale-base) * 0.75);
  letter-spacing: 0.12em;
  color: var(--on-surface-variant);
  margin-bottom: 0.25rem;
}

.section-title {
  margin: 0;
}

.section-subtitle {
  margin-top: 0.25rem;
  margin-bottom: 0;
  font-size: calc(var(--type-scale-base) * 0.875);
  line-height: 1.25rem;
  color: var(--on-surface-variant);
}

/* TABS */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--outline-variant);
}

.tab {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: calc(var(--type-scale-base) * 0.8125);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--on-surface-variant);
  transition:
    background-color 120ms ease-out,
    color 120ms ease-out,
    border-color 120ms ease-out;
}

.tab:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--on-surface);
}

.tab--active {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  border-color: var(--secondary-container);
}

/* ICONS */
.icon-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.icon-list-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding-block: 0.5rem;
}

.icon-list-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--type-scale-base) * 0.875);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  flex-shrink: 0;
}

.icon-list-text {
  font-size: calc(var(--type-scale-base) * 0.875);
  line-height: 1.4rem;
}

/* GALLERY */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(var(--space-2), 2.5vw, var(--space-4));
  margin-top: var(--space-4);
}

.gallery > .figure-link {
  grid-column: span 12;
}

@media (min-width: 700px) {
  .gallery > .figure-link { grid-column: span 6; }
}

@media (min-width: 1024px) {
  .gallery > .figure-link { grid-column: span 4; }
}

.gallery > figure {
  grid-column: span 12;
}
@media (min-width: 700px) { .gallery > figure { grid-column: span 6; } }
@media (min-width: 1024px) { .gallery > figure { grid-column: span 4; } }

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--scrim) 85%, transparent);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: var(--scrim);
}

.lightbox figcaption {
  color: var(--on-scrim);
  font-size: calc(var(--type-scale-base) * 0.9);
  text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: color-mix(in srgb, var(--scrim) 60%, transparent);
  color: var(--on-scrim);
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: calc(var(--type-scale-base) * 1.25);
  top: 50%;
  transform: translateY(-50%);
  right: var(--space-3);
}

.lightbox-close {
  top: var(--space-3);
  right: var(--space-3);
}

.lightbox-prev,
.lightbox-prev { left: var(--space-3); }
.lightbox button:hover {
  background: color-mix(in srgb, var(--on-scrim) 15%, transparent);
}

.lightbox-trigger figure {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: 18px;
  padding: var(--space-2);
  transition: transform .18s ease, box-shadow .18s ease;
}

.lightbox-trigger:hover figure {
  transform: translateY(-2px);
  box-shadow: var(--elev-2);
}

.lightbox-trigger img {
  border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox * {
    transition: none !important;
  }
}

/* EMBED CARD */
.embed-card {
  padding: var(--space-3);
}

.embed-card iframe {
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 12px;
  display: block;
  background: var(--surface-container);
}

.embed-meta {
  margin-bottom: var(--space-2);
  color: var(--on-surface-variant);
  font-size: calc(var(--type-scale-base) * 0.875);
  line-height: 1.4;
}


/* FUTURISTIC ACCENTS */
.card,
.post-card,
.zine-card {
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 8%, transparent), transparent 55%), var(--fx-noise);
  background-size: auto, var(--fx-noise-size);
  background-blend-mode: screen, normal;
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-2) 70%, transparent);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-2) 18%, transparent);
}


/* Related posts */
.related-posts-section{
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.related-posts-title{
  margin: 0 0 var(--space-4);
  font-size: var(--step-2);
  letter-spacing: 0.01em;
}

.related-post__title{
  margin: 0 0 var(--space-2);
  font-size: var(--step-1);
}

.related-post__title a{
  text-decoration: none;
}

.related-post__title a:hover{
  text-decoration: underline;
}

.related-post__meta{
  margin: 0;
  opacity: 0.85;
  font-size: var(--step--1);
}
