/* ──────────────────────────────────────────────────────────────
   myKotak · Login
   Private-banking aesthetic — deep maroon, warm gold, ivory.
   ────────────────────────────────────────────────────────────── */

:root {
  --maroon-950: #2c0a0e;
  --maroon-900: #471017;
  --maroon-800: #5e1620;
  --maroon-700: #7a1f2c;
  --gold-500: #c9a227;
  --gold-400: #d8b33d;
  --gold-300: #e6cd7a;
  --cream-50: #faf6ee;
  --cream-100: #f1e9da;
  --ink-900: #241a17;
  --ink-700: #4a3d38;
  --ink-500: #7a6b63;
  --ink-400: #97867c;
  --white: #fffdf9;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--cream-50);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(201, 162, 39, 0.35);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Brand panel ────────────────────────────────────────────── */

.brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(216, 179, 61, 0.16), transparent 55%),
    linear-gradient(160deg, var(--maroon-800) 0%, var(--maroon-900) 46%, var(--maroon-950) 100%);
  color: var(--cream-50);
  animation: slideIn 0.9s var(--ease) both;
}

.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.brand > .wordmark {
  position: relative;
  z-index: 2;
}

/* Wordmark */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  width: max-content;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  text-decoration: none;
  color: inherit;
  animation: fadeUp 0.7s var(--ease) 0.1s both;
}

.wordmark .my {
  font: 600 0.58em/1 var(--font-body);
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.wordmark .kt {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.55em;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Decorative seal — a golden rupee inside concentric rings */
.seal {
  position: absolute;
  z-index: 1;
  right: -16vmin;
  bottom: -14vmin;
  width: 62vmin;
  height: 62vmin;
  color: var(--gold-400);
  opacity: 0.85;
  animation: sealIn 1.4s var(--ease) 0.2s both;
}

.seal .spin {
  transform-origin: center;
  animation: spin 140s linear infinite;
}

/* Copy block */
.copy {
  position: relative;
  z-index: 2;
  margin: clamp(2.6rem, 11vh, 5.5rem) 0 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  font: 600 0.72rem var(--font-body);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-300);
  animation: fadeUp 0.7s var(--ease) 0.22s both;
}

.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--gold-500);
  animation: grow 0.8s var(--ease) 0.34s both;
}

.copy h1 {
  margin: 1.1rem 0 1.2rem;
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(2.3rem, 5.2vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  animation: fadeUp 0.7s var(--ease) 0.3s both;
}

.copy h1 em {
  font-style: italic;
  color: var(--gold-300);
}

.copy .lede {
  margin: 0;
  max-width: 34ch;
  font: 400 0.98rem/1.7 var(--font-body);
  color: rgba(250, 246, 238, 0.72);
  animation: fadeUp 0.7s var(--ease) 0.38s both;
}

/* Trust markers */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  animation: fadeUp 0.7s var(--ease) 0.48s both;
}

.trust li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font: 600 0.76rem var(--font-body);
  letter-spacing: 0.02em;
  color: rgba(250, 246, 238, 0.82);
}

.trust svg {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--gold-400);
}

.brand__foot {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: clamp(2rem, 6vh, 3.5rem);
  font: 500 0.7rem/1.6 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 246, 238, 0.45);
  animation: fadeUp 0.7s var(--ease) 0.6s both;
}

/* ── Form panel ─────────────────────────────────────────────── */

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(201, 162, 39, 0.08), transparent 60%),
    var(--cream-50);
}

.panel__inner {
  width: 100%;
  max-width: 26.5rem;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  font: 600 0.7rem var(--font-body);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--maroon-700);
  animation: fadeUp 0.7s var(--ease) 0.15s both;
}

.kicker svg {
  width: 1rem;
  height: 1rem;
  color: var(--gold-500);
}

.panel h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  animation: fadeUp 0.7s var(--ease) 0.25s both;
}

.panel .sub {
  margin: 0 0 2.2rem;
  font: 400 0.95rem/1.6 var(--font-body);
  color: var(--ink-500);
  animation: fadeUp 0.7s var(--ease) 0.32s both;
}

/* Inline message (e.g. from a redirect after POST) */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 1.4rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 12px;
  background: rgba(201, 162, 39, 0.1);
  color: var(--maroon-800);
  font: 500 0.85rem/1.5 var(--font-body);
  animation: fadeUp 0.6s var(--ease) 0.3s both;
}

.banner svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  color: var(--gold-500);
}

/* Fields */
.login {
  display: grid;
  gap: 1.25rem;
  animation: fadeUp 0.7s var(--ease) 0.42s both;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  font: 600 0.8rem var(--font-body);
  letter-spacing: 0.02em;
  color: var(--ink-900);
}

.control {
  position: relative;
}

.control .icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  translate: 0 -50%;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink-400);
  pointer-events: none;
  transition: color 0.25s var(--ease);
}

.control input {
  width: 100%;
  height: 3.25rem;
  padding: 0 3rem 0 2.9rem;
  font: 500 0.95rem var(--font-body);
  color: var(--ink-900);
  background: var(--white);
  border: 1px solid rgba(122, 107, 99, 0.28);
  border-radius: 12px;
  outline: none;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease);
}

.control input::placeholder {
  color: var(--ink-400);
  opacity: 0.75;
}

.control:focus-within .icon {
  color: var(--maroon-700);
}

.control input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.16);
}

/* Password visibility toggle */
.toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-500);
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.toggle:hover {
  color: var(--maroon-700);
  background: rgba(122, 107, 99, 0.08);
}

.toggle:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

.toggle .off {
  display: none;
}

.toggle[aria-pressed="true"] .on {
  display: none;
}

.toggle[aria-pressed="true"] .off {
  display: block;
}

/* Submit */
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 3.4rem;
  margin-top: 0.4rem;
  font: 600 0.95rem var(--font-body);
  letter-spacing: 0.01em;
  color: var(--cream-50);
  background: linear-gradient(180deg, var(--maroon-700), var(--maroon-800));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(71, 16, 23, 0.65);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    filter 0.2s var(--ease);
}

.submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 30px -14px rgba(71, 16, 23, 0.7);
}

.submit:active {
  transform: translateY(0);
}

.submit:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.submit svg {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.3s var(--ease);
}

.submit:hover svg {
  transform: translateX(4px);
}


.secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.9rem 0 0;
  font: 500 0.76rem var(--font-body);
  color: var(--ink-400);
  animation: fadeUp 0.6s var(--ease) 0.7s both;
}

.secure svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--gold-500);
}

/* ── Motion ─────────────────────────────────────────────────── */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes grow {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 2.2rem;
    opacity: 1;
  }
}

@keyframes sealIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(14px);
  }
  to {
    opacity: 0.85;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
}

/* ── Responsive ─────────────────────────────────────────────── */

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

  .panel {
    order: -1;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 3rem;
  }

  .brand {
    padding: 1.5rem 1.6rem 1.3rem;
    animation: none;
  }

  .copy,
  .trust,
  .brand__foot {
    display: none;
  }

  .seal {
    right: -18vmin;
    bottom: -30vmin;
    width: 72vmin;
    height: 72vmin;
    opacity: 0.5;
  }
}
