/* ==========================================================================
   Ikebana Design System — Brand palette from PPT
   8px grid · Inter typography · WCAG AA contrast
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* --------------------------------------------------------------------------
   Design Tokens — PPT color palette
   1 #ED6A5A  Muted coral    6 #3E8CA0  Deep teal
   2 #F4F1BB  Pale cream     7 #4A5457  Charcoal
   3 #9BC1BC  Dusty sage     8 #FCE24C  Golden yellow
   4 #E8ECE5  Off-white      9 #E05160  Raspberry
   5 #36C9C6  Bright cyan   10 #E86254  Vibrant coral
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Raw palette */
  --palette-coral-muted: #ed6a5a;
  --palette-coral-bright: #e86254;
  --palette-cream: #f4f1bb;
  --palette-sage: #9bc1bc;
  --palette-offwhite: #e8ece5;
  --palette-cyan: #36c9c6;
  --palette-teal: #3e8ca0;
  --palette-charcoal: #4a5457;
  --palette-yellow: #fce24c;
  --palette-raspberry: #e05160;

  /* Spacing — 8px grid */
  --space-0: 0;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 56px;
  --space-8: 64px;

  /* Semantic colors */
  --color-primary: var(--palette-teal);
  --color-primary-hover: #347d90;
  --color-primary-active: #2b6b7c;
  --color-primary-subtle: #e4f2f5;
  --color-primary-muted: #b8d8e2;

  --color-secondary: var(--palette-sage);
  --color-secondary-hover: #86ada8;
  --color-secondary-subtle: var(--palette-offwhite);

  --color-accent: var(--palette-cyan);
  --color-accent-hover: #2eb5b2;
  --color-accent-subtle: #ddf7f7;

  --color-success: var(--palette-teal);
  --color-success-subtle: #e4f2f5;
  --color-success-border: #9bc1bc;

  --color-warning: #c9a400;
  --color-warning-subtle: #fef9dc;
  --color-warning-border: var(--palette-yellow);

  --color-error: var(--palette-raspberry);
  --color-error-subtle: #fde8eb;
  --color-error-border: #f0a0aa;

  --color-info: var(--palette-cyan);
  --color-info-subtle: #ddf7f7;

  /* Surfaces */
  --color-bg: var(--palette-offwhite);
  --color-bg-subtle: var(--palette-cream);
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;
  --color-surface-overlay: rgba(255, 255, 255, 0.92);
  --color-border: #c5dedb;
  --color-border-strong: var(--palette-sage);
  --color-divider: #dce9e7;

  /* Text */
  --color-text: var(--palette-charcoal);
  --color-text-secondary: #5f6b6e;
  --color-text-muted: #8a9598;
  --color-text-inverse: #ffffff;
  --color-text-link: var(--palette-teal);
  --color-text-link-hover: #2b6b7c;

  /* Dropdown system */
  --dropdown-trigger-height: 38px;
  --dropdown-trigger-min-width: 150px;
  --dropdown-trigger-max-width: 240px;
  --dropdown-trigger-padding-x: 12px;
  --dropdown-radius-trigger: 12px;
  --dropdown-radius-menu: 14px;
  --dropdown-radius-option: 8px;
  --dropdown-surface: #ffffff;
  --dropdown-menu-surface: #ffffff;
  --dropdown-search-bg: #ffffff;
  --dropdown-hover-bg: #f3fafb;
  --dropdown-selected-bg: #e4f2f5;
  --dropdown-text: #2d2d2d;
  --dropdown-text-muted: #6e6e6e;
  --dropdown-border: rgba(62, 140, 160, 0.24);
  --dropdown-menu-border: rgba(62, 140, 160, 0.16);
  --dropdown-trigger-shadow: 0 1px 2px rgba(74, 84, 87, 0.05);
  --dropdown-menu-shadow: 0 14px 34px rgba(74, 84, 87, 0.12);
  --dropdown-focus-ring: 0 0 0 3px rgba(62, 140, 160, 0.18);
  --dropdown-transition: 180ms ease-out;
  --dropdown-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232D2D2D' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 30px;
  --font-size-4xl: 36px;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.65;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows — tinted with charcoal */
  --shadow-xs: 0 1px 2px rgba(74, 84, 87, 0.05);
  --shadow-sm: 0 2px 8px rgba(74, 84, 87, 0.07);
  --shadow-md: 0 8px 24px rgba(74, 84, 87, 0.09);
  --shadow-lg: 0 16px 40px rgba(74, 84, 87, 0.11);
  --shadow-xl: 0 24px 56px rgba(74, 84, 87, 0.14);
  --shadow-focus: 0 0 0 3px rgba(62, 140, 160, 0.28);

  /* Motion */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Shell layout — fixed Sundial-style navbar height */
  --shell-top-offset: 56px;
  --shell-bottom-offset: 56px;
  --content-max-width: 1280px;

  /* Workflow theme defaults */
  --workflow-bg: #f3f8fa;
  --workflow-border: #b8d3de;
  --workflow-soft: #e4f0f4;
  --shell-action: var(--palette-teal);
  --shell-action-dark: #347d90;
  --shell-action-text: #ffffff;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-extrabold); }
h2 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-semibold); }
h3 { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
h4 { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }

p {
  margin: 0 0 var(--space-2);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-text-link-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus visible — keyboard navigation */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--color-primary-subtle);
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Layout utilities
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--content-max-width);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.page-enter {
  animation: fadeSlideUp var(--transition-slow) ease both;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
