/* ============================================================
  index.css.scss
  ------------------------------------------------------------
  - Neutral black & white baseline
  - System fonts only
  - Bootstrap-first buttons
  - Minimal decoration
============================================================ */
@font-face {
  font-family: "Hubot Sans Condensed";
  src: url("./HubotSansCondensed-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --main-bg: #020403;
  --main-bg2: #080b0b;
  --body-text: #f7f1df;
  --muted-text: #c8c0aa;
  --accent-color: #d9aa3f;
  --accent-hover: #f2c866;
  --border-color: #8c7445;
  --overlay-bg: rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100svh;
  background: var(--main-bg);
  color: var(--body-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

#main {
  min-height: 100svh;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

#app {
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

#app.inited {
  opacity: 1;
  visibility: visible;
}

#app.is-processing {
  min-height: 100svh;
}

#app.is-processing .result-section {
  flex: 0 0 auto;
}

#app.is-processing #footer {
  margin-top: auto;
}

#app.inited + #loading-spinner {
  display: none !important;
}

#loading-spinner {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 4, 3, 0.88);
  z-index: 9999;
}

header {
  padding: 18px 0 10px;
  background: #020403;
}
header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header .container h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--body-text);
  font-family: "Hubot Sans Condensed", Impact, "Arial Narrow", sans-serif;
}

p,
li {
  color: var(--body-text);
  font-family: inherit;
}

h1 {
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.25rem);
  line-height: 1.15;
  font-weight: 400;
  white-space: nowrap;
  text-align: center;
  margin: 0;
}

h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem);
  line-height: 1.25;
  font-weight: 400;
  margin: 0.8rem 0 0.4rem;
}

h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.3;
  font-weight: 400;
  margin: 0.6rem 0 0.35rem;
}

h4 {
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 400;
  margin: 1rem 0 0.5rem;
}

.container {
  margin: 1rem auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.logo {
  height: 40px;
}

.logo img {
  max-width: 100%;
  max-height: 100%;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}

.logo svg {
  height: 40px;
}

svg g path,
svg g rect {
  fill: var(--accent-color);
}

.section {
  flex: 1 1 auto;
  padding: 8px 0 24px;
}

.result-section {
  display: flex;
  flex-direction: column;
}

.result-section > .container {
  width: 100%;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-intro {
  text-align: left;
  color: var(--muted-text);
  margin: 0;
  max-width: 38rem;
}

.bond-hero {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 0.35rem !important;
}

.bond-poster-hero {
  position: relative;
  overflow: hidden;
}

.bond-poster-hero > img {
  display: block;
  width: 100%;
  height: min(82svh, 740px);
  min-height: 560px;
  object-fit: cover;
  object-position: center 18%;
}

.bond-poster-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0.9) 82%, rgba(0, 0, 0, 0.98) 100%);
  pointer-events: none;
}

.bond-poster-content {
  position: absolute;
  left: max(1rem, 7%);
  right: max(1rem, 7%);
  bottom: max(0.9rem, 5%);
  z-index: 1;
  display: grid;
  gap: clamp(0.8rem, 2.5vw, 1.25rem);
  text-align: center;
}

.bond-hero-copy {
  display: grid;
  gap: 0.9rem;
  text-align: center;
}

.bond-hero-title {
  display: grid;
  justify-content: center;
  justify-items: start;
  gap: 0.04em;
  margin: 0;
  color: var(--body-text);
  font-family: "Hubot Sans Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(2.4rem, 12vw, 5.2rem);
  line-height: 0.78;
  font-weight: 400;
  text-transform: uppercase;
}

.bond-title-line {
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.18em;
  white-space: nowrap;
}

.bond-title-line img {
  /* width: clamp(4rem, 20vw, 7.5rem); */
  height: clamp(2.4rem, 12vw, 5.2rem);
  transform: translateY(-0.02em);
}

