/* =========================================================
   kitakale.me — Editorial Login
   Aesthetic: split-screen, warm cream + ink black,
   Fraunces serif display + JetBrains Mono labels
   ========================================================= */

:root {
  --ink:        #14130f;
  --ink-soft:   #2a2823;
  --cream:      #f3eee3;
  --cream-2:    #ebe4d4;
  --paper:      #fdfaf3;
  --rust:       #c14a26;
  --olive:      #6b6a3a;
  --line:       rgba(20, 19, 15, 0.18);
  --muted:      rgba(20, 19, 15, 0.55);

  --serif: 'Fraunces', 'Times New Roman', serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --ease:   cubic-bezier(.2, .8, .2, 1);
  --ease-2: cubic-bezier(.65, 0, .35, 1);
}

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

html, body {
  height: 100%;
  font-family: var(--serif);
  font-feature-settings: "ss01", "ss02";
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: grid;
  grid-template-columns: 44% 56%;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Generic panels ---------- */
.panel {
  position: relative;
  padding: 40px 56px;
  display: flex;
  flex-direction: column;
}

/* ---------- LEFT (dark, editorial) ---------- */
.panel--dark {
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  justify-content: space-between;
  border-right: 1px solid #000;
}

.panel--dark::before {
  /* warm radial wash */
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(193, 74, 38, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(107, 106, 58, 0.30), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
  animation: drift 22s var(--ease-2) infinite alternate;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, -2%) scale(1.06); }
}

.panel__noise {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.brand {
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp .9s var(--ease) .1s forwards;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand__mark svg { width: 26px; height: 26px; }
.brand__mark em  { font-style: italic; color: var(--rust); font-weight: 700; }

.panel__inner {
  position: relative;
  z-index: 2;
  max-width: 520px;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) .25s forwards;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243, 238, 227, 0.6);
  margin-bottom: 28px;
}

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}

.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--rust);
}

.display .ink {
  font-style: italic;
  font-weight: 300;
  opacity: 0.55;
}

.lede {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  color: rgba(243, 238, 227, 0.78);
  max-width: 440px;
}

.panel__footer {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 18px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 238, 227, 0.45);
  opacity: 0;
  animation: fadeUp 1s var(--ease) .5s forwards;
}

.ticker.dot { color: var(--rust); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------- RIGHT (light, form) ---------- */
.panel--light {
  background: var(--cream);
  background-image:
    linear-gradient(var(--cream), var(--cream-2));
  position: relative;
}

.panel--light::after {
  /* paper grain */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.topnav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  opacity: 0;
  animation: fadeUp .9s var(--ease) .2s forwards;
}

.topnav__link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.topnav__link:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Form ---------- */
.form-wrap {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 0;
}

.form-heading {
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) .35s forwards;
}

.step {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.form-heading h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 4.5vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.form-heading h2 br + ::after { content: ""; }

.sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
}
.sub a {
  color: var(--ink);
  font-style: normal;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: color .25s, border-color .25s;
}
.sub a:hover { color: var(--rust); border-color: var(--rust); }

.form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) .5s forwards;
}

.field {
  position: relative;
  padding-bottom: 8px;
}

.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.forgot {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
  transition: color .25s, border-color .25s;
}
.forgot:hover { color: var(--rust); border-color: var(--rust); }

.field__row { position: relative; }

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  padding: 6px 0 10px;
  outline: none;
  letter-spacing: -0.01em;
}

.field input::placeholder {
  color: rgba(20, 19, 15, 0.30);
  font-style: italic;
  font-weight: 300;
}

.field__line {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.field__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s var(--ease);
}
.field input:focus ~ .field__line::after,
.field__row:focus-within ~ .field__line::after { transform: scaleX(1); }

.field.is-error .field__line { background: var(--rust); }
.field__error {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  margin-top: 8px;
  min-height: 14px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .25s, transform .25s;
}
.field.is-error .field__error { opacity: 1; transform: translateY(0); }

.toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-60%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  transition: color .2s;
}
.toggle:hover { color: var(--ink); }

/* ---------- Checkbox ---------- */
.check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-soft);
  user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  width: 18px; height: 18px;
  border: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background .2s;
}
.check__box svg {
  width: 12px; height: 12px;
  color: var(--cream);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .15s, transform .2s var(--ease);
}
.check input:checked + .check__box { background: var(--ink); }
.check input:checked + .check__box svg { opacity: 1; transform: scale(1); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 24px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: transform .3s var(--ease), background .3s, color .3s;
}

.btn__label { position: relative; z-index: 2; transition: transform .4s var(--ease); }
.btn__arrow { position: relative; z-index: 2; transition: transform .4s var(--ease); }

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rust);
  transform: translateY(101%);
  transition: transform .45s var(--ease);
  z-index: 1;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover .btn__arrow { transform: translateX(6px); }
.btn:active { transform: scale(0.99); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--cream); }
.btn--ghost svg { transition: transform .35s var(--ease); position: relative; z-index: 2; }
.btn--ghost:hover svg { transform: rotate(-8deg) scale(1.1); }

.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__label { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* ---------- Divider ---------- */
.divider {
  position: relative;
  text-align: center;
  margin: 4px 0;
}
.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--line);
}
.divider span {
  position: relative;
  background: var(--cream);
  padding: 0 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Legal footer ---------- */
.legal {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-top: 32px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) .7s forwards;
}
.legal a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.legal a:hover { border-color: var(--ink); }
.legal__sep { opacity: 0.5; }

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .panel { padding: 28px 28px; }
  .panel--dark {
    min-height: 360px;
    padding-bottom: 48px;
  }
  .display { font-size: clamp(36px, 8vw, 56px); }
  .form-wrap { padding: 24px 0; }
}

@media (max-width: 520px) {
  .panel { padding: 24px 20px; }
  .topnav { gap: 18px; }
  .form-heading h2 { font-size: 38px; }
  .field input[type="email"],
  .field input[type="password"] { font-size: 17px; }
  .panel__footer { gap: 12px; }
}
