/* Paquita Pilates theme for Bulwark: overrides Bulwark's semantic color tokens only.
   Brand: brown #B97F55 (decorative), primary #9A6840 (white text 4.7:1), beige #F5E2DB, teal #96CCCC. */
:root:not(.dark) {
  --color-primary: #9A6840;
  --color-primary-foreground: #FFFFFF;
  --color-ring: #96CCCC;
  --color-accent: #F5E2DB;
  --color-accent-foreground: #714629;
  --color-selection: #F5E2DB;
  --color-selection-foreground: #714629;
  --color-unread: #9A6840;
  --color-info: #3E6B67;
  --color-secondary: #FBF3EF;
  --color-secondary-foreground: #3D2C22;
  --color-muted: #F7ECE7;
  --color-muted-foreground: #765C4A;
  --color-border: #EAD3C8;
  --color-input: #EAD3C8;
  --color-foreground: #3D2C22;
  --color-card-foreground: #3D2C22;
  --color-popover-foreground: #3D2C22;
  --color-sidebar: #FBF3EF;
  --color-sidebar-foreground: #3D2C22;
  --color-sidebar-border: #EAD3C8;
  --color-sidebar-accent: #F5E2DB;
  --color-sidebar-accent-foreground: #714629;
}

html.dark {
  --color-primary: #D9A47E;
  --color-primary-foreground: #1F1610;
  --color-ring: #96CCCC;
  --color-accent: #3A2A20;
  --color-accent-foreground: #F5E2DB;
  --color-selection: #3A2A20;
  --color-selection-foreground: #F5E2DB;
  --color-unread: #D9A47E;
}

/* Login page: warm background like the website, softer card. */
html.pp-login body {
  background:
    radial-gradient(1200px 600px at 15% -10%, #E4F2F1, transparent 60%),
    radial-gradient(900px 500px at 110% 110%, #F5E2DB, transparent 60%),
    #FBF3EF;
}
html.dark.pp-login body { background: #14100D; }
html.pp-login button[type=submit] { border-radius: 999px; }
html.pp-login img[src*="/branding/paquita/logo"] { animation: pp-logo-in 1.2s cubic-bezier(.2, .7, .2, 1) both; }

.pp-forgot {
  display: block;
  margin-top: 8px;
  text-align: right;
  font-size: 13px;
  color: #865534;
  text-decoration: none;
}
html.dark .pp-forgot { color: #D9A47E; }
.pp-forgot:hover { text-decoration: underline; }
.pp-forgot:focus-visible { outline: 2px solid #96CCCC; outline-offset: 2px; border-radius: 4px; }

/* Sign-in intro: the phoenix rises, a fine line draws, the name appears. */
#pp-intro {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(700px 420px at 50% 42%, rgba(228, 242, 241, .9), transparent 70%),
    #FBF3EF;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: all;
}
html.dark #pp-intro { background: radial-gradient(700px 420px at 50% 42%, rgba(62, 107, 103, .25), transparent 70%), #14100D; }
#pp-intro.pp-show { opacity: 1; }
#pp-intro.pp-hide { opacity: 0; }
#pp-intro .pp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Covers the freshly loaded app until the intro overlay is in place (no flash of the inbox). */
html.pp-intro-run::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147482999;
  background: #FBF3EF;
}
html.dark.pp-intro-run::before { background: #14100D; }

#pp-intro .pp-mark {
  position: relative;
  width: 168px;
  height: 168px;
}
#pp-intro .pp-mark::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(150, 204, 204, .55), transparent 70%);
  animation: pp-breathe 2.4s ease-in-out infinite;
}
#pp-intro .pp-mark img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: pp-rise 1.3s cubic-bezier(.2, .7, .2, 1) both;
}
#pp-intro .pp-line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #B97F55, transparent);
  animation: pp-draw 1.1s .35s cubic-bezier(.4, 0, .2, 1) forwards;
}
#pp-intro .pp-name {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #865534;
  opacity: 0;
  animation: pp-fade 1s .6s ease forwards;
}
#pp-intro .pp-sub {
  margin: -8px 0 0;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #3E6B67;
  opacity: 0;
  animation: pp-fade 1s .85s ease forwards;
}
html.dark #pp-intro .pp-name { color: #D9A47E; }
html.dark #pp-intro .pp-sub { color: #96CCCC; }

@keyframes pp-rise {
  from { opacity: 0; transform: translateY(18px) scale(.92); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes pp-breathe {
  0%, 100% { transform: scale(.85); opacity: .55; }
  50% { transform: scale(1.12); opacity: 1; }
}
@keyframes pp-draw { to { width: min(220px, 60vw); } }
@keyframes pp-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pp-logo-in { from { opacity: 0; transform: scale(.94); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

@media (prefers-reduced-motion: reduce) {
  #pp-intro *, #pp-intro .pp-mark::before, html.pp-login img[src*="/branding/paquita/logo"] { animation: none !important; opacity: 1 !important; }
  #pp-intro .pp-line { width: min(220px, 60vw); }
}
