:root {
  --accent: #01ffff;
  --accent-soft: rgba(1, 255, 255, 0.35);

  --text: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.72);

  --overlay: rgba(8, 12, 18, 0.62);

  --radius: 14px;
  --shadow: 0 14px 50px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);

  background-image: url("../Assets/Sage_background.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(0,0,0,0.35), var(--overlay));
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 1;

  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  padding: 40px 18px;
  text-align: center;
}

.hero-result-box {
  width: min(720px, 92vw);
  min-height: 140px;
  margin-top: 10px;
  padding: 0px 22px;
  background: rgba(15, 20, 28, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;

  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.hero-result-box.empty{
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-result-box.is-updating {
  opacity: 0;
  transform: translateY(8px);
}

.result-placeholder {
  color: var(--text-muted);
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hero > * {
  width: min(560px, 92vw);
}

.hero__logo {
  width: min(420px, 70vw);
  height: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.45));
}

.hero__subtitle {
  margin: 6px auto 18px;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.5;
  color: var(--text-muted);
}

.shadow__btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(1,255,255,0.95), rgba(1,255,255,0.72));
  color: rgba(0, 0, 0, 0.85);

  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  border-radius: 12px;
  cursor: pointer;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    0 0 0 0 rgba(1, 255, 255, 0.0);

  transition: transform 160ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.shadow__btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.45),
    0 0 18px var(--accent-soft);
}

.shadow__btn:active {
  transform: translateY(0px) scale(0.99);
  filter: brightness(0.98);
}

.shadow__btn:focus-visible {
  outline: none;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.45),
    0 0 0 4px rgba(1, 255, 255, 0.22),
    0 0 22px var(--accent-soft);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10;

  opacity: 0;
  transition: opacity 250ms ease;
}

.modal-backdrop:not([hidden]) {
  opacity: 1;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 11;


  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}
.modal__card {
  width: min(680px, 95vw);
  background: rgba(15, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;

  transform: scale(0.75) translateY(30px);
  opacity: 0;

  transition:
    transform 320ms cubic-bezier(.2,.8,.2,1),
    opacity 220ms ease;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal__title {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.modal__close {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 160ms ease;
}

.modal__close:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
}

.modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(1, 255, 255, 0.22);
}

.modal__form {
  padding: 14px 6px 6px;
}

.modal:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.modal:not([hidden]) .modal__card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.field__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.field__input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.field__input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.field__input:focus {
  outline: none;
  border-color: rgba(1,255,255,0.55);
  box-shadow:
    var(--shadow-soft),
    0 0 0 4px rgba(1,255,255,0.15);
}

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

.modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-secondary,
.btn-primary {
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.14);
  font-weight: 700;
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.10);
}

.btn-primary {
  background: linear-gradient(180deg, rgba(1,255,255,0.95), rgba(1,255,255,0.72));
  color: rgba(0,0,0,0.85);
}

.btn-primary:hover {
  box-shadow: 0 0 18px var(--accent-soft);
}

.btn-secondary:focus-visible,
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(1,255,255,0.22);
}

@media (max-width: 520px) {

  .shadow__btn {
    width: 100%;
    max-width: 320px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .modal__actions {
    flex-direction: column;
  }
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 14px;
  padding: 14px 18px;

  background: rgba(15, 20, 28, 0.42);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
}

.nav{
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link{
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav-link:hover{
  color: var(--text);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.nav-link.is-active{
  color: var(--text);
  background: rgba(1,255,255,0.10);
  border-color: rgba(1,255,255,0.22);
}

@media (max-width: 520px){
  .nav-link{
    padding: 10px 10px;
    font-size: 13px;
  }
}