.bond-hero-kicker {
  margin: 0.75rem 0 0;
  color: var(--accent-color);
  font-size: clamp(0.76rem, 2.5vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bond-hero-copy .hero-intro {
  max-width: 24rem;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(0.9rem, 2.7vw, 1.05rem);
  line-height: 1.45;
}

.bond-hero-copy .btn {
  min-height: 48px;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
  white-space: normal;
}

.bond-feature-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.bond-feature {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--muted-text);
}

.bond-feature i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--accent-color);
  border-radius: var(--radius-sm);
  color: var(--accent-color);
  font-size: 1.15rem;
}

.bond-feature strong {
  color: var(--body-text);
}

.section-copy,
.small {
  color: var(--muted-text);
  line-height: 1.65;
}

.sponsor {
  text-align: left;
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--muted-text);
}

.sponsor-content {
  padding: 1rem;
  color: var(--body-text);
  background-color: var(--main-bg2);
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.waiting-state {
  min-height: auto;
}

.waiting-tagline {
  display: grid;
  justify-items: center;
  gap: 0.48rem;
  margin: 2rem auto 0;
  color: var(--body-text);
  font-family: "Hubot Sans Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(2rem, 10vw, 4rem);
  line-height: 1.25;
  text-transform: uppercase;
}

.waiting-tagline img {
  width: clamp(5.8rem, 30vw, 10rem);
  height: auto;
}

.hero-card,
.panel,
.status-card {
  background: var(--main-bg2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: none;
}

.file-input {
  cursor: pointer;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: #050808;
  color: var(--body-text);
}

.file-input:hover {
  border-color: var(--accent-color);
  background-color: #090d0d;
}

.file-input.dragging {
  border-color: var(--accent-color);
  background: #0c100f;
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--accent-color);
}

.preview-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.delete-image {
  position: absolute;
  right: 10px;
  top: 10px;
  color: var(--accent-hover);
  font-size: 1.6rem;
  line-height: 1;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
}

.result-success {
  display: grid;
  gap: 1rem;
}

.result-header {
  display: grid;
  gap: 0.25rem;
  text-align: center;
}

.result-header h2 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 3.6rem);
  line-height: 0.95;
}

.result-ready-title {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.22em;
  white-space: nowrap;
}

.result-ready-title img {
  width: clamp(4.2rem, 18vw, 7.2rem);
  height: auto;
  transform: translateY(-0.02em);
}

.result-card {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.46);
}

.image-shell {
  overflow: hidden;
  margin-top: 0;
  background: #000000;
}

.image-shell img {
  display: block;
  width: 100%;
  max-height: min(58svh, 620px);
  object-fit: contain;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(217, 170, 63, 0.35);
}

.result-actions .btn,
.result-secondary-actions .btn {
  min-height: 48px;
}

.result-tip {
  color: var(--muted-text);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.45;
}

.result-secondary-actions {
  margin-top: 0.35rem;
}

form {
  margin-bottom: 1rem;
}

.form-label,
.form-check-label {
  font-size: 1rem;
}

