/* Fonts */
@font-face {
  font-family: "CardenioModernBold";
  src: url("assets/fonts/cardenio_modern/CardenioModern-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CardenioModern";
  src: url("assets/fonts/cardenio_modern/CardenioModern-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ThirstyRoughLt";
  src: url("assets/fonts/ThirstyRoughLt/WebFonts/579fb640d75e2ef6483f0fddb2dcf915.eot");
  src:
    url("assets/fonts/ThirstyRoughLt/WebFonts/579fb640d75e2ef6483f0fddb2dcf915.eot?#iefix") format("embedded-opentype"),
    url("assets/fonts/ThirstyRoughLt/WebFonts/579fb640d75e2ef6483f0fddb2dcf915.woff") format("woff"),
    url("assets/fonts/ThirstyRoughLt/WebFonts/579fb640d75e2ef6483f0fddb2dcf915.woff2") format("woff2"),
    url("assets/fonts/ThirstyRoughLt/WebFonts/579fb640d75e2ef6483f0fddb2dcf915.ttf") format("truetype"),
    url("assets/fonts/ThirstyRoughLt/WebFonts/579fb640d75e2ef6483f0fddb2dcf915.svg#ThirstyRoughLt") format("svg");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "OpenSans";
  src: url("assets/fonts/OpenSans/OpenSans-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: #0b1220;
  background-color: #05060c;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.2);
  --accent: #72f1e1;
  --text-muted: rgb(159, 176, 211);
  --shadow: 0 25px 65px rgba(5, 6, 12, 0.65);
}

/* Base + layout */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  /* background: radial-gradient(circle at 20% -10%, rgba(114, 241, 225, 0.3), transparent 55%),
    radial-gradient(circle at 100% 30%, rgba(255, 255, 255, 0.12), transparent 40%),
    #05060c; */
  color: #e7ebef;
}

.glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(114, 241, 225, 0.25), transparent 45%);
  pointer-events: none;
  z-index: -1;
}

.language-picker {
  display: flex;
  flex-direction: row;
  align-self: flex-start;
}

.language-picker select {
  font-family: "CardenioModern", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.45rem 1.4rem 0.45rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(114, 241, 225, 0.5);
  background-color: rgba(114, 241, 225, 0.2);
  color: #f7fbff;
  box-shadow: 0 10px 30px rgba(114, 241, 225, 0.35);
  appearance: none;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
  background-image:
    linear-gradient(45deg, transparent 50%, #05060c 50%),
    linear-gradient(-45deg, transparent 50%, #05060c 50%);
  background-repeat: no-repeat;
  background-position: calc(100% - 1rem) 50%, calc(100% - 1rem) 50%;
  background-size: 6px 6px;
  max-width: 280px;
  width: min(100%, 280px);
}

.language-picker select:hover,
.language-picker select:focus-visible {
  background-color: rgba(114, 241, 225, 0.65);
  color: #05060c;
  border-color: rgba(114, 241, 225, 0.95);
  box-shadow: 0 16px 40px rgba(114, 241, 225, 0.55);
  outline: none;
  transform: translateY(-1px);
}

.language-picker select option {
  background: #1d1f22;
  color: #e7ebef;
}

.title {
  align-self: center;
}
 
main.page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem clamp(1.2rem, 4vw, 2.5rem) 5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-sizing: border-box;
}

.hero {
  font-family: "OpenSans", sans-serif;
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1.75rem; 
  border-radius: 26px;
  box-shadow: var(--shadow);
  align-items: center;
  gap: 1rem;
}

.hero-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap-reverse;
  gap: 0.75rem;
  justify-content: space-between;
  padding-bottom: 1.75rem;
  align-items: flex-start;
}

