:root {
  --ink: #0f172a;
  --primary: #1e3a8a;
  --accent: #22c55e;
  --sand: #f7f8fb;
  --line: #e6ecf3;
}

* {
  scroll-behavior: smooth;
}

body,
body.bg-white {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1b2431;
  background: radial-gradient(circle at 20% 20%, #eef2ff 0, transparent 30%),
    radial-gradient(circle at 80% 0%, #e0f2fe 0, transparent 35%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  min-height: 100vh;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow, 0 16px 40px rgba(15, 23, 42, 0.12));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
  border-color: #d5def0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 600;
  font-size: 0.9rem;
}

.refac-btn,
.btn-primary,
.btn-ghost,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.refac-btn:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.btn-outline:focus-visible {
  outline: 3px solid rgba(35, 171, 75, 0.28);
  outline-offset: 2px;
}

.refac-btn-primary,
.btn-primary {
  background: #23ab4b;
  border-color: #23ab4b;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(35, 171, 75, 0.18);
}

.refac-btn-primary:hover,
.btn-primary:hover {
  background: #1f963f;
  border-color: #1f963f;
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(35, 171, 75, 0.24);
  transform: translateY(-1px);
}

.refac-btn-secondary,
.btn-outline {
  background: #ffffff;
  border-color: #23ab4b;
  color: #187538;
}

.refac-btn-secondary:hover,
.btn-outline:hover {
  background: #effaf2;
  border-color: #1f963f;
  color: #146c32;
}

.refac-btn-ghost,
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #253449;
  font-weight: 650;
}

.refac-btn-ghost:hover,
.btn-ghost:hover {
  background: #effaf2;
  border-color: #d7f0dd;
  color: #187538;
}

.refac-btn:active,
.btn-primary:active,
.btn-outline:active,
.btn-ghost:active {
  transform: translateY(0);
  box-shadow: none;
}

.refac-btn:disabled,
.refac-btn[aria-disabled="true"],
.btn-primary:disabled,
.btn-outline:disabled,
.btn-ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.refac-btn[aria-busy="true"] {
  gap: 0.65rem;
  cursor: wait;
  opacity: 0.78;
}

.refac-btn[aria-busy="true"]::after {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  content: "";
  animation: refac-button-spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .refac-btn,
  .btn-primary,
  .btn-outline,
  .btn-ghost,
  .refac-btn[aria-busy="true"]::after {
    animation: none !important;
    transition: none !important;
  }
}

.refac-btn-block {
  width: 100%;
}

.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4b5563;
}

.section-heading {
  font-family: 'DM Sans', sans-serif;
  color: #0f172a;
}

.hero-pattern {
  background: linear-gradient(135deg, #ffffff 0%, #f2f5fb 100%);
  border: 1px solid var(--line);
}

.site-pattern-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.site-pattern-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("../images/pattern.2ca335bcb679.svg");
  background-size: 120px 120px;
  background-repeat: repeat;
  opacity: 0.42;
}

.section-surface-blue {
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 172, 228, 0.16), transparent 30%),
    linear-gradient(135deg, #eef5ff 0%, #f7fbff 48%, #edf8f2 100%);
}

.section-surface-sky {
  background:
    radial-gradient(circle at 88% 16%, rgba(0, 172, 228, 0.18), transparent 28%),
    linear-gradient(135deg, #f1f9ff 0%, #eef6ff 52%, #f4fbf6 100%);
}

.section-surface-green {
  background:
    radial-gradient(circle at 14% 12%, rgba(35, 171, 75, 0.16), transparent 28%),
    linear-gradient(135deg, #f0faf4 0%, #f8fbff 50%, #eef5ff 100%);
}

.section-surface-menya {
  background:
    radial-gradient(circle at 16% 20%, rgba(62, 89, 168, 0.16), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(35, 171, 75, 0.14), transparent 26%),
    linear-gradient(135deg, #edf4ff 0%, #f5fbff 48%, #eefaf3 100%);
}

.section-surface-warm {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 245, 0, 0.16), transparent 24%),
    radial-gradient(circle at 90% 18%, rgba(62, 89, 168, 0.12), transparent 28%),
    linear-gradient(135deg, #fbfdff 0%, #f2f8ff 54%, #f3fbf5 100%);
}

.divider {
  height: 4px;
  width: 56px;
  background: var(--primary);
  border-radius: 999px;
}

.tag {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-weight: 700;
  font-size: 0.75rem;
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 700;
}

/* Header nav underline flourish */
header nav a {
  position: relative;
  transition: color 0.2s ease;
}

header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1e3a8a, #22c55e);
  transition: width 0.2s ease;
}

header nav a:hover::after,
header nav a.text-refac-blue::after {
  width: 100%;
}

/* Inputs */
input, select, textarea {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.12);
  outline: none;
}
