/* ============================================================
   Seduh — stylesheet
   Self-hosted replacement for the Tailwind CDN build. Contains
   only the utility classes and components this app actually
   uses (hand-written, not a general-purpose framework), so it
   works fully offline with no external CDN dependency.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --coffee-black: #1C120B;      --coffee-black-rgb: 28, 18, 11;
  --coffee-dark: #4A2E20;       --coffee-dark-rgb: 74, 46, 32;
  --coffee-mid: #8B5E3C;        --coffee-mid-rgb: 139, 94, 60;
  --coffee-light: #C9A876;      --coffee-light-rgb: 201, 168, 118;
  --cream: #F3E9D8;             --cream-rgb: 243, 233, 216;
  --cream-paper: #FAF5EC;       --cream-paper-rgb: 250, 245, 236;
  --amber: #C1541C;             --amber-rgb: 193, 84, 28;
  --amber-deep: #9B3E15;        --amber-deep-rgb: 155, 62, 21;
}

/* ---------- 2. Reset (Preflight-equivalent) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none; }

html, body { background: var(--coffee-black); }
body { font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .font-display { font-family: 'Fraunces', serif; }
.font-body { font-family: 'Inter', sans-serif; }

/* ---------- 3. Components (app-specific) ---------- */
.drip-divider { width: 100%; height: 14px; display: block; }
.drip-divider path { stroke: var(--coffee-light); stroke-width: 1.5; fill: none; opacity: 0.55; }

.ring-bg { stroke: rgba(var(--cream-rgb), 0.15); }
.ring-fg { stroke: var(--amber); transition: stroke-dashoffset 1s linear; }

::-webkit-scrollbar { width: 0px; height: 0px; }

.view-enter { animation: viewFade 0.28s ease both; }
@keyframes viewFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-paper {
  background: var(--cream-paper);
  border: 1px solid rgba(var(--coffee-black-rgb), 0.10);
}

.header-shadow { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.logo-shadow { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }

#install-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 28rem;
  padding: 0 1rem;
  animation: installBannerIn 0.3s ease both;
}
#install-banner.hidden { display: none; }
@keyframes installBannerIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #install-banner { animation: none; }
}

input[type="range"] { accent-color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  .view-enter { animation: none; }
  .ring-fg { transition: none; }
}

/* ---------- 4. Layout & display ---------- */
.flex { display: flex; }
.grid { display: grid; }
.block { display: block; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.bottom-24 { bottom: 6rem; }
.left-1\/2 { left: 50%; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.min-h-screen { min-height: 100vh; }
.pointer-events-none { pointer-events: none; }
.translate-x-neg-half { transform: translateX(-50%); }
.rotate-neg-90 { transform: rotate(-90deg); }
.rotate-180 { transform: rotate(180deg); }
.mx-neg-1 { margin-left: -0.25rem; margin-right: -0.25rem; }
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* ---------- 5. Flex / grid alignment ---------- */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-stretch { align-items: stretch; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.shrink-0 { flex-shrink: 0; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ---------- 6. Sizing ---------- */
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-11 { width: 2.75rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-52 { width: 13rem; }
.w-full { width: 100%; }
.h-5 { height: 1.25rem; }
.h-7 { height: 1.75rem; }
.h-9 { height: 2.25rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-52 { height: 13rem; }
.h-full { height: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-26ch { max-width: 26ch; }
.max-w-30ch { max-width: 30ch; }
.max-w-85p { max-width: 85%; }

/* ---------- 7. Spacing ---------- */
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-10 { padding-top: 2.5rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-28 { padding-bottom: 7rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.ml-auto { margin-left: auto; }
.space-y-0\.5 > * + * { margin-top: 0.125rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }

/* ---------- 8. Typography ---------- */
.text-10 { font-size: 10px; line-height: 1.2; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.uppercase { text-transform: uppercase; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.list-disc { list-style: disc; }
.list-inside { list-style-position: inside; }
.list-disc.list-inside { padding-left: 0; }

/* ---------- 9. Colors — background ---------- */
.bg-amber { background-color: var(--amber); }
.bg-amber\/10 { background-color: rgba(var(--amber-rgb), 0.10); }
.bg-amber\/15 { background-color: rgba(var(--amber-rgb), 0.15); }
.bg-coffeeblack { background-color: var(--coffee-black); }
.bg-coffeeblack\/10 { background-color: rgba(var(--coffee-black-rgb), 0.10); }
.bg-coffeedark { background-color: var(--coffee-dark); }
.bg-cream { background-color: var(--cream); }
.bg-creampaper { background-color: var(--cream-paper); }
.bg-white { background-color: #ffffff; }
.bg-transparent { background-color: transparent; }

/* ---------- 10. Colors — text ---------- */
.text-amber { color: var(--amber); }
.text-amberdeep { color: var(--amber-deep); }
.text-coffeeblack { color: var(--coffee-black); }
.text-coffeedark\/40 { color: rgba(var(--coffee-dark-rgb), 0.40); }
.text-coffeedark\/50 { color: rgba(var(--coffee-dark-rgb), 0.50); }
.text-coffeedark\/60 { color: rgba(var(--coffee-dark-rgb), 0.60); }
.text-coffeedark\/70 { color: rgba(var(--coffee-dark-rgb), 0.70); }
.text-coffeedark\/80 { color: rgba(var(--coffee-dark-rgb), 0.80); }
.text-coffeelight { color: var(--coffee-light); }
.text-cream { color: var(--cream); }
.text-cream\/60 { color: rgba(var(--cream-rgb), 0.60); }
.text-cream\/70 { color: rgba(var(--cream-rgb), 0.70); }
.text-cream\/75 { color: rgba(var(--cream-rgb), 0.75); }

/* ---------- 11. Colors — border ---------- */
.border { border-width: 1px; border-style: solid; border-color: currentColor; }
.border-t { border-top-width: 1px; border-top-style: solid; border-color: currentColor; }
.border-coffeeblack\/15 { border-color: rgba(var(--coffee-black-rgb), 0.15); }
.border-coffeeblack\/20 { border-color: rgba(var(--coffee-black-rgb), 0.20); }
.border-coffeedark { border-color: var(--coffee-dark); }
.border-coffeemid\/40 { border-color: rgba(var(--coffee-mid-rgb), 0.40); }

/* ---------- 12. Radius & shadow ---------- */
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }

/* ---------- 13. Effects & transitions ---------- */
.opacity-0 { opacity: 0; }
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; transition-timing-function: ease; }
.transition-opacity { transition-property: opacity; transition-duration: 150ms; transition-timing-function: ease; }
.transition-transform { transition-property: transform; transition-duration: 150ms; transition-timing-function: ease; }
.duration-300 { transition-duration: 300ms; }
.active\:scale-90:active { transform: scale(0.9); }
.active\:scale-95:active { transform: scale(0.95); }
.active-scale-98:active { transform: scale(0.98); }

/* ---------- 14. Object fit ---------- */
.object-contain { object-fit: contain; }
