/* =========================================
   Purl — Auth styles
   ========================================= */

:root {
  --bg: #14131a;
  --bg-elev: #1c1b25;
  --bg-elev-2: #25232f;
  --bg-elev-3: #2e2c39;
  --line: #34313f;
  --line-soft: #26242f;

  --ink: #f5eee8;
  --ink-soft: #d4ccc6;
  --ink-mute: #948c95;
  --ink-faint: #61596a;

  --peach: oklch(0.83 0.12 55);
  --peach-soft: oklch(0.9 0.08 50);
  --peach-deep: oklch(0.72 0.14 45);
  --blush: oklch(0.8 0.1 20);
  --rose: oklch(0.65 0.14 18);
  --rose-deep: oklch(0.52 0.15 15);

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;

  --font-display: "DM Serif Display", "Cormorant Garamond", Georgia, serif;
  --font-ui: "Outfit", "Helvetica Neue", system-ui, sans-serif;
}

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

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 80% 10%, oklch(0.55 0.13 35 / 0.15), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 90%, oklch(0.45 0.14 320 / 0.12), transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 50%, oklch(0.25 0.04 290 / 0.4), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* =========================================
   PETAL DECORATIONS
   ========================================= */
.petal {
  position: absolute;
  width: 18px;
  height: 26px;
  background: var(--peach);
  border-radius: 100% 0 100% 0;
  opacity: 0.5;
  pointer-events: none;
}
.petals-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.petals-bg .petal { animation: drift linear infinite; }
@keyframes drift {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.4; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

/* =========================================
   AUTH
   ========================================= */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  position: relative;
  z-index: 2;
}

.auth-art {
  position: relative;
  background:
    radial-gradient(circle at 30% 30%, oklch(0.55 0.14 30 / 0.35), transparent 55%),
    radial-gradient(circle at 70% 70%, oklch(0.4 0.12 310 / 0.4), transparent 60%),
    linear-gradient(140deg, #1f1d28 0%, #16151d 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
}
.auth-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(244, 235, 227, 0.06) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}
.brand-mark {
  width: 38px; height: 38px;
  position: relative;
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, var(--peach) 0%, var(--rose) 100%);
}
.brand-mark::after {
  transform: rotate(90deg);
  opacity: 0.7;
  background: linear-gradient(135deg, var(--blush) 0%, var(--rose-deep) 100%);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.02em;
}

.auth-art-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 40px 0;
}

.moon {
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, oklch(0.92 0.05 60), oklch(0.78 0.08 40) 60%, oklch(0.55 0.1 30) 100%);
  box-shadow:
    0 0 80px oklch(0.6 0.12 35 / 0.5),
    inset -20px -25px 50px rgba(0,0,0,0.35),
    inset 8px 8px 20px rgba(255,230,200,0.2);
  animation: breathe 6s ease-in-out infinite;
  position: relative;
}
.moon::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px dashed oklch(0.7 0.1 40 / 0.3);
  animation: spin 60s linear infinite;
}
.moon::after {
  content: "";
  position: absolute;
  inset: -50px;
  border-radius: 50%;
  border: 1px solid oklch(0.7 0.1 40 / 0.15);
  animation: spin 90s linear infinite reverse;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50%       { transform: scale(1.04); filter: brightness(1.08); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-tag {
  margin-top: 48px;
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.15;
  max-width: 380px;
  text-wrap: balance;
}
.auth-tag em { color: var(--peach); font-style: italic; }
.auth-sub {
  margin-top: 14px;
  color: var(--ink-mute);
  max-width: 360px;
  line-height: 1.5;
}
.auth-art-foot {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 24px;
  color: var(--ink-faint);
  font-size: 13px;
}

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--bg);
}
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 {
  font-family: var(--font-display);
  font-size: 36px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.auth-form .sub { color: var(--ink-mute); margin: 0 0 32px; font-size: 15px; }

.tabs-pill {
  display: flex;
  background: var(--bg-elev);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 28px;
  border: 1px solid var(--line-soft);
}
.tabs-pill button {
  flex: 1;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--ink-mute);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.25s;
}
.tabs-pill button.active {
  background: linear-gradient(135deg, var(--peach), var(--rose));
  color: #2a1a15;
  font-weight: 600;
  box-shadow: 0 4px 12px -4px oklch(0.5 0.12 25 / 0.5);
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 8px;
  font-weight: 500;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 15px;
  transition: all 0.2s;
}
.field input:focus {
  outline: none;
  border-color: var(--peach);
  background: var(--bg-elev-2);
  box-shadow: 0 0 0 4px oklch(0.7 0.1 40 / 0.12);
}
.field input::placeholder { color: var(--ink-faint); }

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin: 4px 0 24px;
}
.row-between a { color: var(--peach); text-decoration: none; }
.row-between a:hover { text-decoration: underline; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  cursor: pointer;
}
.checkbox input { accent-color: var(--peach); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--peach) 0%, var(--rose) 100%);
  color: #2a1610;
  box-shadow: 0 8px 24px -10px oklch(0.5 0.13 25 / 0.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -10px oklch(0.5 0.13 25 / 0.7); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  width: 100%;
}
.btn-ghost:hover { background: var(--bg-elev-2); }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-foot {
  text-align: center;
  margin-top: 28px;
  color: var(--ink-mute);
  font-size: 14px;
}
.auth-foot a { color: var(--peach); text-decoration: none; font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
