/* Mililani Physical Therapy theme.
   Greens come from the logo, sage and sand from mililaniphysicaltherapy.com. */
:root {
  --green-900: #12360a;
  --green-800: #184a0c;
  --green-700: #1f5c0e;   /* logo green */
  --green-600: #2b7218;
  --sage-500: #6d945b;    /* website sage */
  --sage-300: #b9cfad;
  --sage-200: #d6e4cd;
  --sage-100: #eaf2e5;
  --sand-700: #837253;    /* website tan */
  --sand-400: #c9bda3;
  --sand-300: #ddd4c1;
  --sand-200: #ece5d6;
  --sand-100: #f6f1e7;
  --paper: #fbf9f4;
  --surface: #ffffff;

  --ink: #1f2a1a;
  --ink-soft: #5a6450;
  --line: #e2dccd;

  --brand: var(--green-700);
  --brand-dark: var(--green-800);
  --brand-tint: var(--sage-100);

  --warm: #9a5b00;
  --warm-tint: #fcefd8;
  --alert: #b3261e;
  --alert-dark: #8f1d17;
  --alert-tint: #fbe9e6;
  --ok: var(--green-700);
  --ok-tint: var(--sage-100);

  --radius: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(31, 42, 26, 0.06), 0 2px 8px rgba(31, 42, 26, 0.05);
  --shadow-md: 0 2px 4px rgba(31, 42, 26, 0.05), 0 12px 32px rgba(31, 42, 26, 0.09);
  --shadow-brand: 0 10px 28px rgba(31, 92, 14, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Avenir Next ships with iPadOS and macOS, Segoe UI with Windows: no web fonts to download. */
  font-family: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

h1, h2, h3, p { margin: 0; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.12s ease, box-shadow 0.18s ease;
}
.btn:active:not([disabled]) { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid #e8a33d; outline-offset: 3px; }
.btn[disabled] { opacity: 0.55; cursor: default; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(31, 92, 14, 0.22); }
.btn-primary:hover:not([disabled]) { background: var(--brand-dark); }
.btn-secondary { background: var(--surface); color: var(--brand-dark); border-color: var(--sage-300); }
.btn-secondary:hover:not([disabled]) { background: var(--brand-tint); border-color: var(--sage-500); }
.btn-quiet { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-quiet:hover:not([disabled]) { background: var(--sand-200); color: var(--ink); }
.btn-danger { background: var(--alert); color: #fff; box-shadow: 0 4px 14px rgba(179, 38, 30, 0.22); }
.btn-danger:hover:not([disabled]) { background: var(--alert-dark); }

/* A button that is waiting for the server shows a small spinner. */
.btn.is-busy::before {
  content: "";
  width: 0.95em;
  height: 0.95em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

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

/* Shared banner for demo / simulated modes */
.mode-banner {
  background: #2a2a2a;
  color: #ffd98a;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 12px;
}

/* landing page */
body.index {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, var(--sage-100), var(--paper) 60%);
}
.index-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 44px 40px;
  max-width: 460px;
  width: 100%;
  display: grid;
  gap: 16px;
  text-align: center;
  animation: rise 0.6s var(--ease-out) both;
}
.index-card img { width: min(300px, 80%); height: auto; margin: 0 auto 6px; }
.index-card h1 { font-size: 1.35rem; }
.index-card p { color: var(--ink-soft); }
.index-card .btn { padding: 16px 22px; font-size: 1.05rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