.pinned-section {
  font-family: "CardenioModern", serif;
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.pinned-section h2 {
  font-family: "CardenioModernBold", serif;
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pin-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pin-empty {
  font-family: "OpenSans", sans-serif;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.pin-chip {
  border: 1px solid rgba(114, 241, 225, 0.35);
  background: rgba(114, 241, 225, 0.08);
  border-radius: 18px;
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pin-chip:focus-visible,
.pin-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(114, 241, 225, 0.8);
}

.pin-chip-label {
  font-weight: 700;
  letter-spacing: 0.2em;
}

.pin-chip-english {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

.hero-actions {
  gap: 1rem;
}

.hero h1 {
  font-family: "OpenSans", sans-serif;
  margin: 0.5rem 0;
  font-size: clamp(1.1rem, 2vw, 2.25rem);
  letter-spacing: -0.03em;
}

.hero .tag {
  font-family: "CardenioModern", sans-serif;
  font-size: 1.95rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  font-weight: bold;
  margin: 0;
}


.hero .lede {
  margin: 0;
  color: var(--text-muted);
  max-width: 40rem;
}

.search {
  background: var(--panel);
  border-radius: 26px;
  
}

.search-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  transition: border 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.search-field:focus-within {
  border-color: rgba(114, 241, 225, 0.85);
  box-shadow: inset 0 0 0 1px rgba(114, 241, 225, 0.45);
  transform: translateY(-1px);
}

.search-icon {
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.search-icon svg {
  width: 100%;
  height: 100%;
}

.search-field input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 500;
  min-width: 0;
  letter-spacing: -0.01em;
  outline: none;
}

.search-field input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
}

.hint {
  font-family: "OpenSans", sans-serif;
  margin: auto; 
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.results {
  display: grid;
  gap: 1rem;
}

.results-heading {
  padding: 0.6rem 1.2rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card {
  padding: 1.5rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2fr;
  gap: 1rem;
  align-items: start;
}

.card h2 {
  margin: 0;
  font-size: 3.5rem;
}

.card .meta {
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0px;
}

.translation-missing {
  margin: 0 0 0.4rem 0;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
}

.card-body h2,
.card-body .meta {
  font-family: "CardenioModern", sans-serif;
}

.card .extract {
  margin-top: 0px;
  font-size: 1rem;
  font-family: "OpenSans", sans-serif;
}

.card h3 {
  margin: 0;
  font-family: "ThirstyRoughLt", Arial, Helvetica, sans-serif;
  font-weight: 200;
  font-size: 1.6rem;;
}

.card .translation {
  margin-top: 0.8rem;
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.results .status {
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.card .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card .figure-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}


.card figure {
  width: 100%;
  margin: 0 auto;
  border-radius: 18px;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  font-family: "ThirstyRoughLt", Arial, Helvetica, sans-serif;
  max-width: 280px;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.35), rgba(6, 8, 16, 0.9));
}

.card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card figure figcaption {
  margin: 0;
  padding: 0.25rem 0.9rem;
  font-size: 1rem;
  color: #f7fbff;
  background: linear-gradient(180deg, rgba(3, 5, 10, 0.5) 0%, rgba(3, 5, 10, 0.9) 100%);
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  text-align: center;
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.card figure figcaption strong {
  display: block;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
}

.card figure.no-image img {
  display: none;
}

.card-figure-rank {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: rgba(0,0,0, 0.5);
  border-radius: 999px;
  color: #f7fbff;
  padding: 0.2rem 0.65rem 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  z-index: 1;
}

.card-figure-rank span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.figure-link {
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.figure-link:hover figcaption,
.figure-link:focus-visible figcaption {
  color: #f7fbff;
}

.figure-link figcaption::after {
  content: '';
  position: absolute;
  left: 0px;
  right: 0px;
  top: 0px;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.figure-link:hover figcaption::after,
.figure-link:focus-visible figcaption::after {
  transform: scaleX(1);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  padding-bottom: 4rem;
}

.card-actions {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  z-index: 1;
}

.card-action-control {
  font-family: "CardenioModern", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(114, 241, 225, 0.5);
  background: rgba(114, 241, 225, 0.2);
  color: #f7fbff;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(114, 241, 225, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
}

.card-action-control:hover,
.card-action-control:focus-visible {
  background: rgba(114, 241, 225, 0.65);
  color: #05060c;
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(114, 241, 225, 0.55);
}

.pin-button.is-pinned {
  background: rgba(114, 241, 225, 0.9);
  color: #05060c;
  border-color: rgba(114, 241, 225, 0.95);
  box-shadow: 0 14px 35px rgba(114, 241, 225, 0.5);
}

.page-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2rem auto 3rem;
  padding: 1.25rem 1.5rem;
  width: min(920px, 92vw);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.page-footer a {
  color: #72f1e1;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s ease;
}

.page-footer a:hover,
.page-footer a:focus-visible {
  border-color: #e7ebef;
}

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

@media (max-width: 700px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .card {
    grid-template-columns: 1fr;
  }
  .card-actions {
    position: static;
    margin-top: 1rem;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  main.page {
    width: 100%;
    max-width: 960px;
    padding: 3rem clamp(1rem, 5vw, 1.75rem) 4rem;
  }

  .hero-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .card,
  .results-heading {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .search-panel {
    border-radius: 22px;
  }

  .card-actions {
    position: static;
    margin-top: 0.75rem;
    justify-content: flex-start;
  }

  .card-body {
    padding-bottom: 2.25rem;
  }

  .language-picker {
    width: 100%;
    justify-content: flex-start;
  }

  .language-picker select {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-footer {
    width: 100%;
    padding: 1rem 1rem 1.25rem;
    letter-spacing: 0.15em;
    text-align: left;
    align-items: flex-start;
  }

  .page-footer p {
    margin: 0;
  }
}
