/* Entulho Fácil — shared design primitives */
:root {
  --color-bg: #f4f5f3;
  --color-surface: #fff;
  --color-surface-elevated: #fff;
  --color-surface-soft: #ebeeea;
  --color-primary: #ffce32;
  --color-primary-hover: #f2bb12;
  --color-accent: #a54114;
  --color-text-primary: #1d2524;
  --color-text-secondary: #525f5c;
  --color-border: #d8dfd9;
  --color-success: #17633e;
  --color-danger: #b12f36;
  --color-dark: #172321;
  --color-dark-elevated: #263632;
  --color-on-dark: #f8faf6;
  --color-muted-on-dark: #c1cdc6;
  --color-focus: #905012;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --radius-sm: 12px; --radius-md: 20px; --radius-lg: 28px;
  --shadow-sm: 0 4px 16px rgb(23 35 33 / 4%);
  --shadow-card: 0 16px 40px rgb(23 35 33 / 8%);
  --shadow-elevated: 0 24px 64px rgb(23 35 33 / 14%);
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Manrope', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }
body { margin: 0; background: var(--color-bg); color: var(--color-text-primary); font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 800; letter-spacing: -.045em; }
a { color: inherit; text-underline-offset: 4px; }
button,input,select,textarea { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: #ffdc6d; color: #172321; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 2000; top: 12px; left: 16px; transform: translateY(-150%); padding: 12px 20px; border-radius: 12px; color: #172321; background: #ffce32; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.button,.portal-body .btn { display: inline-flex; position: relative; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: 12px; text-decoration: none; font-size: 15px; line-height: 1.3; font-weight: 700; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.button:hover,.portal-body .btn:hover { transform: translateY(-2px); }
.button:active,.portal-body .btn:active { transform: scale(.98); }
.button-primary,.portal-body .btn-primary,.portal-body .btn-warning { color: #172321; background: var(--color-primary); border-color: var(--color-primary); box-shadow: 0 8px 20px rgb(229 174 16 / 13%); }
.button-primary:hover,.portal-body .btn-primary:hover,.portal-body .btn-warning:hover { color: #172321; background: var(--color-primary-hover); border-color: var(--color-primary-hover); box-shadow: 0 12px 28px rgb(229 174 16 / 23%); }
.button-secondary,.button-dark,.portal-body .btn-secondary,.portal-body .btn-dark { color: #fff; background: var(--color-dark); }
.button-secondary:hover,.button-dark:hover,.portal-body .btn-secondary:hover,.portal-body .btn-dark:hover { color: #fff; background: #30443d; }
.button-outline,.button-quiet,.portal-body .btn-outline-primary,.portal-body .btn-outline-secondary { color: var(--color-text-primary); background: transparent; border-color: #87958d; }
.button-outline:hover,.button-quiet:hover,.portal-body .btn-outline-primary:hover,.portal-body .btn-outline-secondary:hover { color: #172321; background: #edf0e9; border-color: #52655a; }
.button-ghost { color: #364c40; background: transparent; }
.button-ghost:hover { color: #172321; background: #e7ece4; }
.button-success,.portal-body .btn-success { color: #fff; background: var(--color-success); }
.button-success:hover,.portal-body .btn-success:hover { color: #fff; background: #104b2e; }
.button-danger,.portal-body .btn-danger { color: #fff; background: var(--color-danger); }
.button-danger:hover,.portal-body .btn-danger:hover { color: #fff; background: #8d2229; }
.button-large { min-height: 56px; padding-inline: 28px; font-size: 16px; }
.button:disabled,.button[aria-disabled='true'],.portal-body .btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.button.is-loading,.portal-body .btn.is-loading { pointer-events: none; }
.button.is-loading::after,.portal-body .btn.is-loading::after { content: ''; width: 17px; height: 17px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ui-spin .7s linear infinite; }
.button i { transition: transform .2s ease; }
.button:hover .bi-arrow-right,.button:hover .bi-arrow-up-right { transform: translate(3px,-1px); }
.form-control,.form-select { min-height: 52px; padding: 12px 15px; border: 1px solid #9ca9a1; border-radius: 12px; color: #1d2524; background-color: #fff; font-size: 16px; box-shadow: none; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.form-control:focus,.form-select:focus { color: #1d2524; border-color: #8e4a0d; outline: none; box-shadow: 0 0 0 4px rgb(255 206 50 / 25%); }
.form-control::placeholder { color: #68746e; opacity: 1; }
.form-control[readonly] { color: #42554a; background: #f0f3ee; }
.form-control.is-filled,.form-select.is-filled { border-color: #718775; }
.form-control.is-invalid,.form-select.is-invalid,[aria-invalid='true'] { border-color: var(--color-danger); }
.form-control.is-valid,.form-select.is-valid { border-color: var(--color-success); }
.field-error,.invalid-feedback { margin-top: 6px; color: #a3242d; font-size: 14px; }
.ui-toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 1200; display: grid; gap: 12px; width: min(390px,calc(100% - 32px)); }
.ui-toast { display: flex; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid #d8dfd9; border-left: 4px solid var(--color-success); border-radius: 16px; color: #1d2524; background: #fff; box-shadow: var(--shadow-elevated); animation: ui-enter .25s ease both; }
.ui-toast[data-tone='error'] { border-left-color: var(--color-danger); }
.ui-toast[data-tone='info'] { border-left-color: #b47b00; }
.ui-toast > span { flex: 1; font-size: 15px; }
.ui-toast button { display: grid; place-items: center; flex: 0 0 36px; height: 36px; margin: -6px; border: 0; border-radius: 8px; color: #45594d; background: transparent; }
.reveal-pending { opacity: 0; transform: translateY(18px); }
.reveal-visible { animation: ui-enter .4s ease both; animation-delay: var(--reveal-delay,0ms); }
.summary-updated { animation: ui-update .3s ease; }
.js-spotlight { position: relative; isolation: isolate; }
.js-spotlight::after { content: ''; position: absolute; z-index: 2; inset: -1px; padding: 2px; border-radius: inherit; background: radial-gradient(240px circle at var(--pointer-x,50%) var(--pointer-y,50%),#d99b19,transparent 75%); -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite: exclude; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.js-spotlight.is-pointer-over::after { opacity: 1; }
.js-tilt-card.is-pointer-over { transform: perspective(900px) rotateX(var(--tilt-y,0deg)) rotateY(var(--tilt-x,0deg)) translateY(-4px); }
.js-hover-link { --pointer-x: 50%; --pointer-y: 50%; border-radius: 8px; }
.js-hover-link.is-pointer-over { background-image: radial-gradient(90px circle at var(--pointer-x) var(--pointer-y),rgb(255 206 50 / 14%),transparent 85%); }
@keyframes ui-enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ui-update { 50% { opacity: .65; transform: translateY(-2px); } }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .reveal-pending { opacity: 1; transform: none; }
  .js-tilt-card.is-pointer-over { transform: none; }
}