.btn {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-weight: 600;
  box-shadow: none;
  transition: border-color 0.15s ease, color 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #f2c866;
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: #ffe08a;
  --bs-btn-color: #090703;
  --bs-btn-hover-color: #090703;
  --bs-btn-active-bg: transparent;
  --bs-btn-active-border-color: #bf8f2a;
  background: linear-gradient(180deg, #ffe690 0%, #e4b749 42%, #b98220 100%);
  border-color: #f2c866;
  color: #090703;
  text-shadow: 0 1px 0 rgba(255, 238, 172, 0.35);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(180deg, #fff0a8 0%, #f0c95f 44%, #c99227 100%);
  border-color: #ffe08a;
  color: #090703;
  filter: brightness(1.03);
}

.btn-primary:active {
  background: linear-gradient(180deg, #c99528 0%, #e0b247 52%, #a8741a 100%) !important;
  border-color: #bf8f2a !important;
  color: #090703 !important;
  transform: translateY(1px);
}

.btn-secondary {
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #8c7445;
  --bs-btn-hover-bg: #12100b;
  --bs-btn-hover-border-color: #d9aa3f;
  --bs-btn-color: #f7f1df;
  --bs-btn-hover-color: #f2c866;
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  min-height: 48px;
  border-color: #403726;
  background-color: #050808;
  color: var(--body-text);
}

.form-control::placeholder {
  color: #817969;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  background-color: #050808;
  color: var(--body-text);
  box-shadow: 0 0 0 0.2rem rgba(217, 170, 63, 0.16);
}

.form-select option {
  background: #050808;
  color: var(--body-text);
}

.form-check-input {
  margin-top: 0.32em;
  background-color: #050808;
  border-color: var(--border-color);
}

.form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.error-text {
  color: #ff8f78;
  display: inline-block;
  margin-top: 0.5rem;
}

a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

.modal-content {
  border-radius: var(--radius-md);
  border-color: var(--border-color);
  background: #080b0b;
  color: var(--body-text);
}

.modal-content .text-dark,
#policyModalContent {
  color: var(--body-text) !important;
}

.modal-header,
.modal-footer {
  border-color: var(--border-color);
}

.modal-header .btn-close {
  box-shadow: none;
  filter: invert(1) sepia(1) saturate(0.5) hue-rotate(5deg);
}

.face-detection-modal .modal-dialog {
  margin: 0.75rem;
}

.face-detection-modal .modal-content {
  border-radius: 18px;
}

.face-detection-modal .modal-header,
.face-detection-modal .modal-body,
.face-detection-modal .modal-footer {
  padding-left: 1rem;
  padding-right: 1rem;
}

.face-detection-modal .modal-header {
  align-items: flex-start;
  gap: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 0.75rem;
}

.face-detection-modal .modal-title {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-right: auto;
}

.face-detection-modal .modal-body {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
  font-size: 0.95rem;
}

.face-detection-preview {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #050808;
}

.face-detection-preview-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(52vh, 320px);
  object-fit: contain;
  margin: 0 auto;
}

.face-detection-preview-canvas {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.face-detection-modal-footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.face-detection-modal-footer .btn {
  width: 100%;
  margin: 0;
}

.alert-danger {
  color: #ffd8cf;
  background-color: #32120d;
  border-color: #9c3b2c;
}

footer {
  margin-top: auto;
}

#footer {
  max-width: 680px;
  font-size: 0.85rem;
  text-align: left;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-color);
  color: var(--muted-text);
}

#footer .container {
  color: var(--muted-text);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  padding-bottom: 1rem;
  align-items: center;
  flex-flow: wrap;
}

.footer-links a {
  padding: 0.25rem 0.5rem;
}

.socials {
  text-decoration: none;
}

.language-selector {
  display: flex;
  justify-content: center;
}

.lang-select {
  padding: 6px 10px;
  border: 1px solid var(--accent-color);
  background: #050808;
  color: var(--body-text);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
  outline: none;
  min-width: 80px;
  text-align: center;
}

.lang-select:hover {
  background: #12100b;
  color: var(--accent-hover);
}

.lang-select:focus {
  border-color: var(--accent-hover);
  box-shadow: none;
}

.lang-select option {
  background: #050808;
  color: var(--body-text);
  padding: 4px 8px;
}

.transition-opacity {
  transition: opacity 0.3s ease-in-out;
}

.opacity-0 {
  opacity: 0;
}

.opacity-1 {
  opacity: 1;
}

.text-primary {
  color: var(--accent-color) !important;
}

.spinner-border {
  color: var(--accent-color);
}

@media (min-width: 576px) {
  #footer {
    font-size: 1rem;
  }
  .footer-links a {
    padding: 0 0.5rem;
  }
}
@media (min-width: 768px) {
  .face-detection-modal .modal-dialog {
    margin: 1.75rem auto;
  }
  .face-detection-modal .modal-header,
  .face-detection-modal .modal-body,
  .face-detection-modal .modal-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .face-detection-modal .modal-title {
    font-size: 1.2rem;
  }
  .face-detection-modal .modal-body {
    font-size: 1rem;
  }
  .face-detection-preview-image {
    max-height: 400px;
  }
  .face-detection-modal-footer {
    flex-direction: row;
    justify-content: flex-end;
  }
  .face-detection-modal-footer .btn {
    width: auto;
  }
}
