/* Crete Cafe: shared design tokens and base styles (public site + admin). */
:root {
  /* Brand palette (from the brief) */
  --coffee-900: #3E2C22;
  --coffee-700: #604737;
  --clay: #A96F4C;
  --cream: #F7F1E7;
  --beige: #E8DCCB;
  --paper: #FFFDF8;
  --ink: #2B241F;
  --success: #526B4E;
  --error: #A44335;
  /* Derived for accessibility: the suggested muted #786D63 is 4.48:1 on cream (just under AA),
     so body-size muted text uses this slightly darker value (5.4:1). Clay (3.7:1 on cream) is only
     used for large text, rules, focus rings and decoration, never for small text. */
  --muted: #6E635A;
  --line: #E3D6C3;          /* decorative dividers */
  --line-strong: #9A8978;   /* form borders (3:1 on paper) */

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--coffee-700); text-underline-offset: 0.2em; }
a:hover { color: var(--coffee-900); }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.65rem 1.4rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  color: var(--cream); background: var(--coffee-700);
  border: 1.5px solid var(--coffee-700); border-radius: var(--radius-m);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--coffee-900); border-color: var(--coffee-900); color: var(--cream); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--coffee-700); }
.btn-ghost:hover { background: var(--beige); color: var(--coffee-900); border-color: var(--coffee-900); }
.btn-danger { background: var(--error); border-color: var(--error); }
.btn-danger:hover { background: #82342a; border-color: #82342a; }
.btn-sm { min-height: 2.25rem; padding: 0.35rem 0.9rem; font-size: 0.9rem; border-radius: var(--radius-s); }

/* Forms */
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field label, .field .label { font-weight: 600; font-size: 0.95rem; }
.field .hint { color: var(--muted); font-size: 0.85rem; }
.field .error-text { color: var(--error); font-size: 0.875rem; font-weight: 500; min-height: 0; }
input[type="text"], input[type="search"], input[type="password"], input[type="url"], input[type="number"], input[type="tel"], select, textarea {
  width: 100%; min-height: 2.75rem; padding: 0.6rem 0.8rem;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-s);
}
textarea { min-height: 5.5rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--coffee-700); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--clay); outline-offset: 1px; border-color: var(--coffee-700); }
[aria-invalid="true"] { border-color: var(--error); }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(100deg, var(--beige) 30%, #f1e8da 50%, var(--beige) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-m);
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
