/* YARNESH site — shared styles for index.html and login.html.
 * Aesthetic: the desktop orb — cyan #4FC3F7 -> violet #7C4DFF -> magenta #E040FB
 * on near-black glass. No external fonts, images, or frameworks. */

:root {
  --cyan: #4fc3f7;
  --violet: #7c4dff;
  --magenta: #e040fb;
  --bg: #05060f;
  --ink: #eef1ff;
  --muted: rgba(203, 212, 240, 0.68);
  --faint: rgba(160, 172, 205, 0.55);
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(11, 13, 28, 0.55);
  --error: #ff8a80;
  --warn: #ffd180;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 640px at 82% -12%, rgba(124, 77, 255, 0.17), transparent 62%),
    radial-gradient(900px 560px at 8% 14%, rgba(79, 195, 247, 0.11), transparent 58%),
    radial-gradient(900px 680px at 72% 108%, rgba(224, 64, 251, 0.1), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

::selection {
  background: rgba(124, 77, 255, 0.45);
  color: #fff;
}

a {
  color: #7fd4ff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(159, 220, 255, 0.9);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- skip link --------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 18px;
  background: #101438;
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 12px 0;
  border: 1px solid rgba(124, 77, 255, 0.5);
}

.skip-link:focus {
  left: 0;
}

/* --- header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(20px, 5vw, 56px);
  background: rgba(5, 6, 15, 0.62);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wordmark {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-decoration: none;
  background: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- layout ------------------------------------------------------------ */

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px) 72px;
}

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn-primary {
  color: #fff;
  text-shadow: 0 1px 2px rgba(8, 8, 26, 0.4);
  background: linear-gradient(115deg, var(--cyan), var(--violet) 52%, var(--magenta));
  box-shadow:
    0 10px 30px rgba(124, 77, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 38px rgba(124, 77, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn-ghost {
  color: #dbe6ff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  color: #9fdcff;
  border-color: rgba(79, 195, 247, 0.55);
  background: rgba(79, 195, 247, 0.08);
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

/* --- hero --------------------------------------------------------------- */

.hero {
  display: flex;
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
  padding: clamp(56px, 10vh, 120px) 0 clamp(40px, 7vh, 72px);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(159, 220, 255, 0.7);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.05rem, 4.6vw, 3.3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.grad {
  background: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subhead {
  margin-top: 18px;
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* --- the orb (pure CSS, no assets) --------------------------------------- */

.orb {
  position: relative;
  flex: none;
  width: clamp(180px, 24vw, 270px);
  aspect-ratio: 1;
}

.orb-halo {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(124, 77, 255, 0.32), rgba(124, 77, 255, 0) 72%),
    radial-gradient(closest-side at 34% 28%, rgba(79, 195, 247, 0.2), rgba(79, 195, 247, 0) 70%),
    radial-gradient(closest-side at 68% 74%, rgba(224, 64, 251, 0.18), rgba(224, 64, 251, 0) 70%);
  filter: blur(18px);
  animation: orb-halo 7s ease-in-out infinite;
}

.orb-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(85% 85% at 30% 24%, rgba(79, 195, 247, 0.95), rgba(79, 195, 247, 0) 48%),
    radial-gradient(90% 90% at 74% 80%, rgba(224, 64, 251, 0.88), rgba(224, 64, 251, 0) 55%),
    radial-gradient(130% 130% at 50% 55%, rgba(124, 77, 255, 0.95), #100c2a 76%);
  box-shadow:
    inset 0 0 34px rgba(4, 5, 16, 0.55),
    inset 0 0 80px rgba(124, 77, 255, 0.4),
    0 0 46px rgba(124, 77, 255, 0.38),
    0 0 110px rgba(79, 195, 247, 0.2);
  animation: orb-breathe 6s ease-in-out infinite;
}

.orb-swirl {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  filter: blur(9px);
}

.orb-swirl-a {
  background: radial-gradient(34% 34% at 70% 30%, rgba(79, 195, 247, 0.6), rgba(79, 195, 247, 0) 72%);
  animation: orb-spin 15s linear infinite;
}

.orb-swirl-b {
  background: radial-gradient(38% 38% at 28% 72%, rgba(224, 64, 251, 0.55), rgba(224, 64, 251, 0) 72%);
  animation: orb-spin 24s linear infinite reverse;
}

.orb-glare {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(26% 20% at 34% 22%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: screen;
}

.orb--small {
  width: 88px;
  margin: 0 auto 18px;
}

.orb--small .orb-halo {
  filter: blur(12px);
}

.orb--small .orb-swirl {
  filter: blur(5px);
}

@keyframes orb-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

@keyframes orb-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes orb-halo {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* --- glass cards ---------------------------------------------------------- */

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 40px);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* --- how it works ----------------------------------------------------------- */

.how {
  padding: 28px 0 8px;
}

.section-title {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 1px solid rgba(124, 77, 255, 0.45);
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.18), rgba(124, 77, 255, 0.18));
  color: #cfe3ff;
  font-weight: 700;
}

/* --- auth cards (signup / login) --------------------------------------------- */

.auth-section {
  display: flex;
  justify-content: center;
  padding: 52px 0 8px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
}

.auth-card h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.card-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(220, 228, 255, 0.85);
}

.field .hint {
  font-weight: 400;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  caret-color: var(--cyan);
  background: rgba(8, 10, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input::placeholder {
  color: rgba(200, 210, 255, 0.35);
}

.field input:focus-visible {
  outline: none;
  border-color: rgba(79, 195, 247, 0.65);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.18);
}

.field input[aria-invalid='true'] {
  border-color: rgba(255, 138, 128, 0.65);
}

.field input[aria-invalid='true']:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 138, 128, 0.16);
}

.field-error {
  min-height: 1.25em;
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--error);
}

.form-error {
  min-height: 1.3em;
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--error);
}

.alt-link {
  margin-top: 18px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

/* --- download section ----------------------------------------------------------- */

.download-section {
  display: flex;
  justify-content: center;
  padding: 48px 0 24px;
}

.download-card {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.download-card h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.download-card h2:focus {
  outline: none;
}

.signed-in {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.download-status {
  min-height: 1.3em;
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--warn);
}

.install-note {
  margin-top: 26px;
  padding: 18px 22px;
  text-align: left;
  background: rgba(8, 10, 24, 0.5);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.install-note h3 {
  font-size: 1rem;
  color: rgba(220, 228, 255, 0.9);
}

.install-note ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0 20px;
  color: rgba(226, 232, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.5;
}

.fine-print {
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--faint);
}

/* --- login page ---------------------------------------------------------------------- */

.login-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 190px);
  padding-top: 32px;
}

.login-main .auth-section,
.login-main .download-section {
  width: 100%;
  padding-top: 16px;
}

/* --- footer --------------------------------------------------------------------------- */

.site-footer {
  padding: 36px 20px 44px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--faint);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- responsive ------------------------------------------------------------------------ */

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

@media (max-width: 760px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 44px;
  }

  .subhead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }
}

/* --- reduced motion ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
