/* Routina Demo Portal — style.css */

/* ── Variables (matching routina-www brand) ──────────────────────────────── */
:root {
  --paper:      #f4f2ee;
  --navy:       #0a0d14;
  --navy-soft:  #141824;
  --navy-mid:   #1d2235;
  --blue:       #1a56ff;
  --blue-hover: #1446d1;
  --teal:       #00c4a7;
  --grey-300:   #d1d5db;
  --grey-500:   #6b7280;
  --grey-600:   #4b5563;
  --navy-line:  rgba(255,255,255,0.08);

  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(.4,0,.2,1);
  --radius: 12px;
  --shadow-card: 0 2px 12px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.05);
  --shadow-card-hover: 0 12px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(26,86,255,.25);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 768px)  { .container { padding-inline: 40px; } }
@media (min-width: 1200px) { .container { padding-inline: 60px; } }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(10,13,20,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav__logo svg { flex-shrink: 0; }

.nav__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(26,86,255,.15);
  border: 1px solid rgba(26,86,255,.3);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 140px 0 80px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(26,86,255,.12) 0%, transparent 70%);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero__title em {
  font-style: italic;
  color: var(--blue);
}

.hero__sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--grey-300);
  max-width: 540px;
  margin-inline: auto;
  line-height: 1.65;
}

/* ── Cards grid ──────────────────────────────────────────────────────────── */
.demos {
  padding: 0 0 100px;
}

.demos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.demo-card {
  background: var(--navy-soft);
  border-radius: var(--radius);
  border: 1px solid var(--navy-line);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition:
    transform 220ms var(--ease),
    box-shadow 220ms var(--ease),
    border-color 220ms var(--ease);
  display: flex;
  flex-direction: column;
}

.demo-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(26,86,255,.35);
}

.demo-card__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--navy);
  cursor: pointer;
}

.demo-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--ease);
}

.demo-card:hover .demo-card__thumb img {
  transform: scale(1.04);
}

.demo-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(10,13,20,.75);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
  color: var(--grey-300);
  pointer-events: none;
}

.demo-card__badge--open {
  background: rgba(0,196,167,.15);
  border-color: rgba(0,196,167,.35);
  color: var(--teal);
}

.demo-card__body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.demo-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.demo-card__desc {
  font-size: 14px;
  color: var(--grey-300);
  line-height: 1.6;
  flex: 1;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 18px;
  transition: background 180ms var(--ease), transform 120ms var(--ease), box-shadow 180ms var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn--demo {
  background: rgba(26,86,255,.15);
  border: 1px solid rgba(26,86,255,.3);
  color: var(--blue);
  margin-top: 4px;
  align-self: flex-start;
}

.btn--demo:hover {
  background: rgba(26,86,255,.25);
  border-color: rgba(26,86,255,.6);
  transform: translateY(-1px);
}

.btn--unlocked {
  background: rgba(0,196,167,.12);
  border-color: rgba(0,196,167,.3);
  color: var(--teal);
}

.btn--unlocked:hover {
  background: rgba(0,196,167,.22);
  border-color: rgba(0,196,167,.5);
}

.btn--primary {
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  padding: 12px 24px;
}

.btn--primary:hover {
  background: var(--blue-hover);
  box-shadow: 0 4px 20px rgba(26,86,255,.4);
  transform: translateY(-1px);
}

/* ── Auth Modal ──────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms var(--ease);
}

.modal--open {
  pointer-events: auto;
  opacity: 1;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,8,16,.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal__box {
  position: relative;
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
  transform: translateY(16px);
  transition: transform 200ms var(--ease);
}

.modal--open .modal__box {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--grey-500);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 150ms, background 150ms;
}

.modal__close:hover {
  color: var(--paper);
  background: rgba(255,255,255,.08);
}

.modal__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  line-height: 1.2;
}

.modal__title strong {
  color: var(--blue);
  font-weight: inherit;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey-300);
  display: block;
  margin-bottom: 6px;
}

.modal__input {
  width: 100%;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 150ms;
}

.modal__input::placeholder { color: var(--grey-500); }

.modal__input:focus {
  border-color: rgba(26,86,255,.6);
  box-shadow: 0 0 0 3px rgba(26,86,255,.15);
}

.modal__error {
  font-size: 13px;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal__error::before {
  content: '✕';
  font-size: 11px;
  font-weight: 700;
}

/* Input shake animation on wrong password */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.input--shake { animation: shake 0.4s var(--ease); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--navy-line);
  padding: 32px 0;
  text-align: center;
  color: var(--grey-500);
  font-size: 13px;
}

.footer a { color: var(--grey-300); transition: color 150ms; }
.footer a:hover { color: var(--paper); }

/* ── Divider / section label ─────────────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  color: var(--grey-500);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-label::before,
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--navy-line);
}
