/* The Founder's Focus Board -- surfaces and motion.
 *
 * Warm soft UI: a sand-coloured shell, cream panels that sit slightly proud of
 * it, white cards nested inside those panels, and colour reserved for state
 * alone. Every shadow is tinted brown rather than blue, because a cool shadow
 * on a warm surface is what makes a palette look grey by accident.
 *
 * Tailwind handles layout; this file owns the surface depth, the keyframes and
 * the reduced-motion contract.
 */

[x-cloak] { display: none !important; }

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

body {
  background: #F2ECE5;
  font-feature-settings: 'cv05' 1, 'calt' 1, 'ss01' 1;
  text-rendering: optimizeLegibility;
}

::selection { background: #2E241C; color: #FFF8F1; }

/* ---------------------------------------------------------------- depth --
   Three levels, and no more. Anything deeper stops reading as a surface and
   starts reading as noise:
     .panel  a region of the page, one step above the shell
     .tile   a single object inside a panel
     .orb    a round control that can be pressed
*/

.panel {
  background: #F9F5F0;
  border-radius: 30px;
  box-shadow:
    0 1px 1px rgba(74, 52, 34, 0.03),
    0 18px 40px -28px rgba(74, 52, 34, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.panel-plain {
  background: #FFFFFF;
  border-radius: 30px;
  box-shadow:
    0 1px 1px rgba(74, 52, 34, 0.03),
    0 18px 40px -28px rgba(74, 52, 34, 0.26);
}

.tile {
  background: #FFFFFF;
  border-radius: 22px;
  box-shadow:
    0 1px 2px rgba(74, 52, 34, 0.05),
    0 10px 26px -18px rgba(74, 52, 34, 0.32);
}

/* Cards that respond to the pointer. The lift is small on purpose: paper
   catching light, not a card jumping. */
.tile-hover {
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 240ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.tile-hover:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgba(74, 52, 34, 0.05),
    0 22px 44px -22px rgba(74, 52, 34, 0.36);
}
.tile-hover:active { transform: translateY(-1px) scale(0.995); }

/* Round controls. They sit proud of the shell and press into it when used. */
.orb {
  background: #FFFFFF;
  border-radius: 9999px;
  box-shadow:
    0 1px 2px rgba(74, 52, 34, 0.06),
    0 8px 18px -12px rgba(74, 52, 34, 0.34);
  transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.orb:hover { transform: translateY(-1px); color: #2E241C; }
.orb:active {
  transform: translateY(0);
  box-shadow: inset 2px 2px 6px rgba(178, 160, 142, 0.45),
              inset -2px -2px 6px rgba(255, 255, 255, 0.9);
}

/* A field that reads as carved into the surface rather than sitting on it. */
.well {
  background: #F1E9E0;
  border-radius: 9999px;
  box-shadow: inset 2px 2px 6px rgba(180, 160, 140, 0.32),
              inset -2px -2px 6px rgba(255, 255, 255, 0.95);
  transition: box-shadow 220ms ease, background-color 220ms ease;
}
.well:focus-within {
  background: #FFFFFF;
  box-shadow: inset 1px 1px 3px rgba(180, 160, 140, 0.2),
              0 0 0 3px rgba(46, 36, 28, 0.07);
}

/* ---------------------------------------------------------------- motion */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop-in {
  0%   { opacity: 0; transform: scale(0.94); }
  60%  { opacity: 1; transform: scale(1.015); }
  100% { opacity: 1; transform: scale(1); }
}

/* The soft halo that marks a card which just changed status. */
@keyframes flash-ring {
  0%   { box-shadow: 0 0 0 0 rgba(192, 85, 61, 0.35); }
  100% { box-shadow: 0 0 0 16px rgba(192, 85, 61, 0); }
}

/* A live task is breathing, not blinking. */
@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

@keyframes shimmer {
  from { background-position: -420px 0; }
  to   { background-position: 420px 0; }
}

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

/* The connector dashes between board stages drift, the way a pipeline that is
   actually moving should. */
@keyframes flow {
  to { stroke-dashoffset: -14; }
}

.animate-fade-up   { animation: fade-up 480ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-fade-in   { animation: fade-in 320ms ease both; }
.animate-pop       { animation: pop-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-flash     { animation: flash-ring 900ms ease-out; }
.animate-breathe   { animation: breathe 2.4s ease-in-out infinite; }
.animate-spin-slow { animation: spin 900ms linear infinite; }
.animate-flow      { animation: flow 1.1s linear infinite; }

/* Stagger: each item carries --i, so a column deals itself out like cards
   instead of appearing all at once. */
.stagger { animation-delay: calc(var(--i, 0) * 45ms); }

/* Donut arcs draw themselves in once the numbers are known. */
.arc { transition: stroke-dasharray 900ms cubic-bezier(0.22, 1, 0.36, 1); }

.skeleton {
  background: linear-gradient(90deg, #EFE7DD 0%, #FBF7F2 40%, #EFE7DD 80%);
  background-size: 420px 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 18px;
}

/* --------------------------------------------------------- interactions */

.dragging {
  opacity: 0.4;
  transform: scale(0.97) rotate(-0.6deg);
}

/* The column being dragged over shows a landing strip, not a colour wash. */
.drop-active {
  box-shadow: inset 0 0 0 2px rgba(46, 36, 28, 0.18);
  background: #F1E9E0;
}

.press { transition: transform 120ms ease; }
.press:active { transform: scale(0.96); }

.nav-item { transition: background-color 220ms ease, color 220ms ease; }

.bar-fill { transition: width 620ms cubic-bezier(0.22, 1, 0.36, 1); }

/* ------------------------------------------------------------- utilities */

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tabular { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid #C0553D; outline-offset: 3px; border-radius: 8px; }

input::placeholder, textarea::placeholder { color: #B6A899; font-weight: 400; }

* { scrollbar-width: thin; scrollbar-color: #DDCFC0 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #DDCFC0; border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------ reduced motion --
   Anyone who has asked their system for less motion gets the layout and the
   colour, and none of the movement. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .tile-hover:hover { transform: none; }
  .dragging { transform: none; }
}

@media print {
  body { background: #fff; }
  .orb, nav, aside, button { display: none !important; }
  .panel, .tile { box-shadow: none; border: 1px solid #E9E0D6; }
}
