/* Global custom styles for responsiveness and readability (works alongside Tailwind CDN) */

:root {
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.08);
  --text-muted: #4b5563; /* gray-600 */
  --text-soft: #6b7280; /* gray-500 */
}

html { scroll-behavior: smooth; }

body {
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography scaling */
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
}
@media (min-width: 1025px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
}

/* Content blocks for readable long-form text */
.content {
  color: var(--text-muted);
}
.content p { margin: 0.75rem 0; }
.content ul { list-style: disc; padding-left: 1.25rem; margin: 0.75rem 0; }
.content ol { list-style: decimal; padding-left: 1.25rem; margin: 0.75rem 0; }
.content li { margin: 0.25rem 0; }

/* Cards */
.card { border-radius: var(--radius); box-shadow: var(--shadow-sm); background: #fff; border: 1px solid #eef2ff; }
.card.hoverable:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); transition: box-shadow 180ms ease, transform 180ms ease; }

/* Hero adjustments for smaller screens */
.hero { position: relative; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
@supports (backdrop-filter: blur(6px)) {
  .hero-overlay { backdrop-filter: blur(2px); background: rgba(0,0,0,0.35); }
}

/* Utilities */
.grid-auto-fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
@media (min-width: 768px) { .grid-auto-fit { gap: 1.25rem; } }
@media (min-width: 1024px) { .grid-auto-fit { gap: 1.5rem; } }

.img-soft { border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* Sticky bar spacing on small screens */
.sticky-bar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.9); }

/* Improve focus ring visibility */
:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 6px; }

/* Better form styling */
.better-form .form-section { padding: 1.25rem; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; }
.better-form .form-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.better-form .fee-badge { display: inline-block; font-size: .875rem; padding: .25rem .625rem; border-radius: .5rem; border: 1px solid #bbf7d0; background: #f0fdf4; color: #15803d; }
.better-form .form-label { display: block; font-size: .875rem; font-weight: 600; color: #374151; margin-bottom: .375rem; }
.better-form .form-hint { font-size: .75rem; color: #6b7280; margin-top: .25rem; }
.better-form .form-input, .better-form .select-input, .better-form .textarea-input {
  display: block; width: 100%; border: 1px solid #d1d5db; border-radius: .5rem; padding: .75rem 1rem; background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.better-form .form-input:focus, .better-form .select-input:focus, .better-form .textarea-input:focus {
  border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.better-form .checkbox-input { height: 1rem; width: 1rem; border: 1px solid #d1d5db; border-radius: .25rem; }
.better-form .file-input { font-size: .875rem; color: #374151; }
.better-form .form-error { margin-top: .25rem; font-size: .75rem; color: #b91c1c; }
