/* static/css/index.css */

/* =========================
   Base Card
   ========================= */

/* ✅ Shared card look (applies to ALL cards) */
.card {
  background-color: #0c122a;
  border: 1px solid #2b2834;
  border-radius: 16px;

  padding: 28px;
  box-sizing: border-box;
  text-align: center;

  box-shadow: 0 0 18px rgba(43, 40, 52, 0.55);
}

/* ✅ Center “normal” cards only (not grid cards) */
.card:not(.split-card) {
  margin-left: auto;
  margin-right: auto;
  width: 520px;
  max-width: 520px;
}

/* Push ONLY the first card down a bit (desktop only) */
.container > .card:first-of-type {
  margin-top: 24px;
}

/* Cards stack nicely inside container (layout gap handles spacing) */
.card + .card {
  margin-top: 0;
}

.card h1 {
  margin: 0 0 10px 0;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 44px;
  line-height: 1.1;
  color: #b0b0d7;
}

.card h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 18px;

  color: #5f608c;
  opacity: 1;

  padding-bottom: 8px;
  border-bottom: 1px solid rgba(232, 232, 255, 0.22);
}

/* =========================
   Card Variants
   ========================= */

/* ✅ First card dark navy (no gradient) */
.card--hero {
  background-color: #0a0c16;
  border: 1px solid rgba(176, 176, 215, 0.22);
}

/* ✅ User Info gradient card */
.card.card-user {
  background: linear-gradient(180deg, #0a0c16 0%, #0e1224 55%, #121735 100%);
  border: 1px solid rgba(160, 170, 255, 0.18);
}

/* Desktop hover for normal cards only */
@media (hover: hover) {
  .card:not(.split-card):hover {
    box-shadow: 0 0 28px rgba(43, 40, 52, 0.75);
    transform: translateY(-2px);
    transition: box-shadow 180ms ease, transform 180ms ease;
  }
}

/* =========================
   MUCH smaller titles (DESKTOP + DEFAULT)
   These override .card h1 / h3 ONLY for card-user and card--alt
   ========================= */

/* User Info */
.card-user h1 {
  font-size: 22px; /* ✅ much smaller */
  font-weight: 600;
  letter-spacing: 0.25px;
  margin-bottom: 4px;
}

.card-user h3 {
  font-size: 11px;
  letter-spacing: 0.42px;
  opacity: 0.75;
  padding-bottom: 6px;
}

/* Security Status */
.card--alt h1 {
  font-size: 24px; /* ✅ much smaller */
  font-weight: 600;
  letter-spacing: 0.28px;
  margin-bottom: 6px;
}

.card--alt h3 {
  font-size: 11px;
  letter-spacing: 0.42px;
  opacity: 0.75;
  padding-bottom: 6px;
}

/* Optional: tighten body text in Security Status card a bit */
.card--alt .card-text {
  font-size: 15px;
}

/* =========================
   Form styles
   ========================= */

.form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
  text-align: left;
}

.form,
.form * {
  box-sizing: border-box;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  letter-spacing: 0.4px;
  color: #6a6b9a;
}

.field input {
  width: 100%;
  background-color: #0f1636;
  border: 1px solid rgba(43, 40, 52, 0.8);
  border-radius: 10px;

  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.2;
  color: #e8e8ff;

  outline: none;

  transition: border-color 150ms ease, box-shadow 150ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder {
  color: #5f608c;
}

.field input:focus {
  border-color: rgba(232, 232, 255, 0.22);
  box-shadow: 0 0 0 2px rgba(232, 232, 255, 0.12);
}

/* =========================
   Submit button (match Security buttons)
   ========================= */

.form button[type="submit"] {
  -webkit-appearance: none;
  appearance: none;

  width: 100%;
  margin-top: 12px;
  padding: 14px;

  background: rgba(15, 18, 32, 0.45);
  color: #e8e8ff;

  border: 1px solid rgba(232, 232, 255, 0.16);
  border-radius: 14px;

  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;

  cursor: pointer;

  box-shadow: none;
  transition: border-color 180ms ease, box-shadow 180ms ease,
    transform 180ms ease, background-color 180ms ease;
}

.form button[type="submit"]:hover,
.form button[type="submit"]:focus-visible {
  background: rgba(15, 18, 32, 0.6);
  border-color: rgba(232, 232, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(232, 232, 255, 0.14);
  transform: translateY(-1px);
  outline: none;
}

.form button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(232, 232, 255, 0.1);
}

/* =========================
   Security card content
   ========================= */

.card-text {
  margin: 18px 0 0 0;
  color: rgba(232, 232, 255, 0.78);
  line-height: 1.6;
}

.card-actions {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ✅ force links to NOT look like default anchors */
.card-link,
.card-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 14px;

  text-decoration: none;
  color: #e8e8ff;
  background: rgba(15, 18, 32, 0.45);

  border: 1px solid rgba(232, 232, 255, 0.16);
  box-shadow: none;

  transition: border-color 180ms ease, box-shadow 180ms ease,
    transform 180ms ease, background-color 180ms ease;
}

.card-link:hover,
.card-link:focus-visible {
  background: rgba(15, 18, 32, 0.6);
  border-color: rgba(232, 232, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(232, 232, 255, 0.14);
  transform: translateY(-1px);
  outline: none;
}

.card-link:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(232, 232, 255, 0.1);
}

/* =========================
   Split Section (3 equal cards)
   ========================= */

.split {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;

  align-items: stretch;
  box-sizing: border-box;
}

/* ✅ Grid cards must NOT have auto margins + must fill column width */
.split .split-card {
  margin: 0;
  width: 100%;
  max-width: none;
  min-height: 320px;

  box-shadow: none !important;
  transform: none !important;
  transition: none !important;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;

  background: linear-gradient(180deg, #0b1024 0%, #0f1636 55%, #18226a 100%);
  border: 1px solid rgba(176, 176, 215, 0.22);
}

/* ✅ Remove underline line inside split cards only */
.split .split-card h3 {
  border-bottom: none;
  padding-bottom: 0;
  font-size: 16px;
}

/* Center the 3 lines */
.split-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 1100px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .split {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .split .split-card {
    min-height: 260px;
  }
}

/* =========================
   iPhone – compact layout
   ========================= */
@media (max-width: 480px) {
  .card:not(.split-card) {
    width: 100%;
    max-width: 430px;
    padding: 18px;
  }

  /* Keep hero readable */
  .card h1 {
    font-size: 30px;
  }

  .card h3 {
    font-size: 14px;
  }

  /* ✅ Even smaller on iPhone for these two */
  .card-user h1 {
    font-size: 20px;
  }

  .card--alt h1 {
    font-size: 22px;
  }

  .card-user h3,
  .card--alt h3 {
    font-size: 10px;
  }

  .card.card-user {
    padding: 16px 14px 18px;
  }

  .card.card-user .form {
    margin-top: 12px;
    gap: 10px;
  }

  .card.card-user .field label {
    font-size: 12px;
  }

  .card.card-user .field input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .card.card-user .form button[type="submit"] {
    padding: 11px;
    font-size: 14px;
    margin-top: 12px;
  }
}
